update project removal copy (#981)
This commit is contained in:
1 parent
f63cda22fa
commit
ab0002f99d
1 file changed
+5
-7
@@ -895,7 +895,7 @@ export default function Sidebar() {
|
||||
const api = readNativeApi();
|
||||
if (!api) return;
|
||||
const clicked = await api.contextMenu.show(
|
||||
[{ id: "delete", label: "Delete", destructive: true }],
|
||||
[{ id: "delete", label: "Remove project", destructive: true }],
|
||||
position,
|
||||
);
|
||||
if (clicked !== "delete") return;
|
||||
@@ -908,14 +908,12 @@ export default function Sidebar() {
|
||||
toastManager.add({
|
||||
type: "warning",
|
||||
title: "Project is not empty",
|
||||
description: "Delete all threads in this project before deleting it.",
|
||||
description: "Delete all threads in this project before removing it.",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const confirmed = await api.dialogs.confirm(
|
||||
[`Delete project "${project.name}"?`, "This action cannot be undone."].join("\n"),
|
||||
);
|
||||
const confirmed = await api.dialogs.confirm(`Remove project "${project.name}"?`);
|
||||
if (!confirmed) return;
|
||||
|
||||
try {
|
||||
@@ -930,11 +928,11 @@ export default function Sidebar() {
|
||||
projectId,
|
||||
});
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : "Unknown error deleting project.";
|
||||
const message = error instanceof Error ? error.message : "Unknown error removing project.";
|
||||
console.error("Failed to remove project", { projectId, error });
|
||||
toastManager.add({
|
||||
type: "error",
|
||||
title: `Failed to delete "${project.name}"`,
|
||||
title: `Failed to remove "${project.name}"`,
|
||||
description: message,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user