style: format via prettier

This commit is contained in:
2026-03-27 20:21:47 -04:00
parent 27093acadf
commit 6a59b72d08
2 changed files with 21 additions and 12 deletions
@@ -41,7 +41,10 @@
}); });
</script> </script>
<div class="sticky top-0 left-0 z-100 h-15 w-full border-b border-neutral-800 bg-neutral-900 shadow-md" id="navbar"> <div
class="sticky top-0 left-0 z-100 h-15 w-full border-b border-neutral-800 bg-neutral-900 shadow-md"
id="navbar"
>
<div class="mx-auto hidden h-15 w-[95%] max-w-7xl items-center py-2 md:flex"> <div class="mx-auto hidden h-15 w-[95%] max-w-7xl items-center py-2 md:flex">
<div class="flex items-center gap-6"> <div class="flex items-center gap-6">
<a href={resolve('/')} class="group flex items-center gap-2"> <a href={resolve('/')} class="group flex items-center gap-2">
@@ -60,12 +63,14 @@
{#if hasRole($user.roles, 2) || hasRole($user.roles, 4)} {#if hasRole($user.roles, 2) || hasRole($user.roles, 4)}
<a <a
href={resolve('/reports')} href={resolve('/reports')}
class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600">Reports</a class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600"
>Reports</a
> >
{/if} {/if}
<a <a
href={resolve(`/user/${$user.username}`)} href={resolve(`/user/${$user.username}`)}
class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600">Profile</a class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600"
>Profile</a
> >
<button <button
on:click={logout} on:click={logout}
@@ -77,13 +82,14 @@
<div class="ml-auto flex items-center space-x-4"> <div class="ml-auto flex items-center space-x-4">
<a <a
href={resolve(`/login${returnParam}`)} href={resolve(`/login${returnParam}`)}
class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600">Login</a class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600"
>Login</a
> >
<!-- eslint-disable svelte/no-navigation-without-resolve --> <!-- eslint-disable svelte/no-navigation-without-resolve -->
<a <a
href={data.options?.registration_enabled ? resolve(`/register${returnParam}`) : '#'} href={data.options?.registration_enabled ? resolve(`/register${returnParam}`) : '#'}
class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600 {data.options class="rounded bg-neutral-700 px-3 py-1 text-white transition-colors hover:bg-neutral-600 {data
?.registration_enabled .options?.registration_enabled
? '' ? ''
: 'cursor-not-allowed bg-neutral-800 text-neutral-500!'}">Register</a : 'cursor-not-allowed bg-neutral-800 text-neutral-500!'}">Register</a
> >
+5 -2
View File
@@ -97,9 +97,12 @@ async function deleteCacheEntry(id: string, relativePath?: string): Promise<void
const db = getDatabase(); const db = getDatabase();
const resolvedPath = const resolvedPath =
relativePath ?? relativePath ??
((db (
db
.prepare('SELECT relative_path AS relativePath FROM og_image_cache WHERE paste_id = ?') .prepare('SELECT relative_path AS relativePath FROM og_image_cache WHERE paste_id = ?')
.get(id) as { relativePath: string } | undefined)?.relativePath ?? null); .get(id) as { relativePath: string } | undefined
)?.relativePath ??
null;
db.prepare('DELETE FROM og_image_cache WHERE paste_id = ?').run(id); db.prepare('DELETE FROM og_image_cache WHERE paste_id = ?').run(id);
if (resolvedPath) { if (resolvedPath) {