浏览代码

:art: Data history supports querying in all notebooks Fix https://github.com/siyuan-note/siyuan/issues/10788

Daniel 1 年之前
父节点
当前提交
04a06c3629

+ 1 - 0
app/appearance/langs/en_US.json

@@ -436,6 +436,7 @@
   "autoDownloadUpdatePkgTip": "After enabling, it will automatically check the version update every two hours. If there is an updated version, it will automatically download the installation package and prompt for installation",
   "downloaded": "Downloaded",
   "allOp": "All operations",
+  "allNotebooks": "All Notebooks",
   "historyClean": "clean",
   "historyUpdate": "update",
   "historyDelete": "delete",

+ 1 - 0
app/appearance/langs/es_ES.json

@@ -436,6 +436,7 @@
   "autoDownloadUpdatePkgTip": "Después de abrir, verificará automáticamente la actualización de la versión cada dos horas. Si hay una versión actualizada, descargará automáticamente el paquete de instalación y solicitará la instalación",
   "downloaded": "Descargado",
   "allOp": "Todas las operaciones",
+  "allNotebooks": "Todos los cuadernos",
   "historyClean": "limpiar (clean)",
   "historyUpdate": "actualizar (update)",
   "historyDelete": "eliminar (delete)",

+ 1 - 0
app/appearance/langs/fr_FR.json

@@ -436,6 +436,7 @@
   "autoDownloadUpdatePkgTip": "Après l'ouverture, il vérifiera automatiquement la mise à jour de la version toutes les deux heures. S'il existe une version mise à jour, il téléchargera automatiquement le package d'installation et demandera l'installation",
   "downloaded": "Téléchargé",
   "allOp": "Toutes les opérations",
+  "allNotebooks": "Tous les cahiers",
   "historyClean": "nettoyer (clean)",
   "historyUpdate": "mettre à jour (update)",
   "historyDelete": "supprimer (delete)",

+ 1 - 0
app/appearance/langs/zh_CHT.json

@@ -436,6 +436,7 @@
   "autoDownloadUpdatePkgTip": "啟用後會每隔兩小時自動檢查版本更新,如果有更新版本則自動下載安裝檔並提示安裝",
   "downloaded": "已下載",
   "allOp": "所有操作",
+  "allNotebooks": "所有筆記本",
   "historyClean": "清理  (clean)",
   "historyUpdate": "更新  (update)",
   "historyDelete": "刪除  (delete)",

+ 1 - 0
app/appearance/langs/zh_CN.json

@@ -436,6 +436,7 @@
   "autoDownloadUpdatePkgTip": "启用后会每隔两小时自动检查版本更新,如果有更新版本则自动下载安装包并提示安装",
   "downloaded": "已下载",
   "allOp": "所有操作",
+  "allNotebooks": "所有笔记本",
   "historyClean": "清理  (clean)",
   "historyUpdate": "更新  (update)",
   "historyDelete": "删除  (delete)",

+ 10 - 1
app/src/history/history.ts

@@ -303,7 +303,16 @@ export const openHistory = (app: App) => {
         return;
     }
 
-    let notebookSelectHTML = "";
+    let existLocalHistoryNoteID = false;
+    window.siyuan.notebooks.forEach((item) => {
+        if (!item.closed) {
+            if (item.id === window.siyuan.storage[Constants.LOCAL_HISTORYNOTEID]) {
+                existLocalHistoryNoteID = true;
+            }
+        }
+    });
+
+    let notebookSelectHTML = `<option value='%' ${!existLocalHistoryNoteID? "selected" : ""}>${window.siyuan.languages.allNotebooks}</option>`;
     window.siyuan.notebooks.forEach((item) => {
         if (!item.closed) {
             notebookSelectHTML += ` <option value="${item.id}"${item.id === window.siyuan.storage[Constants.LOCAL_HISTORYNOTEID] ? " selected" : ""}>${escapeHtml(item.name)}</option>`;