| ... | @@ -895,7 +895,7 @@ export default function Sidebar() { | ... | @@ -895,7 +895,7 @@ export default function Sidebar() { |
| 895 | const api = readNativeApi(); | 895 | const api = readNativeApi(); |
| 896 | if (!api) return; | 896 | if (!api) return; |
| 897 | const clicked = await api.contextMenu.show( | 897 | const clicked = await api.contextMenu.show( |
| 898 | [{ id: "delete", label: "Delete", destructive: true }], | 898 | [{ id: "delete", label: "Remove project", destructive: true }], |
| 899 | position, | 899 | position, |
| 900 | ); | 900 | ); |
| 901 | if (clicked !== "delete") return; | 901 | if (clicked !== "delete") return; |
| ... | @@ -908,14 +908,12 @@ export default function Sidebar() { | ... | @@ -908,14 +908,12 @@ export default function Sidebar() { |
| 908 | toastManager.add({ | 908 | toastManager.add({ |
| 909 | type: "warning", | 909 | type: "warning", |
| 910 | title: "Project is not empty", | 910 | title: "Project is not empty", |
| 911 | description: "Delete all threads in this project before deleting it.", | 911 | description: "Delete all threads in this project before removing it.", |
| 912 | }); | 912 | }); |
| 913 | return; | 913 | return; |
| 914 | } | 914 | } |
| 915 | | 915 | |
| 916 | const confirmed = await api.dialogs.confirm( | 916 | const confirmed = await api.dialogs.confirm(`Remove project "${project.name}"?`); |
| 917 | [`Delete project "${project.name}"?`, "This action cannot be undone."].join("\n"), | | |
| 918 | ); | | |
| 919 | if (!confirmed) return; | 917 | if (!confirmed) return; |
| 920 | | 918 | |
| 921 | try { | 919 | try { |
| ... | @@ -930,11 +928,11 @@ export default function Sidebar() { | ... | @@ -930,11 +928,11 @@ export default function Sidebar() { |
| 930 | projectId, | 928 | projectId, |
| 931 | }); | 929 | }); |
| 932 | } catch (error) { | 930 | } catch (error) { |
| 933 | const message = error instanceof Error ? error.message : "Unknown error deleting project."; | 931 | const message = error instanceof Error ? error.message : "Unknown error removing project."; |
| 934 | console.error("Failed to remove project", { projectId, error }); | 932 | console.error("Failed to remove project", { projectId, error }); |
| 935 | toastManager.add({ | 933 | toastManager.add({ |
| 936 | type: "error", | 934 | type: "error", |
| 937 | title: `Failed to delete "${project.name}"`, | 935 | title: `Failed to remove "${project.name}"`, |
| 938 | description: message, | 936 | description: message, |
| 939 | }); | 937 | }); |
| 940 | } | 938 | } |