Changes for commercial use (#138)

This commit is contained in:
Gregory Schier
2024-12-03 09:28:27 -08:00
committed by GitHub
parent 2b076c90e4
commit 88bcfb9e66
49 changed files with 1072 additions and 96 deletions

View File

@@ -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],