argument with options treat as enum

This commit is contained in:
codetypes committed 2025-03-25 22:40:40 +08:00
1 parent 49bfc76fc6
commit 767d8aba95
14 files changed
+105 -133

No files matched your search

+2 -2
View File
@@ -291,7 +291,7 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
const workspace = get();
let buildScript = dialog.showOpenDialogSync({
properties: ["openFile"],
defaultPath: workspace.workdir,
defaultPath: workspace.workdir.replaceAll("/", Path.sep),
filters: [{ name: "Javascript", extensions: ["js"] }],
})?.[0];
if (buildScript) {
@@ -412,7 +412,7 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
const workspace = get();
const scriptPath = dialog.showOpenDialogSync({
properties: ["openFile"],
defaultPath: workspace.workdir,
defaultPath: workspace.workdir.replaceAll("/", Path.sep),
filters: [{ name: "Javascript", extensions: ["js"] }],
})?.[0];
if (scriptPath) {