fix: ssr crash

This commit is contained in:
James Xylight committed 2025-03-02 15:30:00 -08:00
1 parent 5e18fbb0bd
commit c4c28aa76b
5 files changed
+12 -12

No files matched your search

@@ -3,6 +3,7 @@
import type { CommentView, PostView } from 'lemmy-js-client' import type { CommentView, PostView } from 'lemmy-js-client'
import { amMod, ban, isAdmin, remove } from './moderation' import { amMod, ban, isAdmin, remove } from './moderation'
import { import {
ArrowsUpDown,
Fire, Fire,
Icon, Icon,
LockClosed, LockClosed,
@@ -42,8 +42,8 @@
color="distinct" color="distinct"
class="flex flex-col-reverse sm:flex-row class="flex flex-col-reverse sm:flex-row
overflow-hidden gap-4 embed-card z-0 relative overflow-hidden gap-4 embed-card z-0 relative
dark:border-t-zinc-800 border-opacity-80 max-w-full shadow-sm shadow-black/5 dark:border-t-zinc-800 border-opacity-80 max-w-full
dark:bg-zinc-950 group-hover/link:bg-slate-100 group-hover/link:dark:bg-zinc-900 transition-colors" dark:bg-zinc-950 group-hover/link:bg-slate-50 group-hover/link:dark:bg-zinc-900 transition-colors"
rounding="2xl" rounding="2xl"
element="article" element="article"
> >
@@ -57,13 +57,11 @@
{/if} {/if}
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
{#if richURL} {#if richURL}
<Link <div
href={url}
target="_blank"
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium" class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium"
> >
{richURL.hostname} {richURL.hostname}
</Link> </div>
{/if} {/if}
<p class="font-medium text-base">{embed_title}</p> <p class="font-medium text-base">{embed_title}</p>
</div> </div>
@@ -18,7 +18,7 @@
let { items, isFavorites = false }: Props = $props() let { items, isFavorites = false }: Props = $props()
</script> </script>
{#each items.sort( (a, b) => a.title.localeCompare(b.title), ) as follow (follow.id)} {#each items.toSorted( (a, b) => a.title.localeCompare(b.title), ) as follow (follow.id)}
<div <div
class="inline-flex w-full items-center pl-3 hover:bg-slate-100 hover:dark:bg-zinc-900 class="inline-flex w-full items-center pl-3 hover:bg-slate-100 hover:dark:bg-zinc-900
transition-colors rounded-lg" transition-colors rounded-lg"
+4 -3
View File
@@ -561,8 +561,8 @@
"deleteData": "Delete data", "deleteData": "Delete data",
"warning": "This will delete ALL of this user's submissions here.", "warning": "This will delete ALL of this user's submissions here.",
"expires": "Expires (UTC)", "expires": "Expires (UTC)",
"banFromCommunity": "Ban from community", "banFromCommunity": "Ban user from community",
"unbanFromCommunity": "Unban from community" "unbanFromCommunity": "Unban user from community"
}, },
"removeSubmission": { "removeSubmission": {
"title": "Removing Submission", "title": "Removing Submission",
@@ -588,7 +588,8 @@
"label": "Moderation", "label": "Moderation",
"labelInstanceOnly": "Moderation (Instance Only)", "labelInstanceOnly": "Moderation (Instance Only)",
"feature": "Feature", "feature": "Feature",
"unfeature": "Unfeature" "unfeature": "Unfeature",
"votes": "Votes"
}, },
"common": { "common": {
"back": "Back", "back": "Back",
+2 -2
View File
@@ -46,7 +46,7 @@
{disabled} {disabled}
> >
{#snippet prefix()} {#snippet prefix()}
<span <div
class="contents {color == 'tertiary' class="contents {color == 'tertiary'
? 'text-slate-600 dark:text-zinc-400' ? 'text-slate-600 dark:text-zinc-400'
: ''} : ''}
@@ -57,7 +57,7 @@
{:else} {:else}
{@render prefix?.()} {@render prefix?.()}
{/if} {/if}
</span> </div>
{/snippet} {/snippet}
{@render children?.()} {@render children?.()}
{#snippet suffix()} {#snippet suffix()}