diff --git a/SharpbinV3.Client/src/lib/components/Modal.svelte b/SharpbinV3.Client/src/lib/components/Modal.svelte index 0d23748..6b0b19e 100644 --- a/SharpbinV3.Client/src/lib/components/Modal.svelte +++ b/SharpbinV3.Client/src/lib/components/Modal.svelte @@ -1,19 +1,26 @@ {#if show} @@ -68,6 +80,26 @@ /> {/if} + {#if mode === 'multiselect'} +
+ {#each items as item} + + {/each} +
+ {/if} + {#if error}
{error} @@ -78,7 +110,9 @@ {#if error} diff --git a/SharpbinV3.Client/src/routes/[id]/+page.svelte b/SharpbinV3.Client/src/routes/[id]/+page.svelte index cf4b787..b1dd864 100644 --- a/SharpbinV3.Client/src/routes/[id]/+page.svelte +++ b/SharpbinV3.Client/src/routes/[id]/+page.svelte @@ -60,10 +60,11 @@ : false; let interval: ReturnType | null = null; - const syntaxOptions = data.options?.syntaxes?.map((lang: string) => ({ - value: lang, - label: displayNames[lang] ?? lang.charAt(0).toUpperCase() + lang.slice(1) - })) ?? []; + const syntaxOptions = + data.options?.syntaxes?.map((lang: string) => ({ + value: lang, + label: displayNames[lang] ?? lang.charAt(0).toUpperCase() + lang.slice(1) + })) ?? []; const expiresOptions = [ { value: 0, label: 'Never Expire' }, { value: 600000, label: 'Expire in 10 Minutes' }, @@ -79,12 +80,11 @@ { value: 157680000000, label: 'Expire in 5 Years' }, { value: 315360000000, label: 'Expire in 10 Years' } ]; - const visibilityOptions = data.options?.visibilities?.map( - (visibility: { value: number; displayName: string }) => ({ + const visibilityOptions = + data.options?.visibilities?.map((visibility: { value: number; displayName: string }) => ({ value: visibility.value, label: visibility.displayName - }) - ) ?? []; + })) ?? []; onMount(() => { interval = setInterval(() => { @@ -559,7 +559,7 @@ alert('Failed to delete paste.'); } } - }) + }); }} > @@ -647,13 +647,11 @@ modalResolve = null; } }} - title={ - modalMode === 'decrypt' - ? 'Decrypt Paste' - : modalMode === 'encrypt' + title={modalMode === 'decrypt' + ? 'Decrypt Paste' + : modalMode === 'encrypt' ? 'Encrypt Paste' - : 'Are you sure you want to delete this paste?' - } + : 'Are you sure you want to delete this paste?'} /> \ No newline at end of file + diff --git a/SharpbinV3.Client/src/routes/user/[username]/+page.svelte b/SharpbinV3.Client/src/routes/user/[username]/+page.svelte index 233d0b3..50ee484 100644 --- a/SharpbinV3.Client/src/routes/user/[username]/+page.svelte +++ b/SharpbinV3.Client/src/routes/user/[username]/+page.svelte @@ -1,45 +1,59 @@