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.

feat: custom titlebar + branded NSIS installer

PurpleDoubleD1d08c757d860
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 278aa8af..da46f76c 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -1879,7 +1879,7 @@ checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
[[package]]
name = "locally-uncensored"
-version = "2.0.0"
+version = "2.2.0"
dependencies = [
"base64 0.22.1",
"dirs",
diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json
index 1540db67..f8d131f4 100644
--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -6,6 +6,12 @@
"permissions": [
"core:default",
"core:window:default",
+ "core:window:allow-minimize",
+ "core:window:allow-maximize",
+ "core:window:allow-unmaximize",
+ "core:window:allow-close",
+ "core:window:allow-is-maximized",
+ "core:window:allow-toggle-maximize",
"core:webview:default",
"shell:allow-spawn",
"shell:allow-stdin-write",
diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json
index 0fecc9ea..dbd0c881 100644
--- a/src-tauri/gen/schemas/capabilities.json
+++ b/src-tauri/gen/schemas/capabilities.json
@@ -1 +1 @@
-{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:window:default","core:webview:default","shell:allow-spawn","shell:allow-stdin-write","shell:allow-kill"]}}
\ No newline at end of file
+{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"permissions":["core:default","core:window:default","core:window:allow-minimize","core:window:allow-maximize","core:window:allow-unmaximize","core:window:allow-close","core:window:allow-is-maximized","core:window:allow-toggle-maximize","core:webview:default","shell:allow-spawn","shell:allow-stdin-write","shell:allow-kill"]}}
\ No newline at end of file
diff --git a/src-tauri/icons/nsis-header.bmp b/src-tauri/icons/nsis-header.bmp
new file mode 100644
index 00000000..bb668d4b
Binary files /dev/null and b/src-tauri/icons/nsis-header.bmp differ
diff --git a/src-tauri/icons/nsis-sidebar.bmp b/src-tauri/icons/nsis-sidebar.bmp
new file mode 100644
index 00000000..0f2a3508
Binary files /dev/null and b/src-tauri/icons/nsis-sidebar.bmp differ
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 468c4e9b..283291ef 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -18,7 +18,8 @@
"height": 800,
"resizable": true,
"fullscreen": false,
- "visible": false
+ "visible": false,
+ "decorations": false
}
],
"security": {
@@ -39,7 +40,10 @@
"windows": {
"nsis": {
"installMode": "both",
- "displayLanguageSelector": true
+ "displayLanguageSelector": true,
+ "installerIcon": "icons/icon.ico",
+ "headerImage": "icons/nsis-header.bmp",
+ "sidebarImage": "icons/nsis-sidebar.bmp"
}
}
}
diff --git a/src/components/layout/AppShell.tsx b/src/components/layout/AppShell.tsx
index 1a25c986..048baf37 100644
--- a/src/components/layout/AppShell.tsx
+++ b/src/components/layout/AppShell.tsx
@@ -15,6 +15,7 @@ import { useProviderStore } from '../../stores/providerStore'
import { detectLocalBackends, type DetectedBackend } from '../../lib/backend-detector'
import { useKeyboardShortcuts } from '../../hooks/useKeyboardShortcuts'
import { ShortcutsModal } from './ShortcutsModal'
+import { Titlebar } from './Titlebar'
export function AppShell() {
const { currentView } = useUIStore()
@@ -70,6 +71,7 @@ export function AppShell() {
return (
<div className="h-screen w-screen overflow-hidden bg-white dark:bg-[#0a0a0a] text-gray-900 dark:text-gray-100">
<div className="h-full flex flex-col">
+ <Titlebar />
<Header />
<div className="flex-1 flex overflow-hidden">
<Sidebar />
diff --git a/src/components/layout/Titlebar.tsx b/src/components/layout/Titlebar.tsx
new file mode 100644
index 00000000..0043ed69
--- /dev/null
+++ b/src/components/layout/Titlebar.tsx
@@ -0,0 +1,96 @@
+import { useEffect, useState } from 'react'
+import { Minus, Square, Copy, X } from 'lucide-react'
+
+const isTauri = typeof window !== 'undefined' && !!(window as any).__TAURI_INTERNALS__
+
+export function Titlebar() {
+ const [isMaximized, setIsMaximized] = useState(false)
+
+ useEffect(() => {
+ if (!isTauri) return
+
+ let unlisten: (() => void) | undefined
+
+ import('@tauri-apps/api/window').then(({ getCurrentWindow }) => {
+ const win = getCurrentWindow()
+ // Check initial state
+ win.isMaximized().then(setIsMaximized)
+
+ // Listen for resize to update maximize state
+ win.onResized(() => {
+ win.isMaximized().then(setIsMaximized)
+ }).then((fn) => { unlisten = fn })
+ })
+
+ return () => { unlisten?.() }
+ }, [])
+
+ if (!isTauri) return null
+
+ const handleMinimize = async () => {
+ const { getCurrentWindow } = await import('@tauri-apps/api/window')
+ getCurrentWindow().minimize()
+ }
+
+ const handleToggleMaximize = async () => {
+ const { getCurrentWindow } = await import('@tauri-apps/api/window')
+ getCurrentWindow().toggleMaximize()
+ }
+
+ const handleClose = async () => {
+ const { getCurrentWindow } = await import('@tauri-apps/api/window')
+ getCurrentWindow().close()
+ }
+
+ const btnBase = 'inline-flex items-center justify-center w-[46px] h-8 transition-colors'
+
+ return (
+ <div
+ data-tauri-drag-region
+ className="h-8 flex items-center justify-between bg-white dark:bg-[#0a0a0a] border-b border-gray-200 dark:border-white/[0.04] select-none"
+ >
+ {/* Left: App icon + title */}
+ <div data-tauri-drag-region className="flex items-center gap-1.5 pl-3">
+ <img
+ src="/LU-monogram-bw.png"
+ alt=""
+ width={12}
+ height={12}
+ className="dark:invert-0 invert opacity-60 pointer-events-none"
+ draggable={false}
+ />
+ <span
+ data-tauri-drag-region
+ className="text-[0.6rem] tracking-widest font-medium text-gray-400 dark:text-gray-500 uppercase pointer-events-none"
+ >
+ Locally Uncensored
+ </span>
+ </div>
+
+ {/* Right: Window controls */}
+ <div className="flex items-center">
+ <button
+ onClick={handleMinimize}
+ className={`${btnBase} text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-white/10`}
+ aria-label="Minimize"
+ >
+ <Minus size={14} strokeWidth={1.5} />
+ </button>
+ <button
+ onClick={handleToggleMaximize}
+ className={`${btnBase} text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-white/10`}
+ aria-label={isMaximized ? 'Restore' : 'Maximize'}
+ >
+ {isMaximized ? <Copy size={11} strokeWidth={1.5} /> : <Square size={11} strokeWidth={1.5} />}
+ </button>
+ <button
+ onClick={handleClose}
+ className={`${btnBase} text-gray-500 dark:text-gray-400 hover:bg-red-500 hover:text-white`}
+ aria-label="Close"
+ >
+ <X size={14} strokeWidth={1.5} />
+ </button>
+ </div>
+ </div>
+ )
+}
diff --git a/src/index.css b/src/index.css
index 06734a47..84b34d18 100644
--- a/src/index.css
+++ b/src/index.css
@@ -96,6 +96,16 @@ input[type="range"]::-webkit-slider-thumb {
margin-bottom: 0;
}
+/* Titlebar drag region */
+[data-tauri-drag-region] {
+ -webkit-app-region: drag;
+ user-select: none;
+}
+
+[data-tauri-drag-region] button {
+ -webkit-app-region: no-drag;
+}
+
/* Selection */
::selection {
background: rgba(100, 100, 100, 0.3);