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