Save As: use save dialog so user can type a new project name
All checks were successful
Release / Bump version and tag (push) Successful in 4s
Release / Build App (macOS) (push) Successful in 1m20s
Release / Build App (Windows) (push) Successful in 3m5s
Release / Build App (Linux) (push) Successful in 3m44s

Changed from folder picker (can only select existing folders) to save
dialog where the user can type a new name. The typed name becomes the
project folder, created automatically if it doesn't exist. Any file
extension the user types is stripped (e.g. "My Project.vtn" becomes
the folder "My Project/").

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-23 10:24:58 -07:00
parent ac0fe3b4c7
commit fc5cfc4374

View File

@@ -225,12 +225,18 @@
} }
async function saveProjectAs() { async function saveProjectAs() {
const folderPath = await open({ // Use save dialog so the user can type a new project name.
directory: true, // The chosen path is treated as the project folder (created if needed).
title: 'Choose a folder to save the project', const defaultName = currentProjectName || 'Untitled';
const chosenPath = await save({
defaultPath: defaultName,
title: 'Save Project — enter a project name',
}); });
if (!folderPath) return; if (!chosenPath) return;
await saveToFolder(folderPath as string);
// Strip any file extension the user may have typed (e.g. ".vtn")
const folderPath = chosenPath.replace(/\.[^.\\/]+$/, '');
await saveToFolder(folderPath);
} }
async function openProject() { async function openProject() {