diff --git a/src/hooks.server.ts b/src/hooks.server.ts index d4ce477..ad3582a 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -4,9 +4,11 @@ import { getAccentColor } from '$lib/colors'; import { startScheduler } from '$lib/server/scheduler'; import { createLogger } from '$lib/server/logger'; import { checkRateLimit, rateLimitResponse } from '$lib/server/rate-limit'; +import { env } from '$env/dynamic/private'; const log = createLogger('http'); const verboseRequests = process.env.VERBOSE_REQUESTS === 'true'; +const secureSuffix = env.NODE_ENV === 'production' ? ';Secure' : ''; startScheduler(); @@ -92,7 +94,7 @@ function setThemeCookies(event: RequestEvent, response: Response): void { if (event.locals.user?.themePreference && !cookies.includes('scrolly_theme=')) { response.headers.append( 'Set-Cookie', - `scrolly_theme=${event.locals.user.themePreference};Path=/;Max-Age=31536000;SameSite=Lax;Secure` + `scrolly_theme=${event.locals.user.themePreference};Path=/;Max-Age=31536000;SameSite=Lax${secureSuffix}` ); } @@ -101,7 +103,7 @@ function setThemeCookies(event: RequestEvent, response: Response): void { const accentValue = encodeURIComponent(JSON.stringify({ hex: accent.hex, dark: accent.dark })); response.headers.append( 'Set-Cookie', - `scrolly_accent=${accentValue};Path=/;Max-Age=31536000;SameSite=Lax;Secure` + `scrolly_accent=${accentValue};Path=/;Max-Age=31536000;SameSite=Lax${secureSuffix}` ); } } diff --git a/src/lib/components/ActionSidebar.svelte b/src/lib/components/ActionSidebar.svelte index 6405627..e531964 100644 --- a/src/lib/components/ActionSidebar.svelte +++ b/src/lib/components/ActionSidebar.svelte @@ -100,7 +100,6 @@ if (!holdFired) { onsave(); } - holdFired = false; } diff --git a/src/lib/components/BaseSheet.svelte b/src/lib/components/BaseSheet.svelte index 31693ea..9318230 100644 --- a/src/lib/components/BaseSheet.svelte +++ b/src/lib/components/BaseSheet.svelte @@ -11,12 +11,14 @@ title = '', sheetId = 'sheet', ondismiss, + onclose, header, children }: { title?: string; sheetId?: string; ondismiss: () => void; + onclose?: () => void; header?: Snippet; children: Snippet; } = $props(); @@ -122,7 +124,7 @@ {:else if title}
No activity yet
+Reactions, comments, and mentions will show up here
+{section.label}
++ {n.actorUsername} + {description(n)} +
+ {#if (n.type === 'comment' || n.type === 'reply' || n.type === 'mention') && n.commentPreview} +{n.commentPreview}
+ {/if} + {relativeTime(n.createdAt)} +