migrate: change settings from a store to a state
This commit is contained in:
1 parent
ffcd9faa96
commit
d597349887
128 files changed
+1010
-1144
No files matched your search
@@ -5,20 +5,22 @@
|
||||
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
|
||||
import { contentPadding } from '$lib/components/ui/layout/Shell.svelte'
|
||||
import { t } from '$lib/translations.js'
|
||||
import { fullCommunityName } from '$lib/util.js'
|
||||
import { fullCommunityName } from '$lib/util.svelte.js'
|
||||
import type { PageData } from './$types.js'
|
||||
|
||||
interface Props {
|
||||
data: PageData;
|
||||
children?: import('svelte').Snippet;
|
||||
data: PageData
|
||||
children?: import('svelte').Snippet
|
||||
}
|
||||
|
||||
let { data, children }: Props = $props();
|
||||
let { data, children }: Props = $props()
|
||||
|
||||
let communityUrl = $derived(`/c/${fullCommunityName(
|
||||
data.community.community_view.community.name,
|
||||
data.community.community_view.community.actor_id
|
||||
)}`)
|
||||
let communityUrl = $derived(
|
||||
`/c/${fullCommunityName(
|
||||
data.community.community_view.community.name,
|
||||
data.community.community_view.community.actor_id,
|
||||
)}`,
|
||||
)
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4 h-full">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { preventDefault } from 'svelte/legacy';
|
||||
import { preventDefault } from 'svelte/legacy'
|
||||
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import EditableList from '$lib/components/ui/list/EditableList.svelte'
|
||||
import { Icon, Plus, Trash } from 'svelte-hero-icons'
|
||||
import type { PageData } from './$types.js'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { profile } from '$lib/auth.svelte.js'
|
||||
import { toast } from 'mono-svelte'
|
||||
import { client, getClient } from '$lib/lemmy.js'
|
||||
import { flip } from 'svelte/animate'
|
||||
@@ -15,10 +15,10 @@
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
|
||||
interface Props {
|
||||
data: PageData;
|
||||
data: PageData
|
||||
}
|
||||
|
||||
let { data = $bindable() }: Props = $props();
|
||||
let { data = $bindable() }: Props = $props()
|
||||
|
||||
let formData = $state({
|
||||
newModerator: '',
|
||||
@@ -109,7 +109,6 @@
|
||||
|
||||
<Header pageHeader>Moderators</Header>
|
||||
<EditableList
|
||||
|
||||
on:action={(e) => {
|
||||
toast({
|
||||
content: `Are you sure you want to remove ${e.detail.name} as a moderator?`,
|
||||
@@ -158,7 +157,7 @@
|
||||
submit
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={Plus} micro size="16" />
|
||||
{/snippet} Add moderator
|
||||
<Icon src={Plus} micro size="16" />
|
||||
{/snippet} Add moderator
|
||||
</Button>
|
||||
</form>
|
||||
Reference in new issue
Block a user