mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 01:14:27 +02: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_models = { path = "yaak_models" }
|
||||||
yaak_plugin_runtime = { path = "yaak_plugin_runtime" }
|
yaak_plugin_runtime = { path = "yaak_plugin_runtime" }
|
||||||
tauri-plugin-shell = "2.0.1"
|
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() {
|
export function App() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,31 +1,16 @@
|
|||||||
import { useMutation } from '@tanstack/react-query';
|
import { useMutation } from '@tanstack/react-query';
|
||||||
import { useDialog } from '../components/DialogContext';
|
|
||||||
import Settings from '../components/Settings/Settings';
|
|
||||||
import { invokeCmd } from '../lib/tauri';
|
import { invokeCmd } from '../lib/tauri';
|
||||||
import { useActiveWorkspace } from './useActiveWorkspace';
|
import { useActiveWorkspace } from './useActiveWorkspace';
|
||||||
import { useAppRoutes } from './useAppRoutes';
|
import { useAppRoutes } from './useAppRoutes';
|
||||||
import { useOsInfo } from './useOsInfo';
|
|
||||||
|
|
||||||
export function useOpenSettings() {
|
export function useOpenSettings() {
|
||||||
const routes = useAppRoutes();
|
const routes = useAppRoutes();
|
||||||
const workspace = useActiveWorkspace();
|
const workspace = useActiveWorkspace();
|
||||||
const dialog = useDialog();
|
|
||||||
const { osType } = useOsInfo();
|
|
||||||
return useMutation({
|
return useMutation({
|
||||||
mutationKey: ['open_settings'],
|
mutationKey: ['open_settings'],
|
||||||
mutationFn: async () => {
|
mutationFn: async () => {
|
||||||
if (workspace == null) return;
|
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', {
|
await invokeCmd('cmd_new_child_window', {
|
||||||
url: routes.paths.workspaceSettings({ workspaceId: workspace.id }),
|
url: routes.paths.workspaceSettings({ workspaceId: workspace.id }),
|
||||||
label: 'settings',
|
label: 'settings',
|
||||||
|
|||||||
Reference in New Issue
Block a user