An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 更新删除操作确认提示
Liang Dingf76608bf90a9
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex 5c03ad6df8..80c1bf68e4 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -1,4 +1,5 @@{+ "deleteOpConfirm": "⚠️ Delete operation confirmation","filterDocNameEnter": "Filter doc name Enter","defBlock": "Def block","defBlockChildren": "Define block and its children",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex e6a049e3ee..c53f024339 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -1,4 +1,5 @@{+ "deleteOpConfirm": "⚠️ Confirmación de operación de eliminación","filterDocNameEnter": "Filtrar doc name Enter","defBlock": "Definir bloque","defBlockChildren": "Definir bloque y sus hijos",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 089c72c34a..840a97f6e4 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -1,4 +1,5 @@{+ "deleteOpConfirm": "⚠️ Supprimer la confirmation de l'opération","filterDocNameEnter": "Filtre doc name Enter","defBlock": "Définir le bloc","defBlockChildren": "Définir le bloc et ses enfants",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 5d3ac85f8d..7e3ee7455c 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -1,4 +1,5 @@{+ "deleteOpConfirm": "⚠️ Delete operation confirmation","filterDocNameEnter": "過濾文檔名 Enter","defBlock": "定義塊","defBlockChildren": "定義塊及其子塊",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex f92f7bb428..8d6e3254fe 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -1,4 +1,5 @@{+ "deleteOpConfirm": "⚠️ 删除操作确认","filterDocNameEnter": "过滤文档名 Enter","defBlock": "定义块","defBlockChildren": "定义块及其子块",diff --git a/app/src/editor/deleteFile.ts b/app/src/editor/deleteFile.tsindex de1be7ee47..911659acfb 100644--- a/app/src/editor/deleteFile.ts+++ b/app/src/editor/deleteFile.ts@@ -17,7 +17,7 @@ export const deleteFile = (notebookId: string, pathString: string, name: string)if (response.data.subFileCount > 0) {tip = `${window.siyuan.languages.confirmDelete} <b>${name}</b> ${window.siyuan.languages.andSubFile.replace("x", response.data.subFileCount)}?`;}- confirmDialog(window.siyuan.languages.delete, tip, () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, tip, () => {fetchPost("/api/filetree/removeDoc", {notebook: notebookId,path: pathStringdiff --git a/app/src/layout/dock/Bookmark.ts b/app/src/layout/dock/Bookmark.tsindex 1fe45e2993..7d2db78407 100644--- a/app/src/layout/dock/Bookmark.ts+++ b/app/src/layout/dock/Bookmark.ts@@ -128,7 +128,7 @@ export class Bookmark extends Model {label: window.siyuan.languages.remove,click: () => {const bookmark = (id ? element.parentElement.previousElementSibling : element).querySelector(".b3-list-item__text").textContent;- confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmark)}</b>?`, () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmark)}</b>?`, () => {if (id) {fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {this.update();diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.tsindex b8dd7fad4a..0ee38a6e34 100644--- a/app/src/layout/dock/Files.ts+++ b/app/src/layout/dock/Files.ts@@ -117,7 +117,7 @@ export class Files extends Model {event.preventDefault();break;} else if (type === "remove") {- confirmDialog(window.siyuan.languages.delete,+ confirmDialog(window.siyuan.languages.deleteOpConfirm,`${window.siyuan.languages.confirmDelete} <b>${escapeHtml(target.parentElement.querySelector(".b3-list-item__text").textContent)}</b>?`, () => {fetchPost("/api/notebook/removeNotebook", {notebook: target.getAttribute("data-url"),diff --git a/app/src/layout/dock/Inbox.ts b/app/src/layout/dock/Inbox.tsindex 914cfb2b72..2fd1433145 100644--- a/app/src/layout/dock/Inbox.ts+++ b/app/src/layout/dock/Inbox.ts@@ -108,7 +108,7 @@ export class Inbox extends Model {this.update();break;case "delete":- confirmDialog(window.siyuan.languages.delete, window.siyuan.languages.confirmDelete + "?", () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, window.siyuan.languages.confirmDelete + "?", () => {this.remove(detailsElement.getAttribute("data-id"));});break;@@ -209,7 +209,7 @@ ${(Lute.New()).MarkdownStr("", data.shorthandContent)}label: window.siyuan.languages.remove,icon: "iconTrashcan",click: () => {- confirmDialog(window.siyuan.languages.delete, window.siyuan.languages.confirmDelete + "?", () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, window.siyuan.languages.confirmDelete + "?", () => {this.remove();});}diff --git a/app/src/layout/dock/Tag.ts b/app/src/layout/dock/Tag.tsindex b03bfd0743..548bee822d 100644--- a/app/src/layout/dock/Tag.ts+++ b/app/src/layout/dock/Tag.ts@@ -114,7 +114,7 @@ export class Tag extends Model {icon: "iconTrashcan",label: window.siyuan.languages.remove,click: () => {- confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(labelName)}</b>?`, () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(labelName)}</b>?`, () => {fetchPost("/api/tag/removeTag", {label: labelName});});},diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.tsindex 6f2a55c5eb..ab020ca414 100644--- a/app/src/menus/navigation.ts+++ b/app/src/menus/navigation.ts@@ -88,7 +88,7 @@ export const initNavigationMenu = (liElement: HTMLElement) => {label: window.siyuan.languages.delete,accelerator: "⌦",click: () => {- confirmDialog(window.siyuan.languages.delete,+ confirmDialog(window.siyuan.languages.deleteOpConfirm,`${window.siyuan.languages.confirmDelete} <b>${Lute.EscapeHTMLStr(name)}</b>?`, () => {fetchPost("/api/notebook/removeNotebook", {notebook: notebookId,diff --git a/app/src/mobile/util/MobileBookmarks.ts b/app/src/mobile/util/MobileBookmarks.tsindex c4ff716be8..87c2cc86a6 100644--- a/app/src/mobile/util/MobileBookmarks.ts+++ b/app/src/mobile/util/MobileBookmarks.ts@@ -36,7 +36,7 @@ export class MobileBookmarks {if (actionElement) {const bookmark = (id ? element.parentElement.previousElementSibling : element).querySelector(".b3-list-item__text").textContent;if (actionElement.getAttribute("data-type") === "remove") {- confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmark)}</b>?`, () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmark)}</b>?`, () => {if (id) {fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {this.update();diff --git a/app/src/mobile/util/MobileFiles.ts b/app/src/mobile/util/MobileFiles.tsindex 5b3fe9d279..d9a38005bd 100644--- a/app/src/mobile/util/MobileFiles.ts+++ b/app/src/mobile/util/MobileFiles.ts@@ -148,7 +148,7 @@ export class MobileFiles extends Model {event.preventDefault();break;} else if (type === "remove") {- confirmDialog(window.siyuan.languages.delete,+ confirmDialog(window.siyuan.languages.deleteOpConfirm,`${window.siyuan.languages.confirmDelete} <b>${escapeHtml(target.parentElement.querySelector(".b3-list-item__text").textContent)}</b>?`, () => {fetchPost("/api/notebook/removeNotebook", {notebook: target.getAttribute("data-url"),diff --git a/app/src/mobile/util/MobileTags.ts b/app/src/mobile/util/MobileTags.tsindex 1af7832b9e..9370f8ea5e 100644--- a/app/src/mobile/util/MobileTags.ts+++ b/app/src/mobile/util/MobileTags.ts@@ -60,7 +60,7 @@ export class MobileTags {fetchPost("/api/tag/renameTag", {oldLabel: labelName, newLabel: inputElement.value});});} else {- confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(labelName)}</b>?`, () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(labelName)}</b>?`, () => {fetchPost("/api/tag/removeTag", {label: labelName});});}diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.tsindex 6fcb14c038..f6a291e79c 100644--- a/app/src/util/globalShortcut.ts+++ b/app/src/util/globalShortcut.ts@@ -984,7 +984,7 @@ const fileTreeKeydown = (event: KeyboardEvent) => {if (isFile) {deleteFile(notebookId, pathString, getDisplayName(liElement.getAttribute("data-name"), false, true));} else {- confirmDialog(window.siyuan.languages.delete,+ confirmDialog(window.siyuan.languages.deleteOpConfirm,`${window.siyuan.languages.confirmDelete} <b>${Lute.EscapeHTMLStr(getNotebookName(notebookId))}</b>?`, () => {fetchPost("/api/notebook/removeNotebook", {notebook: notebookId,diff --git a/app/src/util/history.ts b/app/src/util/history.tsindex 00bf39cf6e..f6cc9f7619 100644--- a/app/src/util/history.ts+++ b/app/src/util/history.ts@@ -451,7 +451,7 @@ export const openHistory = () => {break;} else if (type === "removeRepoTagSnapshot" || type === "removeCloudRepoTagSnapshot") {const tag = target.parentElement.getAttribute("data-tag");- confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <i>${tag}</i>?`, () => {+ confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <i>${tag}</i>?`, () => {fetchPost("/api/repo/" + type, {tag}, () => {renderRepo(repoElement, type === "removeRepoTagSnapshot" ? -1 : -2);});