diff --git a/src/lib/components/ui/Avatar.svelte b/src/lib/components/ui/Avatar.svelte index 7eef6909..46056a59 100644 --- a/src/lib/components/ui/Avatar.svelte +++ b/src/lib/components/ui/Avatar.svelte @@ -62,11 +62,11 @@ loading="lazy" srcset="{optimizedURLs[0]} 1x, {optimizedURLs[1]} 2x, {optimizedURLs[2]} 4x, {optimizedURLs[3]} 6x" src={optimizedURLs[0]} - {alt} + alt="" {width} {title} class={[ - 'aspect-square object-cover overflow-hidden shrink-0', + 'aspect-square object-cover overflow-hidden shrink-0 bg-slate-100 dark:bg-zinc-900', circle ? 'rounded-full' : 'rounded-lg', clazz, ]} @@ -114,10 +114,3 @@ }).toString()} {/if} - - diff --git a/src/lib/components/ui/layout/CommonList.svelte b/src/lib/components/ui/layout/CommonList.svelte index 61a32486..0f29fa37 100644 --- a/src/lib/components/ui/layout/CommonList.svelte +++ b/src/lib/components/ui/layout/CommonList.svelte @@ -2,23 +2,59 @@ import type { Snippet } from 'svelte' interface Props { - items: T[] - item: Snippet<[T, number]> + items?: T[] + item?: Snippet<[T, number]> + children?: Snippet } - let { items, item: itemSnippet }: Props = $props() + let { items, item: itemSnippet, children }: Props = $props() + + diff --git a/src/routes/moderation/communities/+page.svelte b/src/routes/moderation/communities/+page.svelte index a35009d7..51d4534a 100644 --- a/src/routes/moderation/communities/+page.svelte +++ b/src/routes/moderation/communities/+page.svelte @@ -1,9 +1,10 @@
@@ -15,59 +16,51 @@ {:else} - - {#each profile.current.user.moderates as moderate} + + {#snippet item(moderate)} {@const community = moderate.community} -
- - -
- -
-
- {/each} -
+ {$t('routes.moderation.feed')} + +
+ + + {/snippet} + {/if} diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 707fa0d3..7579c224 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -252,7 +252,7 @@ {/if} -
+
  • {#snippet title()} {$t('settings.app.lang.title')} @@ -289,7 +289,7 @@ title={$t('settings.app.lang.useRtl.title')} > {/if} -
  • + {#snippet title()} {$t('settings.app.view.title')} diff --git a/src/routes/settings/Section.svelte b/src/routes/settings/Section.svelte index 8467eb18..bcc3bd8f 100644 --- a/src/routes/settings/Section.svelte +++ b/src/routes/settings/Section.svelte @@ -1,7 +1,6 @@ -
    - - {#if open} -
    - {@render children?.()} -
    - {/if} -
    + {/snippet} + + {@render children?.()} + + diff --git a/src/routes/settings/Setting.svelte b/src/routes/settings/Setting.svelte index 0204424d..4b84f640 100644 --- a/src/routes/settings/Setting.svelte +++ b/src/routes/settings/Setting.svelte @@ -40,7 +40,7 @@ }: Props = $props() -
    {/if}
    - +