mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-24 19:44:53 +01:00
23 lines
724 B
TypeScript
23 lines
724 B
TypeScript
import type {
|
|
WorkspaceSettingsTab} from '../components/WorkspaceSettingsDialog';
|
|
import {
|
|
WorkspaceSettingsDialog
|
|
} from '../components/WorkspaceSettingsDialog';
|
|
import { activeWorkspaceIdAtom } from '../hooks/useActiveWorkspace';
|
|
import { showDialog } from '../lib/dialog';
|
|
import { jotaiStore } from '../lib/jotai';
|
|
|
|
export function openWorkspaceSettings(tab?: WorkspaceSettingsTab) {
|
|
const workspaceId = jotaiStore.get(activeWorkspaceIdAtom);
|
|
showDialog({
|
|
id: 'workspace-settings',
|
|
title: 'Workspace Settings',
|
|
size: 'lg',
|
|
className: 'h-[50rem]',
|
|
noPadding: true,
|
|
render({ hide }) {
|
|
return <WorkspaceSettingsDialog workspaceId={workspaceId} hide={hide} tab={tab} />;
|
|
},
|
|
});
|
|
}
|