fix buttons

This commit is contained in:
2025-04-26 16:23:31 +02:00
parent 5cb335774b
commit 73d593450e
4 changed files with 6 additions and 6 deletions

View File

@@ -37,11 +37,11 @@
}
</script>
<div class="dropdown dropdown-end block">
<div class="dropdown dropdown-end">
<select
bind:value={current_theme}
data-choose-theme
class="btn btn-ghost btn-xs"
class="btn btn-ghost btn-xs min-h-0 h-8 px-4 py-0 text-sm"
onchange={set_theme}
>
<option value="" disabled={current_theme !== ''}>

View File

@@ -4,5 +4,5 @@
</script>
{#if show}
<a class="btn btn-error btn-xs" href="/logout">{logout()}</a>
<a class="btn btn-error btn-xs min-h-0 h-8 px-4 py-0 text-sm" href="/logout">{logout()}</a>
{/if}

View File

@@ -10,7 +10,7 @@
<ParaglideJS {i18n}>
{@render children()}
<div class="flex flex-row absolute top-2 right-2">
<div class="flex flex-row absolute top-2 right-2 items-center gap-2">
<ThemeButton />
<Logout show={!page.url.pathname.includes("login")}/>
</div>

View File

@@ -3,13 +3,13 @@ import { invalidateSession, deleteSessionTokenCookie } from '$lib/server/session
import type { RequestEvent } from './$types';
export function GET(event: RequestEvent): Response {
export async function GET(event: RequestEvent): Promise<Response> {
if (event.locals.session === null) {
return redirect(302, '/login');
}
if (event.platform && event.platform.env && event.platform.env.GH_SESSIONS) {
invalidateSession(event.locals.session.id, event.platform.env.GH_SESSIONS);
await invalidateSession(event.locals.session.id, event.platform.env.GH_SESSIONS);
} else {
return error(500, { message: 'Server configuration error' });
}