Selaa lähdekoodia

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 1 vuosi sitten
vanhempi
commit
a5a307cf63

+ 3 - 2
app/appearance/langs/en_US.json

@@ -1513,13 +1513,14 @@
     "237": "[%d] marketplace packages have all been updated successfully",
     "238": "Marketplace package [%s] update failed, please try again later",
     "239": "Related operations are being processed, please try again later",
-    "240": "Drag heading under container blocks in the doc is not supported",
+    "240": "The current drag-and-drop heading is located in the container block and the drag-and-drop operation cannot be performed",
     "241": "Drag to its subheading is not supported",
     "242": "The binding block already exists in the current database",
     "243": "Only list the first [%d] tags (including subtags), if you need to adjust, please modify [Settings - Doc Tree - Maximum number to list]",
     "244": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. In the future, please exit the program completely before shutting down the computer",
     "245": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. In the future, please use [Exit Application] in the right panel to exit normally",
     "246": "The document title cannot contain / and has been replaced with _",
-    "247": "File [%s] is larger than the maximum limit [%s], and has been ignored for uploading to the cloud"
+    "247": "File [%s] is larger than the maximum limit [%s], and has been ignored for uploading to the cloud",
+    "248": "The target heading is located in the container block and cannot be used as a drop point"
   }
 }

+ 3 - 2
app/appearance/langs/es_ES.json

@@ -1513,13 +1513,14 @@
     "237": "[%d] todos los paquetes del mercado se han actualizado correctamente",
     "238": "Error en la actualización del paquete Marketplace [%s], inténtalo de nuevo más tarde",
     "239": "Las operaciones relacionadas se están procesando, inténtalo de nuevo más tarde",
-    "240": "No se admite arrastrar encabezado debajo de los bloques contenedores en el documento",
+    "240": "El encabezado actual de arrastrar y soltar está ubicado en el bloque contenedor y la operación de arrastrar y soltar no se puede realizar",
     "241": "No se admite arrastrar a su subtítulo",
     "242": "El bloque de enlace ya existe en la base de datos actual",
     "243": "Enumere solo las primeras [%d] etiquetas (incluidas las subetiquetas), modifique [Configuración - Árbol de documentos - Número máximo a listar]",
     "244": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. En el futuro, salga del programa por completo antes de apagar la computadora",
     "245": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. En el futuro, utilice [Salir de la aplicación] en el panel derecho para salir normalmente",
     "246": "El título del documento no puede contener / y ha sido reemplazado por _",
-    "247": "El archivo [%s] es más grande que el límite máximo [%s] y se ha ignorado para cargarlo en la nube"
+    "247": "El archivo [%s] es más grande que el límite máximo [%s] y se ha ignorado para cargarlo en la nube",
+    "248": "El rumbo de destino está ubicado en el bloque contenedor y no puede usarse como punto de entrega"
   }
 }

+ 3 - 2
app/appearance/langs/fr_FR.json

@@ -1513,13 +1513,14 @@
     "237": "[%d] packages Marketplace ont tous été mis à jour avec succès",
     "238": "La mise à jour du package Marketplace [%s] a échoué, veuillez réessayer plus tard",
     "239": "Les opérations associées sont en cours de traitement, veuillez réessayer plus tard",
-    "240": "Le déplacement du titre sous les blocs conteneurs dans la doc n'est pas pris en charge",
+    "240": "L'en-tête du glisser-déposer actuel se trouve dans le bloc conteneur et l'opération de glisser-déposer ne peut pas être effectuée",
     "241": "Le glisser vers son sous-titre n'est pas pris en charge",
     "242": "Le bloc de liaison existe déjà dans la base de données actuelle",
     "243": "Répertorier uniquement les [%d] premières balises (y compris les sous-balises). veuillez modifier [Paramètres - Arbre des documents - Nombre maximum de documents à lister].",
     "244": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Reconstruire l'index]. À l'avenir, veuillez quitter complètement le programme avant d'éteindre l'ordinateur",
     "245": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Reconstruire l'index]. À l'avenir, veuillez utiliser [Quitter l'application] dans le panneau de droite pour quitter normalement",
     "246": "Le titre du document ne peut pas contenir / et a été remplacé par _",
-    "247": "Le fichier [%s] est plus grand que la limite maximale [%s] et a été ignoré pour le téléchargement vers le cloud"
+    "247": "Le fichier [%s] est plus grand que la limite maximale [%s] et a été ignoré pour le téléchargement vers le cloud",
+    "248": "Le cap cible est situé dans le bloc conteneur et ne peut pas être utilisé comme point de dépôt"
   }
 }

