Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: Confirm rebuilding data index on desktop https://github.com/siyuan-note/siyuan/issues/19416

Danieldc89d5f5a3ee
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 0d9e4ddd0a..2a4a3083d4 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -34,6 +34,7 @@ import {
} from "../../protyle/util/hasClosest";
import type {App} from "../../index";
import {refreshFileTree} from "../../dialog/processSystem";
+import {confirmDialog} from "../../dialog/confirmDialog";
import {emitToPlugins} from "../../plugin/EventBusCore";
/// #if !BROWSER
import {ipcRenderer} from "electron";
@@ -2196,9 +2197,13 @@ aria-label="${ariaLabel}">${getDocDisplayName(item.name, item.titleEmpty, true)}
click: () => {
if (!this.element.getAttribute("disabled")) {
this.element.setAttribute("disabled", "disabled");
- refreshFileTree(() => {
+ confirmDialog(window.siyuan.languages.rebuildDataIndex, window.siyuan.languages.rebuildDataIndexTip, () => {
+ refreshFileTree(() => {
+ this.element.removeAttribute("disabled");
+ this.init(false);
+ });
+ }, () => {
this.element.removeAttribute("disabled");
- this.init(false);
});
}
}