webui: switch to hash-based routing (alternative of #16079) (#16157)

* Switched web UI to hash-based routing

* Added hash to missed goto function call

* Removed outdated SPA handling code

* Fixed broken sidebar home link
This commit is contained in:
Isaac McFadyen authored and GitHub committed 2025-09-26 18:36:48 +03:00
1 parent 5d0a40f390
commit e0539eb6ae
14 files changed
+22 -57

No files matched your search

@@ -64,13 +64,13 @@
searchQuery = '';
}
await goto(`/chat/${id}`);
await goto(`#/chat/${id}`);
}
</script>
<ScrollArea class="h-[100vh]">
<Sidebar.Header class=" top-0 z-10 gap-6 bg-sidebar/50 px-4 pt-4 pb-2 backdrop-blur-lg md:sticky">
<a href="/" onclick={handleMobileSidebarItemClick}>
<a href="#/" onclick={handleMobileSidebarItemClick}>
<h1 class="inline-flex items-center gap-1 px-2 text-xl font-semibold">llama.cpp</h1>
</a>
@@ -51,7 +51,7 @@
{:else}
<Button
class="w-full justify-between hover:[&>kbd]:opacity-100"
href="/?new_chat=true"
href="?new_chat=true#/"
onclick={handleMobileSidebarItemClick}
variant="ghost"
>