Bump Tauri to fix settings window

This commit is contained in:
Gregory Schier
2024-10-12 20:57:01 -07:00
parent 0d982057a5
commit f201857d51
3 changed files with 2 additions and 17 deletions

View File

@@ -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"] }

View File

@@ -24,7 +24,7 @@ const queryClient = new QueryClient({
},
});
const ENABLE_REACT_QUERY_DEVTOOLS = true;
const ENABLE_REACT_QUERY_DEVTOOLS = false;
export function App() {
return (

View File

@@ -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 }) => <Settings hide={hide} />,
});
return;
}
await invokeCmd('cmd_new_child_window', {
url: routes.paths.workspaceSettings({ workspaceId: workspace.id }),
label: 'settings',