forked from 1b-agent/opencadstudio-upstream
feat(save-dialog): extend drive navigation to macOS and Linux
Issue #170's fix added a "This PC" volumes root above the drive letters on Windows. Generalize it so the Save As dialog can switch volumes on every platform: - parent_folder() now climbs the filesystem root into the volumes list on all platforms (`/` -> Computer), not just Windows. - available_drives() is platform-specific: Windows probes A:-Z:, macOS lists `/` + /Volumes/*, Linux lists `/` + the removable mounts under /run/media/$USER, /media/$USER and /mnt. Other Unix and wasm fall back to `/`. - drives_root_label() shows "This PC" on Windows, "Computer" elsewhere. - read_dir_entries() lists the volumes at the drives root on every platform. Also gitignore the dist/ web build output so the wasm binary is never committed by accident. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
ef229f5d85
commit
125b89d8da
2 files changed
+99
-32
No files matched your search
+1
-1
@@ -3472,7 +3472,7 @@ fn save_as_dialog_window<'a>(
|
||||
|
||||
// ── Path bar ─────────────────────────────────────────────────────────
|
||||
let path_str = if crate::io::is_drives_root(folder) {
|
||||
"This PC".to_string()
|
||||
crate::io::drives_root_label().to_string()
|
||||
} else {
|
||||
folder.to_string_lossy().into_owned()
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user