diff --git a/apps/admin/src/api/embedSlots.ts b/apps/admin/src/api/embedSlots.ts index 520101f..9225564 100644 --- a/apps/admin/src/api/embedSlots.ts +++ b/apps/admin/src/api/embedSlots.ts @@ -23,3 +23,8 @@ export function fetchCreateEmbedSlot(data: Api.EmbedSlot.CreatePayload) { export function fetchUpdateEmbedSlot(id: string, data: Api.EmbedSlot.UpdatePayload) { return request.patch({ url: `/v1/admin/embed-slots/${id}`, data }) } + +/** 软删除展示位(deletedAt 标记:列表隐藏、ov 快照下线;幂等 204) */ +export function fetchDeleteEmbedSlot(id: string) { + return request.del({ url: `/v1/admin/embed-slots/${id}` }) +} diff --git a/apps/admin/src/locales/langs/en.json b/apps/admin/src/locales/langs/en.json index 10eeea5..5061555 100644 --- a/apps/admin/src/locales/langs/en.json +++ b/apps/admin/src/locales/langs/en.json @@ -820,7 +820,10 @@ "actionBind": "Bind Album", "actionCode": "Embed Code", "subtitle": "Manage floating photo widgets: album binding, toggles and embed code.", - "tableTitle": "Slots" + "tableTitle": "Slots", + "actionDelete": "Delete", + "deleteConfirm": "Delete slot \"{name}\"? Sites using it will stop showing it; this cannot be undone.", + "deleted": "Slot deleted" }, "form": { "nameLabel": "Name", diff --git a/apps/admin/src/locales/langs/zh.json b/apps/admin/src/locales/langs/zh.json index 0d51a74..110c842 100644 --- a/apps/admin/src/locales/langs/zh.json +++ b/apps/admin/src/locales/langs/zh.json @@ -820,7 +820,10 @@ "actionBind": "绑定相册", "actionCode": "嵌入代码", "subtitle": "管理官网悬浮照片展示位:绑定相册、启停与接入代码。", - "tableTitle": "展示位列表" + "tableTitle": "展示位列表", + "actionDelete": "删除", + "deleteConfirm": "确定删除展示位「{name}」?删除后已接入的网站将停止展示,且不可恢复。", + "deleted": "展示位已删除" }, "form": { "nameLabel": "名称", diff --git a/apps/admin/src/views/system/embed-slots/index.vue b/apps/admin/src/views/system/embed-slots/index.vue index 641a5fe..d763b96 100644 --- a/apps/admin/src/views/system/embed-slots/index.vue +++ b/apps/admin/src/views/system/embed-slots/index.vue @@ -89,6 +89,9 @@ {{ $t('embedSlotsManage.list.actionCode') }} + + {{ $t('embedSlotsManage.list.actionDelete') }} + @@ -124,11 +127,11 @@