diff --git a/desktop/src-tauri/capabilities/default.json b/desktop/src-tauri/capabilities/default.json index 132127fbc8..85fbde981c 100644 --- a/desktop/src-tauri/capabilities/default.json +++ b/desktop/src-tauri/capabilities/default.json @@ -7,6 +7,7 @@ "core:default", "core:webview:allow-set-webview-zoom", "core:window:allow-start-dragging", + "core:window:allow-toggle-maximize", "core:window:allow-show", "core:window:allow-close", "notification:default", diff --git a/desktop/src/features/chat/ui/ChatHeader.tsx b/desktop/src/features/chat/ui/ChatHeader.tsx index 2dc65470a2..ddc2406860 100644 --- a/desktop/src/features/chat/ui/ChatHeader.tsx +++ b/desktop/src/features/chat/ui/ChatHeader.tsx @@ -1,4 +1,3 @@ -import { getCurrentWindow } from "@tauri-apps/api/window"; import { Bot, CircleDot, FileText, Hash, Home, Settings2 } from "lucide-react"; import type * as React from "react"; @@ -43,20 +42,6 @@ function ChannelIcon({ return ; } -function handlePointerDown(e: React.PointerEvent) { - if (e.button !== 0) return; - const target = e.target as HTMLElement; - if ( - target.closest( - 'button, a, input, textarea, select, [role="button"], [role="textbox"], [contenteditable="true"]', - ) - ) { - return; - } - e.preventDefault(); - getCurrentWindow().startDragging(); -} - export function ChatHeader({ actions, title, @@ -69,7 +54,7 @@ export function ChatHeader({
diff --git a/desktop/src/features/settings/ui/SettingsView.tsx b/desktop/src/features/settings/ui/SettingsView.tsx index 12bf121f92..7d87fb2ba8 100644 --- a/desktop/src/features/settings/ui/SettingsView.tsx +++ b/desktop/src/features/settings/ui/SettingsView.tsx @@ -1,6 +1,4 @@ -import { getCurrentWindow } from "@tauri-apps/api/window"; import { X } from "lucide-react"; -import type * as React from "react"; import { cn } from "@/shared/lib/cn"; import { Button } from "@/shared/ui/button"; @@ -22,20 +20,6 @@ type SettingsViewProps = SettingsPanelProps & { section: SettingsSection; }; -function handleSettingsHeaderPointerDown(event: React.PointerEvent) { - if (event.button !== 0) { - return; - } - - const target = event.target as HTMLElement; - if (target.closest('button, a, input, textarea, [role="button"]')) { - return; - } - - event.preventDefault(); - getCurrentWindow().startDragging(); -} - function SettingsSectionButton({ active, onSelect, @@ -100,7 +84,7 @@ export function SettingsView({ >

- +