From f201857d515f78bc99a2c5ffd49f07f8ea1bcca0 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sat, 12 Oct 2024 20:57:01 -0700 Subject: [PATCH] Bump Tauri to fix settings window --- src-tauri/Cargo.toml | 2 +- src-web/components/App.tsx | 2 +- src-web/hooks/useOpenSettings.tsx | 15 --------------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2da42f85..3d2ad737 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -66,4 +66,4 @@ eventsource-client = { git = "https://github.com/yaakapp/rust-eventsource-client yaak_models = { path = "yaak_models" } yaak_plugin_runtime = { path = "yaak_plugin_runtime" } tauri-plugin-shell = "2.0.1" -tauri = { version = "2.0.2", features = ["devtools", "protocol-asset"] } +tauri = { version = "2.0.3", features = ["devtools", "protocol-asset"] } diff --git a/src-web/components/App.tsx b/src-web/components/App.tsx index ff1480c6..154029b6 100644 --- a/src-web/components/App.tsx +++ b/src-web/components/App.tsx @@ -24,7 +24,7 @@ const queryClient = new QueryClient({ }, }); -const ENABLE_REACT_QUERY_DEVTOOLS = true; +const ENABLE_REACT_QUERY_DEVTOOLS = false; export function App() { return ( diff --git a/src-web/hooks/useOpenSettings.tsx b/src-web/hooks/useOpenSettings.tsx index dc39d8eb..62eb215d 100644 --- a/src-web/hooks/useOpenSettings.tsx +++ b/src-web/hooks/useOpenSettings.tsx @@ -1,31 +1,16 @@ import { useMutation } from '@tanstack/react-query'; -import { useDialog } from '../components/DialogContext'; -import Settings from '../components/Settings/Settings'; import { invokeCmd } from '../lib/tauri'; import { useActiveWorkspace } from './useActiveWorkspace'; import { useAppRoutes } from './useAppRoutes'; -import { useOsInfo } from './useOsInfo'; export function useOpenSettings() { const routes = useAppRoutes(); const workspace = useActiveWorkspace(); - const dialog = useDialog(); - const { osType } = useOsInfo(); return useMutation({ mutationKey: ['open_settings'], mutationFn: async () => { if (workspace == null) return; - // HACK: Show settings in dialog on Linux until this is fixed: https://github.com/tauri-apps/tauri/issues/11171 - if (osType === 'linux') { - dialog.show({ - id: 'settings', - size: 'lg', - render: ({ hide }) => , - }); - return; - } - await invokeCmd('cmd_new_child_window', { url: routes.paths.workspaceSettings({ workspaceId: workspace.id }), label: 'settings',