mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-01 06:53:11 +02:00
Changes for commercial use (#138)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import type { SettingsTab } from '../components/Settings/Settings';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { useActiveWorkspace } from './useActiveWorkspace';
|
||||
import { useAppRoutes } from './useAppRoutes';
|
||||
@@ -8,15 +9,11 @@ export function useOpenSettings() {
|
||||
const workspace = useActiveWorkspace();
|
||||
return useMutation({
|
||||
mutationKey: ['open_settings'],
|
||||
mutationFn: async () => {
|
||||
mutationFn: async (tab?: SettingsTab) => {
|
||||
if (workspace == null) return;
|
||||
|
||||
await invokeCmd('cmd_new_child_window', {
|
||||
url: routes.paths.workspaceSettings({
|
||||
workspaceId: workspace.id,
|
||||
cookieJarId: null,
|
||||
environmentId: null,
|
||||
}),
|
||||
url: routes.paths.workspaceSettings({ workspaceId: workspace.id, tab }),
|
||||
label: 'settings',
|
||||
title: 'Yaak Settings',
|
||||
innerSize: [600, 550],
|
||||
|
||||
Reference in New Issue
Block a user