deleted export
This commit is contained in:
40
src/App.tsx
40
src/App.tsx
@@ -3423,12 +3423,24 @@ function AppShell({
|
||||
outPath = `${outPath}.${wantExt}`;
|
||||
}
|
||||
setBusy(true);
|
||||
// Match the Visibility panel's own toggles so what's exported mirrors
|
||||
// what the user is looking at on the map:
|
||||
// Only deleted → deleted rows only
|
||||
// Show deleted → live + deleted in one export
|
||||
// (neither on) → live rows only (default)
|
||||
const count = await invoke<number>("export_assets", {
|
||||
path: outPath,
|
||||
format: exportFormat,
|
||||
includeDeleted: showDeleted,
|
||||
onlyDeleted: onlyDeleted,
|
||||
});
|
||||
setStatus(`Exported ${count} asset(s) to ${outPath}`);
|
||||
showToast(`Exported ${count} asset(s) (${exportFormat})`);
|
||||
const scopeLabel = onlyDeleted
|
||||
? "deleted-only"
|
||||
: showDeleted
|
||||
? "live + deleted"
|
||||
: "live";
|
||||
setStatus(`Exported ${count} asset(s) to ${outPath} (${scopeLabel})`);
|
||||
showToast(`Exported ${count} asset(s) (${exportFormat}, ${scopeLabel})`);
|
||||
} catch (e) {
|
||||
setStatus(`Export failed: ${e}`);
|
||||
showToast(`Export failed: ${e}`);
|
||||
@@ -6900,6 +6912,30 @@ function AppShell({
|
||||
>
|
||||
Export data…
|
||||
</button>
|
||||
<div
|
||||
style={{
|
||||
marginTop: 4,
|
||||
fontSize: 10,
|
||||
color: onlyDeleted
|
||||
? "#c0392b"
|
||||
: showDeleted
|
||||
? "#d35400"
|
||||
: "#7f8c8d",
|
||||
lineHeight: 1.3,
|
||||
}}
|
||||
title="Export scope follows the Visibility filters on the left panel"
|
||||
>
|
||||
Scope:{" "}
|
||||
<strong>
|
||||
{onlyDeleted
|
||||
? "deleted only"
|
||||
: showDeleted
|
||||
? "live + deleted"
|
||||
: "live only"}
|
||||
</strong>{" "}
|
||||
— toggle <em>Show deleted</em> / <em>Only deleted</em> in the
|
||||
Visibility panel to change.
|
||||
</div>
|
||||
</div>
|
||||
<h3 style={{ marginTop: 16 }}>Layers</h3>
|
||||
<div className="layer-toggles">
|
||||
|
||||
Reference in New Issue
Block a user