defaults to project folders; examining zones

This commit is contained in:
2026-04-15 17:31:41 -06:00
parent 024b9bd806
commit 48d761c713
3 changed files with 78 additions and 15 deletions

View File

@ -42,15 +42,21 @@ window.electronAPI = {
},
openProject: async (): Promise<string | null> => {
const projectDir = await invoke<string>('get_projects_directory');
const result = await open({
multiple: false,
defaultPath: projectDir,
filters: PROJECT_FILTERS,
});
return typeof result === 'string' ? result : null;
},
saveProject: async (): Promise<string | null> => {
const result = await save({ filters: PROJECT_FILTERS });
const projectDir = await invoke<string>('get_projects_directory');
const result = await save({
defaultPath: `${projectDir}/project.aive`,
filters: PROJECT_FILTERS,
});
return result ?? null;
},