Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix: CSP font-src, nav compare reset, production polish

PurpleDoubleDe3f655821cf0
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index a18a46b8..bdf7dd32 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -22,7 +22,7 @@
}
],
"security": {
- "csp": "default-src 'self' http://ipc.localhost; connect-src 'self' http://ipc.localhost http://tauri.localhost http://localhost:* http://127.0.0.1:* https://civitai.com https://*.civitai.com https://huggingface.co https://*.huggingface.co https://ollama.com ws://localhost:8188 ws://127.0.0.1:8188; img-src 'self' data: blob: http://localhost:8188 http://127.0.0.1:8188 https://*.civitai.com https://*.githubusercontent.com; media-src 'self' blob: http://localhost:8188 http://127.0.0.1:8188; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"
+ "csp": "default-src 'self' http://ipc.localhost; connect-src 'self' http://ipc.localhost http://tauri.localhost http://localhost:* http://127.0.0.1:* https://civitai.com https://*.civitai.com https://huggingface.co https://*.huggingface.co https://ollama.com ws://localhost:8188 ws://127.0.0.1:8188; img-src 'self' data: blob: http://localhost:8188 http://127.0.0.1:8188 https://*.civitai.com https://*.githubusercontent.com; media-src 'self' blob: http://localhost:8188 http://127.0.0.1:8188; font-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"
}
},
"bundle": {
diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx
index 0e13654e..8b7ab41c 100644
--- a/src/components/layout/Header.tsx
+++ b/src/components/layout/Header.tsx
@@ -14,11 +14,15 @@ export function Header() {
updateSettings({ theme: settings.theme === 'dark' ? 'light' : 'dark' })
}
- const navBtn = (view: string, icon: React.ReactNode, title: string, isActive?: boolean) => (
+ const navBtn = (view: string, icon: React.ReactNode, title: string) => (
<button
- onClick={() => setView(view as any)}
+ onClick={() => {
+ // Always reset compare mode when navigating away
+ if (view !== 'chat' || view === 'chat') useCompareStore.getState().setComparing(false)
+ setView(view as any)
+ }}
className={`p-1.5 rounded-md transition-colors ${
- isActive ?? currentView === view
+ currentView === view && !isComparing
? 'bg-gray-200 dark:bg-white/10 text-gray-900 dark:text-white'
: 'text-gray-500 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-white/5'
}`}
@@ -64,7 +68,7 @@ export function Header() {
>
{settings.theme === 'dark' ? <Sun size={14} /> : <Moon size={14} />}
</button>
- {navBtn('chat', <MessageSquare size={14} />, 'Chat', currentView === 'chat' && !isComparing)}
+ {navBtn('chat', <MessageSquare size={14} />, 'Chat')}
{navBtn('create', <Film size={14} />, 'Create')}
<button
onClick={() => { useCompareStore.getState().setComparing(true); setView('chat') }}