Replace logout button with non-interactive div
Browse filesThe logout button in NavMenu.svelte has been replaced with a non-interactive div. This removes the logout functionality from the menu, possibly to change the user interaction or prepare for a different logout mechanism.
src/lib/components/NavMenu.svelte
CHANGED
|
@@ -158,13 +158,7 @@
|
|
| 158 |
class="flex touch-none flex-col gap-1 rounded-r-xl border border-l-0 border-gray-100 p-3 text-sm dark:border-transparent md:mt-3 md:bg-gradient-to-l md:from-gray-50 md:dark:from-gray-800/30"
|
| 159 |
>
|
| 160 |
{#if user?.username || user?.email}
|
| 161 |
-
<
|
| 162 |
-
onclick={async () => {
|
| 163 |
-
await fetch(`${base}/logout`, {
|
| 164 |
-
method: "POST",
|
| 165 |
-
});
|
| 166 |
-
await goto(base + "/", { invalidateAll: true });
|
| 167 |
-
}}
|
| 168 |
class="group flex items-center gap-1.5 rounded-lg pl-2.5 pr-2 hover:bg-gray-100 dark:hover:bg-gray-700"
|
| 169 |
>
|
| 170 |
<span
|
|
@@ -177,7 +171,7 @@
|
|
| 177 |
class="ml-auto size-4 rounded-full border bg-gray-500 dark:border-white/40"
|
| 178 |
alt=""
|
| 179 |
/>
|
| 180 |
-
</
|
| 181 |
{/if}
|
| 182 |
<a
|
| 183 |
href="{base}/models"
|
|
|
|
| 158 |
class="flex touch-none flex-col gap-1 rounded-r-xl border border-l-0 border-gray-100 p-3 text-sm dark:border-transparent md:mt-3 md:bg-gradient-to-l md:from-gray-50 md:dark:from-gray-800/30"
|
| 159 |
>
|
| 160 |
{#if user?.username || user?.email}
|
| 161 |
+
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
class="group flex items-center gap-1.5 rounded-lg pl-2.5 pr-2 hover:bg-gray-100 dark:hover:bg-gray-700"
|
| 163 |
>
|
| 164 |
<span
|
|
|
|
| 171 |
class="ml-auto size-4 rounded-full border bg-gray-500 dark:border-white/40"
|
| 172 |
alt=""
|
| 173 |
/>
|
| 174 |
+
</div>
|
| 175 |
{/if}
|
| 176 |
<a
|
| 177 |
href="{base}/models"
|