mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-18 22:48:23 +01:00
17 lines
584 B
TypeScript
17 lines
584 B
TypeScript
import type {
|
|
WorkspaceSettingsHighlight,
|
|
WorkspaceSettingsTab,
|
|
} from "../components/WorkspaceSettingsDialog";
|
|
import { WorkspaceSettingsDialog } from "../components/WorkspaceSettingsDialog";
|
|
import { activeWorkspaceIdAtom } from "../hooks/useActiveWorkspace";
|
|
import { jotaiStore } from "../lib/jotai";
|
|
|
|
export function openWorkspaceSettings(
|
|
tab?: WorkspaceSettingsTab,
|
|
highlight?: WorkspaceSettingsHighlight,
|
|
) {
|
|
const workspaceId = jotaiStore.get(activeWorkspaceIdAtom);
|
|
if (workspaceId == null) return;
|
|
WorkspaceSettingsDialog.show(workspaceId, tab, highlight);
|
|
}
|