diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index b75b73f..e6f4c90 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -5,6 +5,10 @@ "windows": ["main"], "permissions": [ "core:default", + "core:window:allow-minimize", + "core:window:allow-toggle-maximize", + "core:window:allow-close", + "core:window:allow-start-dragging", "dialog:default", "notification:default" ] diff --git a/src/components/layout/AppLayout.tsx b/src/components/layout/AppLayout.tsx index 89d460f..289afc6 100644 --- a/src/components/layout/AppLayout.tsx +++ b/src/components/layout/AppLayout.tsx @@ -1,9 +1,18 @@ +import { getCurrentWindow } from "@tauri-apps/api/window"; import { Outlet } from "react-router-dom"; import NotificationCenter from "./NotificationCenter"; import Sidebar from "./Sidebar"; import WindowControls from "./WindowControls"; export default function AppLayout() { + async function startDragging() { + try { + await getCurrentWindow().startDragging(); + } catch (error) { + console.error("Unable to drag window:", error); + } + } + return (