+ 3 - 2
app/appearance/langs/ja_JP.json

@@ -1513,13 +1513,14 @@
     "237": "[%d] 個のマーケットプレイスパッケージがすべて正常に更新されました",
     "238": "マーケットプレイスパッケージ [%s] の更新に失敗しました。後でまた試してください",
     "239": "関連する操作が処理中です。後でまた試してください",
-    "240": "コンテナブロックの下の見出しのドラッグはサポートされていません",
+    "240": "現在のドラッグ アンド ドロップ見出しはコンテナ ブロック内にあるため、ドラッグ アンド ドロップ操作を実行できません",
     "241": "小見出しへのドラッグはサポートされていません",
     "242": "現在のデータベースにはすでにバインディングブロックが存在します",
     "243": "最初の [%d] 個のタグ (サブタグを含む) のみを表示します。調整が必要な場合は [設定] - [ドキュメントツリー] - [リストする最大数] を変更してください",
     "244": "前回の使用後に正常に終了しませんでした。[ドキュメントツリー] - [インデックスの再構築] を実行することをお勧めします。今後はコンピュータをシャットダウンする前にプログラムを完全に終了してください",
     "245": "前回の使用後に正常に終了しませんでした。[ドキュメントツリー] - [インデックスの再構築] を実行することをお勧めします。今後は右パネルの [アプリケーションの終了] を使用して終了してください",
     "246": "ドキュメントのタイトルに / を含めることはできません。_ に置き換えられました",
-    "247": "ファイル [%s] は最大制限 [%s] を超えているため、クラウドへのアップロードは無視されました。"
+    "247": "ファイル [%s] は最大制限 [%s] を超えているため、クラウドへのアップロードは無視されました",
+    "248": "ターゲット見出しはコンテナ ブロック内にあるため、ドロップ ポイントとして使用できません"
   }
 }

+ 3 - 2
app/appearance/langs/zh_CHT.json

@@ -1513,13 +1513,14 @@
     "237": "[%d] 個市集包已經全部更新成功",
     "238": "市集包 [%s] 更新失敗,請稍後再試",
     "239": "相關操作正在處理中,請稍後再試",
-    "240": "不支援拖曳文件中容器區塊下的標題",
+    "240": "目前拖曳標題位於容器區塊中,無法進行拖曳操作",
     "241": "不支持拖曳為自己的子標題",
     "242": "目前資料庫中已經存在該綁定區塊",
     "243": "僅列出前 [%d] 個標籤(含子標籤),如需調整請修改 [設置 - 文檔樹 - 最大列出數量]",
     "244": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]。以後請完整退出程式後再關閉電腦",
     "245": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]。以後請使用右側欄面板中的 [退出應用] 進行正常退出",
     "246": "文件標題不能包含 /,已經使用 _ 替換",
-    "247": "檔案 [%s] 大於最大限制 [%s],已忽略上傳至社群圖床"
+    "247": "檔案 [%s] 大於最大限制 [%s],已忽略上傳至社群圖床",
+    "248": "目標標題位於容器區塊中,無法作為放置點"
   }
 }

+ 3 - 2
app/appearance/langs/zh_CN.json

@@ -1513,13 +1513,14 @@
     "237": "[%d] 个集市包已经全部更新成功",
     "238": "集市包 [%s] 更新失败,请稍后再试",
     "239": "相关操作正在处理中,请稍后再试",
-    "240": "不支持拖拽文档中容器块下的标题",
+    "240": "当前拖拽标题位于容器块中,无法进行拖拽操作",
     "241": "不支持拖拽为自己的子标题",
     "242": "当前数据库中已经存在该绑定块",
     "243": "仅列出前 [%d] 个标签(含子标签),如需调整请修改 [设置 - 文档树 - 最大列出数量]",
     "244": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]。以后请完整退出程序后再关闭电脑",
     "245": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]。以后请使用右侧栏面板中的 [退出应用] 进行正常退出",
     "246": "文档标题不能包含 /,已经使用 _ 替换",
-    "247": "文件 [%s] 大于最大限制 [%s],已忽略上传到社区图床"
+    "247": "文件 [%s] 大于最大限制 [%s],已忽略上传到社区图床",
+    "248": "目标标题位于容器块中,无法作为放置点"
   }
 }

+ 1 - 1
app/src/dialog/processSystem.ts

