Compare commits

...

2 Commits

Author SHA1 Message Date
JCEEE 268c0157cb 1.10.1 2026-09-08 19:05:12 +01:00
JCEEE 6ed1805884 fix sveltekit load / preload bug on logout 2026-09-08 19:05:04 +01:00
4 changed files with 63 additions and 16 deletions
+25 -4
View File
@@ -68,10 +68,19 @@
<div class="sidebar-footer">
{#each footerItems as item}
<a href={item.href} class="nav-item">
{@html item.icon}
<span class="nav-label">{item.label}</span>
</a>
{#if item.href === '/logout'}
<form method="POST" action="/logout" class="nav-item-form">
<button type="submit" class="nav-item nav-item-button" aria-label="Log out">
{@html item.icon}
<span class="nav-label">{item.label}</span>
</button>
</form>
{:else}
<a href={item.href} class="nav-item">
{@html item.icon}
<span class="nav-label">{item.label}</span>
</a>
{/if}
{/each}
</div>
</aside>
@@ -143,6 +152,18 @@
background: #3730a3;
color: #e0e7ff;
}
.nav-item-form {
margin: 0 0.3rem;
}
.nav-item-button {
font-family: inherit;
background: none;
border: none;
box-sizing: border-box;
text-align: left;
cursor: pointer;
width: 100%;
}
.nav-item.active {
background: #4338ca;
color: #fff;
+37 -6
View File
@@ -6,13 +6,44 @@
<div class="error-page">
<h1>Something went wrong</h1>
<p>{error?.message || 'An unexpected error occurred.'}</p>
<p class="hint">Try <a href="/logout">logging out</a> and signing in again.</p>
<div class="hint">
Try
<form method="POST" action="/logout" class="inline-form">
<button type="submit" class="link-button">logging out</button>
</form>
and signing in again.
</div>
</div>
<style>
.error-page { max-width: 480px; margin: 4rem auto; text-align: center; padding: 2rem; }
h1 { font-size: 1.5rem; color: #111827; margin-bottom: 0.5rem; }
p { color: #6b7280; }
.hint { margin-top: 1.5rem; font-size: 0.9rem; }
a { color: #6366f1; }
.error-page {
max-width: 480px;
margin: 4rem auto;
text-align: center;
padding: 2rem;
}
h1 {
font-size: 1.5rem;
color: #111827;
margin-bottom: 0.5rem;
}
p {
color: #6b7280;
}
.hint {
margin-top: 1.5rem;
font-size: 0.9rem;
}
.inline-form {
display: inline-block;
}
.link-button {
background: none;
border: none;
padding: 0;
font: inherit;
color: #6366f1;
text-decoration: underline;
cursor: pointer;
}
</style>
@@ -6,11 +6,6 @@ function signOut(event: { cookies: any }) {
clearLegacyCookies(event.cookies);
}
export function load(event) {
signOut(event);
throw redirect(303, '/');
}
export const actions = {
default: (event) => {
signOut(event);
+1 -1
View File
@@ -13,5 +13,5 @@
"esbuild"
]
},
"version": "1.10.0"
"version": "1.10.1"
}