diff --git a/SharpbinV3.Client/README.md b/SharpbinV3.Client/README.md index 2e9282d..28fcc2e 100644 --- a/SharpbinV3.Client/README.md +++ b/SharpbinV3.Client/README.md @@ -51,4 +51,3 @@ The application will be available at http://localhost:5173. - Lucide Svelte for icons. - Highlight.js for syntax highlighting. - TypeScript for type safety. - diff --git a/SharpbinV3.Client/src/routes/+layout.server.ts b/SharpbinV3.Client/src/routes/+layout.server.ts index c171438..4ad6e13 100644 --- a/SharpbinV3.Client/src/routes/+layout.server.ts +++ b/SharpbinV3.Client/src/routes/+layout.server.ts @@ -4,7 +4,7 @@ export const load: LayoutServerLoad = async ({ fetch, url }) => { try { const res = await fetch('/api/auth/info'); const options = await res.json(); - return { options , url: url.href }; + return { options, url: url.href }; } catch { return { options: null, url: url.href }; } diff --git a/SharpbinV3.Client/src/routes/+page.server.ts b/SharpbinV3.Client/src/routes/+page.server.ts index ef17d69..56640b1 100644 --- a/SharpbinV3.Client/src/routes/+page.server.ts +++ b/SharpbinV3.Client/src/routes/+page.server.ts @@ -1,6 +1,6 @@ import type { PageServerLoad } from './$types'; -export const load: PageServerLoad = async ({ fetch,url }) => { +export const load: PageServerLoad = async ({ fetch, url }) => { try { const res = await fetch('/api/paste/create/options'); const options = await res.json(); diff --git a/SharpbinV3.Client/src/routes/+page.svelte b/SharpbinV3.Client/src/routes/+page.svelte index a9e8b5f..bae73a7 100644 --- a/SharpbinV3.Client/src/routes/+page.svelte +++ b/SharpbinV3.Client/src/routes/+page.svelte @@ -95,12 +95,12 @@ - + Create a Paste @@ -158,7 +158,7 @@ {#if error} {error} diff --git a/SharpbinV3.Client/src/routes/[id]/+page.svelte b/SharpbinV3.Client/src/routes/[id]/+page.svelte index 4c74312..321af02 100644 --- a/SharpbinV3.Client/src/routes/[id]/+page.svelte +++ b/SharpbinV3.Client/src/routes/[id]/+page.svelte @@ -283,7 +283,11 @@ - {data.paste ? (data.paste.title || 'Untitled Paste') + ' - Sharpbin' : 'Paste Not Found - Sharpbin'} + {data.paste + ? (data.paste.title || 'Untitled Paste') + ' - Sharpbin' + : 'Paste Not Found - Sharpbin'} {#if data.paste} - + {#if data.paste.editedAt} - + {/if} {#if data.paste.author} @@ -308,7 +318,7 @@ {data.user?.displayName || data.user?.username} - User Profile - - + + - + - + @@ -150,9 +159,11 @@ {:else if data.user?.roles.includes(1) || data.user?.roles.includes(255)} - - - + {#if data.user?.roles?.length} + + + + {/if} {:else}