@@ -71,7 +71,7 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
                 id: item.editor.protyle.block.rootID,
             }, (response) => {
                 item.editor.protyle.wysiwyg.renderCustom(response.data.ial);
-                reloadProtyle(item.editor.protyle, false);
+                reloadProtyle(item.editor.protyle, false, true);
                 updateTitle(item.editor.protyle.block.rootID, item.parent, item.editor.protyle);
             });
         } else if (data.removeRootIDs.includes(item.editor.protyle.block.rootID)) {

+ 8 - 4
app/src/protyle/scroll/saveScroll.ts

@@ -48,7 +48,8 @@ export const getDocByScroll = (options: {
     scrollAttr: IScrollAttr,
     mergedOptions?: IOptions,
     cb?: () => void
-    focus?: boolean
+    focus?: boolean,
+    updateReadonly?: boolean
 }) => {
     let actions: string[] = [];
     if (options.mergedOptions) {
@@ -80,7 +81,8 @@ export const getDocByScroll = (options: {
                         protyle: options.protyle,
                         action: actions,
                         scrollAttr: options.scrollAttr,
-                        afterCB: options.cb
+                        afterCB: options.cb,
+                        updateReadonly: options.updateReadonly
                     });
                 });
             } else {
@@ -90,7 +92,8 @@ export const getDocByScroll = (options: {
                     protyle: options.protyle,
                     action: actions,
                     scrollAttr: options.scrollAttr,
-                    afterCB: options.cb
+                    afterCB: options.cb,
+                    updateReadonly: options.updateReadonly
                 });
             }
         });
@@ -109,7 +112,8 @@ export const getDocByScroll = (options: {
             protyle: options.protyle,
             action: actions,
             scrollAttr: options.scrollAttr,
-            afterCB: options.cb
+            afterCB: options.cb,
+            updateReadonly: options.updateReadonly
         });
     });
 };

+ 3 - 2
app/src/protyle/util/reload.ts

@@ -5,7 +5,7 @@ import {renderBacklink} from "../wysiwyg/renderBacklink";
 import {hasClosestByClassName} from "./hasClosest";
 import {preventScroll} from "../scroll/preventScroll";
 
-export const reloadProtyle = (protyle: IProtyle, focus: boolean) => {
+export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?: boolean) => {
     if (!protyle.preview.element.classList.contains("fn__none")) {
         protyle.preview.render(protyle);
         return;
@@ -51,7 +51,8 @@ export const reloadProtyle = (protyle: IProtyle, focus: boolean) => {
         getDocByScroll({
             protyle,
             focus,
-            scrollAttr: saveScroll(protyle, true)
+            scrollAttr: saveScroll(protyle, true),
+            updateReadonly
         });
     }
 };

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
app/stage/protyle/js/lute/lute.min.js


+ 1 - 1
kernel/go.mod

@@ -8,7 +8,7 @@ require (
 	github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
 	github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
 	github.com/88250/gulu v1.2.3-0.20240505150113-bc43bd50f866
-	github.com/88250/lute v1.7.7-0.20240522032141-26b99fcd0d54
+	github.com/88250/lute v1.7.7-0.20240525091726-a500a25a2c80
 	github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
 	github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
 	github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4

+ 2 - 2
kernel/go.sum

@@ -12,8 +12,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
 github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
 github.com/88250/gulu v1.2.3-0.20240505150113-bc43bd50f866 h1:RFfNFS0hv6TbOuwET6xZAfGlV4hNlXiWTnfbLN1eF6k=
 github.com/88250/gulu v1.2.3-0.20240505150113-bc43bd50f866/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
-github.com/88250/lute v1.7.7-0.20240522032141-26b99fcd0d54 h1:fjSGrM4vR5zKaYUy5m6rGXVlky5PEXeopz5EmVF0Wj8=
-github.com/88250/lute v1.7.7-0.20240522032141-26b99fcd0d54/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
+github.com/88250/lute v1.7.7-0.20240525091726-a500a25a2c80 h1:BARuyUqtkBoKV+6w6ufiWGNQ1Pmlhxoga1TVK3I/zoM=
+github.com/88250/lute v1.7.7-0.20240525091726-a500a25a2c80/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
 github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
 github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
 github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

+ 2 - 2
kernel/model/outline.go

@@ -70,7 +70,7 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
 
 		if ast.NodeDocument != previousHeading.Parent.Type {
 			// 仅支持文档根节点下第一层标题,不支持容器块内标题
-			util.PushMsg(Conf.language(240), 5000)
+			util.PushMsg(Conf.language(248), 5000)
 			return
 		}
 
@@ -119,7 +119,7 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
 
 		if ast.NodeDocument != parentHeading.Parent.Type {
 			// 仅支持文档根节点下第一层标题,不支持容器块内标题
-			util.PushMsg(Conf.language(240), 5000)
+			util.PushMsg(Conf.language(248), 5000)
 			return
 		}
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä