From 11b7322172f5e96e7b9ec9b108aa8b02b7bd08bd Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Thu, 17 Jul 2025 17:38:00 -0700 Subject: [PATCH] Add a drag area --- src-tauri/capabilities/default.json | 4 +++- src/componets/Sidebar.tsx | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 2e5338d..290df73 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -8,6 +8,8 @@ "permissions": [ "core:default", "opener:default", - "os:default" + "os:default", + "core:window:default", + "core:window:allow-start-dragging" ] } \ No newline at end of file diff --git a/src/componets/Sidebar.tsx b/src/componets/Sidebar.tsx index d529053..8f4e51c 100644 --- a/src/componets/Sidebar.tsx +++ b/src/componets/Sidebar.tsx @@ -6,6 +6,7 @@ import { faCog, faServer } from '@fortawesome/free-solid-svg-icons' import { faDiscord } from '@fortawesome/free-brands-svg-icons' import { useState } from 'react' import { platform } from '@tauri-apps/plugin-os' +import { getCurrentWindow } from '@tauri-apps/api/window' const Sidebar = () => { const [rot, setRot] = useState(0) @@ -13,6 +14,23 @@ const Sidebar = () => { return (