mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-14 06:16:08 +01:00
Bump Tauri to fix settings window
This commit is contained in:
@@ -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"] }
|
||||
|
||||
@@ -24,7 +24,7 @@ const queryClient = new QueryClient({
|
||||
},
|
||||
});
|
||||
|
||||
const ENABLE_REACT_QUERY_DEVTOOLS = true;
|
||||
const ENABLE_REACT_QUERY_DEVTOOLS = false;
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user