{
+ if (!confirm(`删除「${node.name}」?移入回收站,可在回收站恢复。`)) return;
+ deleting = true;
+ try {
+ await api(`/database/api/nodes/${node.id}`, { method: "DELETE" });
+ toastOk("已移入回收站");
+ ondeleted?.();
+ } catch (e) {
+ toastErr(e instanceof Error ? e.message : String(e));
+ } finally {
+ deleting = false;
+ }
+ }
+
$effect(() => {
void node.id;
exportJob = null;
@@ -113,6 +130,17 @@
{/if}
{/if}
+
+ {#if canManage}
+
+
+
+ 删除后移入回收站,可恢复
+
+
+ {/if}
{#if showEditDesc}