From ac9304f589da7380658a8f62060319ec5b1242fc Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Tue, 2 Apr 2024 17:35:01 +0800 Subject: [PATCH] :art: Generate document history when dragging outline https://github.com/siyuan-note/siyuan/issues/10834 --- app/appearance/langs/en_US.json | 1 + app/appearance/langs/es_ES.json | 1 + app/appearance/langs/fr_FR.json | 1 + app/appearance/langs/zh_CHT.json | 1 + app/appearance/langs/zh_CN.json | 1 + app/src/history/doc.ts | 1 + app/src/history/history.ts | 1 + kernel/model/format.go | 35 +------------------------------- kernel/model/history.go | 30 ++++++++++++++++++++++++++- kernel/model/outline.go | 6 +++--- 10 files changed, 40 insertions(+), 38 deletions(-) diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index b94304322..c12fc3b1f 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -443,6 +443,7 @@ "historyFormat": "format", "historySync": "sync", "historyReplace": "replace", + "historyOutline": "outline", "htmlBlockError": "The execution of the following script will affect the interface display, and the script has stopped running", "fileHistory": "File history", "htmlBlockTip": "Multiple HTML blocks are formed. To prevent data loss, please use <div> tags to wrap and remove blank lines", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index d537c3d20..d72faf4ef 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -443,6 +443,7 @@ "historyFormat": "formatear (format)", "historySync": "sincronizar (sync)", "historyReplace": "reemplazar (replace)", + "historyOutline": "esquema (outline)", "htmlBlockError": "La ejecución del siguiente script afectará la visualización de la interfaz y el script ha dejado de ejecutarse", "fileHistory": "Historial de archivos", "htmlBlockTip": "Se forman varios bloques HTML. Para evitar la pérdida de datos, utilice etiquetas <div> para ajustar y eliminar líneas en blanco", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index aa5efb7b4..2f3237734 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -443,6 +443,7 @@ "historyFormat": "formater (format)", "historySync": "synchroniser (sync)", "historyReplace": "remplacer (replace)", + "historyOutline": "contour (outline)", "htmlBlockError": "L'exécution du script suivant affectera l'affichage de l'interface et le script a cessé de s'exécuter", "fileHistory": "Historique des fichiers", "htmlBlockTip": "Plusieurs blocs HTML sont formés. Pour éviter la perte de données, veuillez utiliser les balises <div> pour envelopper et supprimer les lignes vides", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 3948166c6..9fc0d5fd2 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -443,6 +443,7 @@ "historyFormat": "格式化 (format)", "historySync": "同步  (sync)", "historyReplace": "替換  (replace)", + "historyOutline": "大綱  (outline)", "htmlBlockError": "以下 script 執行會影響界面顯示,已經停止運行該腳本", "fileHistory": "文件歷史", "htmlBlockTip": "形成了多個 HTML 塊,為防止資料丟失請使用 <div> 標籤包裹並去掉空行", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index a31b781bb..2111384a7 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -443,6 +443,7 @@ "historyFormat": "格式化 (format)", "historySync": "同步  (sync)", "historyReplace": "替换  (replace)", + "historyOutline": "大纲  (outline)", "htmlBlockError": "以下 script 执行会影响界面显示,已经停止运行该脚本", "fileHistory": "文件历史", "htmlBlockTip": "形成了多个 HTML 块,为防止数据丢失请使用 <div> 标签包裹并去掉空行", diff --git a/app/src/history/doc.ts b/app/src/history/doc.ts index ef8b471e1..97e80558d 100644 --- a/app/src/history/doc.ts +++ b/app/src/history/doc.ts @@ -73,6 +73,7 @@ export const openDocHistory = (options: { + diff --git a/app/src/history/history.ts b/app/src/history/history.ts index c20f59c0d..d404b9903 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -355,6 +355,7 @@ export const openHistory = (app: App) => { +