* 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:
@@ -17,7 +17,7 @@
|
||||
|
||||
function handleRetry() {
|
||||
// Navigate back to home page after successful API key validation
|
||||
goto('/');
|
||||
goto('#/');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
onclick={() => goto('/')}
|
||||
onclick={() => goto('#/')}
|
||||
class="rounded-md bg-primary px-4 py-2 text-primary-foreground hover:bg-primary/90"
|
||||
>
|
||||
Go Home
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
if (isCtrlOrCmd && event.shiftKey && event.key === 'o') {
|
||||
event.preventDefault();
|
||||
goto('/?new_chat=true');
|
||||
goto('?new_chat=true#/');
|
||||
}
|
||||
|
||||
if (event.shiftKey && isCtrlOrCmd && event.key === 'e') {
|
||||
@@ -115,7 +115,7 @@
|
||||
headers.Authorization = `Bearer ${apiKey.trim()}`;
|
||||
}
|
||||
|
||||
fetch('/props', { headers })
|
||||
fetch(`./props`, { headers })
|
||||
.then((response) => {
|
||||
if (response.status === 401 || response.status === 403) {
|
||||
window.location.reload();
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export const csr = true;
|
||||
export const prerender = false;
|
||||
export const ssr = false;
|
||||
@@ -26,7 +26,7 @@
|
||||
await gracefulStop();
|
||||
|
||||
if (to?.url) {
|
||||
await goto(to.url.pathname + to.url.search);
|
||||
await goto(to.url.pathname + to.url.search + to.url.hash);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -44,7 +44,7 @@
|
||||
const success = await chatStore.loadConversation(chatId);
|
||||
|
||||
if (!success) {
|
||||
await goto('/');
|
||||
await goto('#/');
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user