Skip to content

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

:sparkles: Improve new window layout dialogs and toolbar configuration https://github.com/siyuan-note/siyuan/issues/10809

Daniel2721cb884c8d
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.json
index 33706e78a9..ae92487925 100644
--- a/app/appearance/langs/ar.json
+++ b/app/appearance/langs/ar.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "الشريط العلوي للنافذة الجديدة",
"archiveEncryptedNotebooks": "أرشفة وإزالة",
"archiveEncryptedNotebooksTip": "حدد دفاتر الملاحظات المشفرة المقفلة وبيانات استعادتها؛ لا يلزم إدخال كلمة المرور الرئيسية",
"restoreEncryptedNotebooks": "استعادة أرشيف مشفر",
diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.json
index d5d2a84baf..48dbfa2776 100644
--- a/app/appearance/langs/de.json
+++ b/app/appearance/langs/de.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Obere Leiste neuer Fenster",
"archiveEncryptedNotebooks": "Archivieren und entfernen",
"archiveEncryptedNotebooksTip": "Gesperrte verschlüsselte Notizbücher und ihre Wiederherstellungsdaten auswählen; das Hauptpasswort ist nicht erforderlich",
"restoreEncryptedNotebooks": "Verschlüsseltes Archiv wiederherstellen",
diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.json
index edbca5fa0d..3057109145 100644
--- a/app/appearance/langs/en.json
+++ b/app/appearance/langs/en.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "New window top bar",
"archiveEncryptedNotebooks": "Archive and remove",
"archiveEncryptedNotebooksTip": "Select locked encrypted notebooks and their recovery data; no master password is required",
"restoreEncryptedNotebooks": "Restore encrypted archive",
diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.json
index ce3f263092..6562bb869e 100644
--- a/app/appearance/langs/es.json
+++ b/app/appearance/langs/es.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Barra superior de ventanas nuevas",
"archiveEncryptedNotebooks": "Archivar y retirar",
"archiveEncryptedNotebooksTip": "Seleccione cuadernos cifrados bloqueados y sus datos de recuperación; no se necesita la contraseña maestra",
"restoreEncryptedNotebooks": "Restaurar archivo cifrado",
diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.json
index d6e67dfc34..c1542b8772 100644
--- a/app/appearance/langs/fr.json
+++ b/app/appearance/langs/fr.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Barre supérieure des nouvelles fenêtres",
"archiveEncryptedNotebooks": "Archiver et retirer",
"archiveEncryptedNotebooksTip": "Sélectionnez les carnets chiffrés verrouillés et leurs données de récupération ; le mot de passe principal n’est pas nécessaire",
"restoreEncryptedNotebooks": "Restaurer une archive chiffrée",
diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.json
index 40e7d97faa..1b38d272f7 100644
--- a/app/appearance/langs/he.json
+++ b/app/appearance/langs/he.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "הסרגל העליון של חלון חדש",
"archiveEncryptedNotebooks": "ארכוב והסרה",
"archiveEncryptedNotebooksTip": "יש לבחור מחברות מוצפנות נעולות ואת נתוני השחזור שלהן; אין צורך בסיסמה הראשית",
"restoreEncryptedNotebooks": "שחזור ארכיון מוצפן",
diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.json
index c5533f2345..ac92360881 100644
--- a/app/appearance/langs/hi.json
+++ b/app/appearance/langs/hi.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "नई विंडो की शीर्ष पट्टी",
"archiveEncryptedNotebooks": "संग्रहित करके हटाएँ",
"archiveEncryptedNotebooksTip": "लॉक की गई एन्क्रिप्टेड नोटबुक और उनका पुनर्प्राप्ति डेटा चुनें; मास्टर पासवर्ड की आवश्यकता नहीं है",
"restoreEncryptedNotebooks": "एन्क्रिप्टेड संग्रह पुनर्स्थापित करें",
diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.json
index 902e3b0663..a3840f5155 100644
--- a/app/appearance/langs/id.json
+++ b/app/appearance/langs/id.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Bilah atas jendela baru",
"archiveEncryptedNotebooks": "Arsipkan dan keluarkan",
"archiveEncryptedNotebooksTip": "Pilih buku catatan terenkripsi yang terkunci beserta data pemulihannya; kata sandi utama tidak diperlukan",
"restoreEncryptedNotebooks": "Pulihkan arsip terenkripsi",
diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.json
index 319c5416b2..6008d4733b 100644
--- a/app/appearance/langs/it.json
+++ b/app/appearance/langs/it.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Barra superiore delle nuove finestre",
"archiveEncryptedNotebooks": "Archivia e rimuovi",
"archiveEncryptedNotebooksTip": "Seleziona i quaderni cifrati bloccati e i relativi dati di recupero; non è necessaria la password principale",
"restoreEncryptedNotebooks": "Ripristina archivio cifrato",
diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.json
index 8f88c93a45..f5d4a8bfe4 100644
--- a/app/appearance/langs/ja.json
+++ b/app/appearance/langs/ja.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "新しいウィンドウのトップバー",
"archiveEncryptedNotebooks": "アーカイブして移出",
"archiveEncryptedNotebooksTip": "ロック済みの暗号化ノートブックと復元データを選択します。マスターパスワードは不要です",
"restoreEncryptedNotebooks": "暗号化アーカイブを復元",
diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.json
index 767fd9c6b6..c27206b147 100644
--- a/app/appearance/langs/ko.json
+++ b/app/appearance/langs/ko.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "새 창 상단 표시줄",
"archiveEncryptedNotebooks": "보관 후 내보내기",
"archiveEncryptedNotebooksTip": "잠긴 암호화 노트북과 복구 데이터를 선택하세요. 마스터 비밀번호는 필요하지 않습니다",
"restoreEncryptedNotebooks": "암호화 보관 파일 복원",
diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.json
index a21fd927d3..ca22d7407d 100644
--- a/app/appearance/langs/nl.json
+++ b/app/appearance/langs/nl.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Bovenbalk van nieuwe vensters",
"archiveEncryptedNotebooks": "Archiveren en verwijderen",
"archiveEncryptedNotebooksTip": "Selecteer vergrendelde versleutelde notitieboeken en hun herstelgegevens; het hoofdwachtwoord is niet nodig",
"restoreEncryptedNotebooks": "Versleuteld archief herstellen",
diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.json
index 7299ed5d05..21c62c634d 100644
--- a/app/appearance/langs/pl.json
+++ b/app/appearance/langs/pl.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Górny pasek nowego okna",
"archiveEncryptedNotebooks": "Archiwizuj i usuń",
"archiveEncryptedNotebooksTip": "Wybierz zablokowane zaszyfrowane notesy i ich dane odzyskiwania; hasło główne nie jest wymagane",
"restoreEncryptedNotebooks": "Przywróć zaszyfrowane archiwum",
diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.json
index 6c0099ac48..98ed71eef3 100644
--- a/app/appearance/langs/pt-BR.json
+++ b/app/appearance/langs/pt-BR.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Barra superior de novas janelas",
"archiveEncryptedNotebooks": "Arquivar e remover",
"archiveEncryptedNotebooksTip": "Selecione os cadernos criptografados bloqueados e seus dados de recuperação; a senha mestra não é necessária",
"restoreEncryptedNotebooks": "Restaurar arquivo criptografado",
diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.json
index 4f37391f29..dac85e774b 100644
--- a/app/appearance/langs/ru.json
+++ b/app/appearance/langs/ru.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Верхняя панель нового окна",
"archiveEncryptedNotebooks": "Архивировать и убрать",
"archiveEncryptedNotebooksTip": "Выберите заблокированные зашифрованные блокноты и данные восстановления; мастер-пароль не требуется",
"restoreEncryptedNotebooks": "Восстановить зашифрованный архив",
diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.json
index 74965b91b6..2e91e6a1c8 100644
--- a/app/appearance/langs/sk.json
+++ b/app/appearance/langs/sk.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Horná lišta nového okna",
"archiveEncryptedNotebooks": "Archivovať a odstrániť",
"archiveEncryptedNotebooksTip": "Vyberte zamknuté šifrované poznámkové bloky a ich údaje na obnovu; hlavné heslo nie je potrebné",
"restoreEncryptedNotebooks": "Obnoviť šifrovaný archív",
diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.json
index d27d8cd2bc..b92afde867 100644
--- a/app/appearance/langs/sr.json
+++ b/app/appearance/langs/sr.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Горња трака новог прозора",
"archiveEncryptedNotebooks": "Архивирај и уклони",
"archiveEncryptedNotebooksTip": "Изаберите закључане шифроване бележнице и податке за опоравак; главна лозинка није потребна",
"restoreEncryptedNotebooks": "Врати шифровану архиву",
diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.json
index b536e0d8fe..dd4587e0fb 100644
--- a/app/appearance/langs/th.json
+++ b/app/appearance/langs/th.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "แถบด้านบนของหน้าต่างใหม่",
"archiveEncryptedNotebooks": "เก็บถาวรและนำออก",
"archiveEncryptedNotebooksTip": "เลือกสมุดบันทึกที่เข้ารหัสและล็อกไว้พร้อมข้อมูลกู้คืน โดยไม่ต้องใช้รหัสผ่านหลัก",
"restoreEncryptedNotebooks": "กู้คืนไฟล์เก็บถาวรที่เข้ารหัส",
diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.json
index 996198a038..9a0ba95256 100644
--- a/app/appearance/langs/tr.json
+++ b/app/appearance/langs/tr.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Yeni pencere üst çubuğu",
"archiveEncryptedNotebooks": "Arşivle ve kaldır",
"archiveEncryptedNotebooksTip": "Kilitli şifreli not defterlerini ve kurtarma verilerini seçin; ana parola gerekmez",
"restoreEncryptedNotebooks": "Şifreli arşivi geri yükle",
diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.json
index 0cdd5dc4a2..fcf288d8e3 100644
--- a/app/appearance/langs/uk.json
+++ b/app/appearance/langs/uk.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "Верхня панель нового вікна",
"archiveEncryptedNotebooks": "Архівувати та вилучити",
"archiveEncryptedNotebooksTip": "Виберіть заблоковані зашифровані блокноти й дані відновлення; головний пароль не потрібен",
"restoreEncryptedNotebooks": "Відновити зашифрований архів",
diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.json
index 7d7f506567..0a5dd45708 100644
--- a/app/appearance/langs/zh-CN.json
+++ b/app/appearance/langs/zh-CN.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "新窗口顶栏",
"archiveEncryptedNotebooks": "打包移出",
"archiveEncryptedNotebooksTip": "选择已锁定的加密笔记本及其恢复数据,无需输入主密码",
"restoreEncryptedNotebooks": "恢复加密归档",
diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.json
index 99748dd1dd..07ce5c654b 100644
--- a/app/appearance/langs/zh-TW.json
+++ b/app/appearance/langs/zh-TW.json
@@ -1,4 +1,5 @@
{
+ "entryWindowTopBar": "新視窗頂欄",
"archiveEncryptedNotebooks": "封存並移出",
"archiveEncryptedNotebooksTip": "選擇已鎖定的加密筆記本及其復原資料,無需輸入主密碼",
"restoreEncryptedNotebooks": "復原加密封存檔",
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100906-0u4zfq3.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100906-0u4zfq3.sy
index 086e9141bf..eada707fd8 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100906-0u4zfq3.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100906-0u4zfq3.sy
@@ -6,7 +6,7 @@
"id": "20200924100906-0u4zfq3",
"title": "Window and Tab",
"type": "doc",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -44,7 +44,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260809170000-fdf0e30",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -785,7 +785,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260922155242-zq7j067",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -799,12 +799,52 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260922155242-he816jm",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
"Type": "NodeText",
"Data": "A new window layout saves the tabs, splits, and reading positions of a named window. Main window layouts and new window layouts are grouped in the same layout menu and saved separately. Saving or updating a main window layout also records its size, position, and maximized or fullscreen state. Named new windows save this information automatically. Opening a layout restores these window settings; if the display configuration has changed, the window is adjusted to an available display. Older layouts without window settings remain usable. Window positioning and resizing depend on the operating system and may be restricted on Wayland. Select up to one main window layout and multiple new window layouts, then click Open above the list to open them together. This selection is not saved. This feature is available in the desktop client; tabs from encrypted notebooks are excluded."
+ },
+ {
+ "Type": "NodeText",
+ "Data": " Click the layout button again to close the naming dialog. The visibility and order of the layout and pin buttons can be configured in "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Settings"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Appearance"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Menu and button visibility and order"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "New window top bar"
+ },
+ {
+ "Type": "NodeText",
+ "Data": "."
}
]
},
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200822191536-rm6hwid.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200822191536-rm6hwid.sy
index 8c50c77c43..9d963a2a9b 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200822191536-rm6hwid.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200822191536-rm6hwid.sy
@@ -6,7 +6,7 @@
"id": "20200822191536-rm6hwid",
"title": "窗口和页签",
"type": "doc",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -44,7 +44,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260809170000-d150748",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -789,7 +789,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260922155242-z5t2n3l",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -803,12 +803,52 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260922155242-5nc0zym",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
"Type": "NodeText",
"Data": "新窗口布局用于保存一个已命名窗口的页签、分屏和阅读位置。主窗口布局和新窗口布局在同一个布局菜单内分组显示,分别保存。保存或更新主窗口布局时,也会记录窗口大小、位置以及最大化或全屏状态;已命名的新窗口会自动保存这些信息。打开布局时会恢复相应窗口状态,显示器配置变化后会调整到可用显示器内。没有窗口信息的旧布局仍可正常使用。窗口位置和大小的恢复受操作系统限制,Wayland 环境可能不支持。最多勾选一个主窗口布局,并可勾选多个新窗口布局,然后点击列表上方的打开按钮即可一起打开;本次勾选不会保存。此功能适用于桌面客户端;加密笔记本的页签不会写入布局配置。"
+ },
+ {
+ "Type": "NodeText",
+ "Data": "再次点击布局按钮可关闭命名弹窗。可在 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "设置"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "外观"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "菜单和按钮的显隐与排序"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "新窗口顶栏"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 中配置布局按钮和置顶按钮的显隐与排序。"
}
]
},
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123216-tlxw66f.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123216-tlxw66f.sy
index 10fcc18a51..ba84717c78 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123216-tlxw66f.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123216-tlxw66f.sy
@@ -6,7 +6,7 @@
"id": "20211226123216-tlxw66f",
"title": "視窗和分頁",
"type": "doc",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -44,7 +44,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260809170000-3a8f750",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -789,7 +789,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260922155242-cvaq88b",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -803,12 +803,52 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260922155242-4dgh9o5",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
"Type": "NodeText",
"Data": "新視窗版面配置用於儲存已命名視窗的分頁、分割畫面和閱讀位置。主視窗版面配置和新視窗版面配置在同一個版面配置選單內分組顯示,分別儲存。儲存或更新主視窗版面配置時,也會記錄視窗大小、位置,以及最大化或全螢幕狀態;已命名的新視窗會自動儲存這些資訊。開啟版面配置時會還原相應的視窗狀態,顯示器配置改變後會調整至可用顯示器內。沒有視窗資訊的舊版面配置仍可正常使用。視窗位置和大小的還原受作業系統限制,Wayland 環境可能不支援。最多勾選一個主視窗版面配置,並可勾選多個新視窗版面配置,再點擊清單上方的開啟按鈕一起開啟;本次勾選不會儲存。此功能適用於桌面用戶端;加密筆記本的分頁不會寫入版面配置。"
+ },
+ {
+ "Type": "NodeText",
+ "Data": "再次點擊版面配置按鈕可關閉命名對話方塊。可在 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "設定"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "外觀"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "選單和按鈕的顯隱與排序"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "新視窗頂欄"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 中設定版面配置按鈕和置頂按鈕的顯示與排序。"
}
]
},
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-7yv4y5z.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-7yv4y5z.sy
index 8d76373aef..a3d755923e 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-7yv4y5z.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-7yv4y5z.sy
@@ -7,7 +7,7 @@
"id": "20240530101000-7yv4y5z",
"title": "ウィンドウとタブ",
"type": "doc",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -45,7 +45,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260809170000-5b80d49",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -794,7 +794,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260922155242-vua2yiz",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
@@ -808,12 +808,52 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20260922155242-d7ab3nk",
- "updated": "20260923114823"
+ "updated": "20260925230000"
},
"Children": [
{
"Type": "NodeText",
"Data": "新しいウィンドウのレイアウトには、名前を付けたウィンドウのタブ、画面分割、閲覧位置が保存されます。メインウィンドウのレイアウトと新しいウィンドウのレイアウトは同じレイアウトメニュー内でグループ分けされ、別々に保存されます。メインウィンドウのレイアウトを保存または更新すると、ウィンドウのサイズ、位置、最大化や全画面表示の状態も記録されます。名前を付けた新しいウィンドウでは、これらの情報が自動保存されます。レイアウトを開くとウィンドウの状態が復元され、ディスプレイ構成が変わった場合は利用可能な画面内に調整されます。ウィンドウ情報を含まない以前のレイアウトも引き続き使用できます。位置とサイズの復元はOSの制約を受け、Wayland環境では利用できない場合があります。メインウィンドウのレイアウトは最大1件、新しいウィンドウのレイアウトは複数選択でき、一覧の上にある開くボタンでまとめて開けます。この選択内容は保存されません。この機能はデスクトップクライアントで利用できます。暗号化されたノートブックのタブは保存されません。"
+ },
+ {
+ "Type": "NodeText",
+ "Data": "レイアウトボタンをもう一度クリックすると、名前の入力ダイアログが閉じます。"
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "設定"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "スタイル"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "メニューとボタンの表示と順序"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " - "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "新しいウィンドウのトップバー"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " でレイアウトボタンと最前面表示ボタンの表示・非表示と順序を設定できます。"
}
]
},
diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts
index 5a25b707fd..5a478ba20a 100644
--- a/app/src/boot/onGetConfig.ts
+++ b/app/src/boot/onGetConfig.ts
@@ -360,7 +360,7 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
});
document.body.insertAdjacentHTML("beforeend", `<div class="toolbar__window">
<div class="toolbar__window-drag"></div>
-<div class="toolbar__item ariaLabel" aria-label="${window.siyuan.languages[isAlwaysOnTop ? "unpin" : "pin"]}" id="pinWindow">
+<div class="toolbar__item ariaLabel" data-window-topbar-entry="pinWindow" aria-label="${window.siyuan.languages[isAlwaysOnTop ? "unpin" : "pin"]}" id="pinWindow">
<svg>
<use xlink:href="#icon${isAlwaysOnTop ? "Unpin" : "Pin"}"></use>
</svg>
diff --git a/app/src/config/entryVisibility/catalog.ts b/app/src/config/entryVisibility/catalog.ts
index 57b064211a..5f5797ff7f 100644
--- a/app/src/config/entryVisibility/catalog.ts
+++ b/app/src/config/entryVisibility/catalog.ts
@@ -593,6 +593,7 @@ const toolbarCatalogSection: IEntryCatalogSection = {
export const TOP_BAR_ROOT_PATH = "topBar";
export const STATUS_BAR_ROOT_PATH = "statusBar";
+export const WINDOW_TOP_BAR_ROOT_PATH = "windowTopBar";
const statusBarCatalogSection: IEntryCatalogSection = {
key: STATUS_BAR_ROOT_PATH,
@@ -686,6 +687,14 @@ const dockCatalogSection: IEntryCatalogSection = {
export const entryCatalog: IEntryCatalogSection[] = [
topBarCatalogSection,
+ {
+ key: WINDOW_TOP_BAR_ROOT_PATH,
+ label: lang("entryWindowTopBar"),
+ children: [
+ node("windowWorkspace", lang("layout")),
+ node("pinWindow", lang("pin")),
+ ],
+ },
statusBarCatalogSection,
dockCatalogSection,
{
diff --git a/app/src/config/entryVisibility/runtime.ts b/app/src/config/entryVisibility/runtime.ts
index 449d25cd26..8697b77887 100644
--- a/app/src/config/entryVisibility/runtime.ts
+++ b/app/src/config/entryVisibility/runtime.ts
@@ -14,6 +14,7 @@ import {
refreshTopBarCatalog,
TOP_BAR_ROOT_PATH,
STATUS_BAR_ROOT_PATH,
+ WINDOW_TOP_BAR_ROOT_PATH,
} from "./catalog";
import {
mergeEntryOrderPreservingUnknown,
@@ -448,6 +449,24 @@ export const applyTopBarEntryVisibility = () => {
/// #endif
};
+export const applyWindowTopBarEntryVisibility = () => {
+ /// #if !MOBILE
+ const toolbar = document.querySelector(".toolbar__window");
+ if (!toolbar) {
+ return;
+ }
+ const children = Array.from(toolbar.children) as HTMLElement[];
+ reorderEntrySlots(children, getEntryOrder(WINDOW_TOP_BAR_ROOT_PATH), item => item.dataset.windowTopbarEntry)
+ .forEach(item => toolbar.append(item));
+ children.forEach(item => {
+ const key = item.dataset.windowTopbarEntry;
+ if (key && getEntryCatalogNode(`${WINDOW_TOP_BAR_ROOT_PATH}.${key}`)) {
+ item.classList.toggle("fn__none", !isEntryVisible(`${WINDOW_TOP_BAR_ROOT_PATH}.${key}`));
+ }
+ });
+ /// #endif
+};
+
export const applyStatusBarEntryVisibility = () => {
/// #if !MOBILE
const status = document.getElementById("status");
@@ -478,6 +497,7 @@ const applyEntryVisibilityLocal = (config: Config.IEntryVisibility) => {
/// #if !MOBILE
window.siyuan.menus?.menu?.remove();
applyTopBarEntryVisibility();
+ applyWindowTopBarEntryVisibility();
applyStatusBarEntryVisibility();
applyDockEntryVisibility();
document.querySelectorAll<HTMLElement>(".protyle-toolbar").forEach(applyToolbarEntryVisibility);
diff --git a/app/src/config/entryVisibility/windowTopBar.test.ts b/app/src/config/entryVisibility/windowTopBar.test.ts
new file mode 100644
index 0000000000..f28c926b57
--- /dev/null
+++ b/app/src/config/entryVisibility/windowTopBar.test.ts
@@ -0,0 +1,73 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {test} from "node:test";
+import {runInNewContext} from "node:vm";
+import {ModuleKind, ScriptTarget, transpileModule} from "typescript";
+import * as catalog from "./catalog";
+import * as order from "./order";
+import * as profile from "./profile";
+
+const keys = ["windowWorkspace", "pinWindow"];
+
+test("新窗口顶栏目录与按钮一致,旧配置和内置方案默认显示两个按钮", () => {
+ const nodes = catalog.getEntryCatalogChildren(catalog.WINDOW_TOP_BAR_ROOT_PATH);
+ assert.deepEqual(nodes.map(node => node.key), keys);
+ assert.ok(catalog.getEntryOrderParents().includes(catalog.WINDOW_TOP_BAR_ROOT_PATH));
+ nodes.forEach(node => {
+ assert.equal(node.type, "entry");
+ assert.equal(profile.getBuiltinProfileEntryVisibility("simple", node.simple), true);
+ assert.equal(profile.getProfileEntryVisibility({entries: {}}, `windowTopBar.${node.key}`), true);
+ });
+ assert.match(readFileSync("src/window/workspace.ts", "utf8"), /dataset.windowTopbarEntry = "windowWorkspace"/);
+ assert.match(readFileSync("src/boot/onGetConfig.ts", "utf8"), /data-window-topbar-entry="pinWindow"/);
+ assert.deepEqual(order.resolveEntryOrder(keys, ["pinWindow"], new Set()), ["windowWorkspace", "pinWindow"]);
+});
+
+const compiled = transpileModule(readFileSync("src/config/entryVisibility/runtime.ts", "utf8")
+ .replace(/\/\/\/ #if MOBILE\r?\n[\s\S]*?\/\/\/ #endif/g, ""), {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2021},
+}).outputText;
+
+test("新窗口顶栏支持显隐和排序,保持拖动区、插件和系统按钮位置", () => {
+ const createItem = (key = "") => {
+ const element = {
+ dataset: {windowTopbarEntry: key},
+ hidden: false,
+ classList: {toggle: (name: string, value: boolean) => {
+ assert.equal(name, "fn__none");
+ element.hidden = value;
+ }},
+ };
+ return element;
+ };
+ const drag = createItem();
+ const plugin = createItem();
+ const controls = [createItem(), createItem(), createItem()];
+ const elements = keys.map(createItem);
+ const children = [drag, elements[0], plugin, elements[1], ...controls];
+ const toolbar = {children, append(element: typeof elements[number]) {
+ children.splice(children.indexOf(element), 1);
+ children.push(element);
+ }};
+ const custom = {id: "custom", entries: {"windowTopBar.windowWorkspace": false, "windowTopBar.pinWindow": false},
+ orders: {windowTopBar: ["pinWindow", "windowWorkspace"]}};
+ const config = {active: "custom", profiles: [custom]};
+ const api = {} as typeof import("./runtime");
+ runInNewContext(compiled, {
+ exports: api,
+ require: (name: string) => name === "./catalog" ? catalog : name === "./order" ? order :
+ name === "./profile" ? profile : name === "./dockOrder" ? {isDockOrderScope: () => false} : {},
+ window: {siyuan: {config: {appearance: {entryVisibility: config}}}},
+ document: {querySelector: () => toolbar},
+ });
+ api.applyWindowTopBarEntryVisibility();
+ assert.deepEqual(children, [drag, elements[1], plugin, elements[0], ...controls]);
+ assert.ok(elements.every(element => element.hidden));
+ config.active = "full";
+ api.applyWindowTopBarEntryVisibility();
+ assert.deepEqual(children, [drag, elements[0], plugin, elements[1], ...controls]);
+ assert.ok(elements.every(element => !element.hidden));
+ config.active = "simple";
+ api.applyWindowTopBarEntryVisibility();
+ assert.ok(elements.every(element => !element.hidden));
+});
diff --git a/app/src/window/workspace.test.ts b/app/src/window/workspace.test.ts
index bec2c6a891..020efd2ad3 100644
--- a/app/src/window/workspace.test.ts
+++ b/app/src/window/workspace.test.ts
@@ -32,6 +32,8 @@ const fixture = (initialStorage: Record<string, unknown> = {}, workspaceID = "")
geometry: undefined as IWindowGeometry | undefined,
};
let dialogOptions: any;
+ const dialogEvents = {opened: 0, closed: 0};
+ let dialogHandle: {destroy: () => void};
let url = new URL(`http://127.0.0.1:6806/stage/build/app/window.html?windowWorkspace=${workspaceID}`);
const writes: Array<{key: string, value: any}> = [];
const messages: string[] = [];
@@ -69,7 +71,15 @@ const fixture = (initialStorage: Record<string, unknown> = {}, workspaceID = "")
},
setTabPosition: () => {},
setWindowWorkspaceTitle: () => {},
- openInputDialog: (options: unknown) => dialogOptions = options,
+ openInputDialog: (options: {destroyCallback: () => void}) => {
+ dialogEvents.opened++;
+ dialogOptions = options;
+ dialogHandle = {destroy: () => {
+ dialogEvents.closed++;
+ options.destroyCallback();
+ }};
+ return dialogHandle;
+ },
confirmDialog: (_title: string, _message: string, confirm: () => void) => confirm(),
showMessage: (message: string) => messages.push(message),
escapeHtml: (text: string) => text,
@@ -108,6 +118,8 @@ const fixture = (initialStorage: Record<string, unknown> = {}, workspaceID = "")
return {
api, state, storage, disk, writes, messages, opened, openedGeometries, associated, window,
dialog: () => dialogOptions,
+ dialogEvents,
+ closeDialog: () => dialogHandle.destroy(),
boot: () => {
const restored = api.getWindowWorkspaceLayout();
api.activateWindowWorkspace();
@@ -121,6 +133,35 @@ const savedStorage = () => ({
[prefix + id + "-layout"]: {version: 1, time: 1, layout: layout()},
});
+test("重复点击布局按钮关闭命名弹窗,取消后可以重新打开", () => {
+ for (const workspaceID of ["", id]) {
+ const f = fixture(savedStorage(), workspaceID);
+ f.api.editWindowWorkspace(workspaceID || undefined);
+ f.api.editWindowWorkspace(workspaceID || undefined);
+ assert.deepEqual(f.dialogEvents, {opened: 1, closed: 1});
+ assert.equal(f.writes.length, 0);
+ f.api.editWindowWorkspace(workspaceID || undefined);
+ f.closeDialog();
+ f.api.editWindowWorkspace(workspaceID || undefined);
+ assert.deepEqual(f.dialogEvents, {opened: 3, closed: 2});
+ }
+});
+
+test("命名保存期间重复点击不会创建或关闭弹窗,保存后可重新打开", async () => {
+ const f = fixture(savedStorage(), id);
+ f.boot();
+ let finish: () => void;
+ f.state.gate = new Promise<void>(resolve => finish = resolve);
+ f.api.editWindowWorkspace(id);
+ const saving = f.dialog().onConfirm("Renamed", {destroy: f.closeDialog});
+ f.api.editWindowWorkspace(id);
+ assert.deepEqual(f.dialogEvents, {opened: 1, closed: 0});
+ finish();
+ await saving;
+ f.api.editWindowWorkspace(id);
+ assert.deepEqual(f.dialogEvents, {opened: 2, closed: 1});
+});
+
test("保存命名窗口,重新加载后恢复文档、PDF 页码和阅读位置", async () => {
const f = fixture();
f.state.geometry = {version: 1, x: 80, y: 60, width: 900, height: 700, maximized: false, fullscreen: false};
diff --git a/app/src/window/workspace.ts b/app/src/window/workspace.ts
index 147264a4f5..d40c636aa8 100644
--- a/app/src/window/workspace.ts
+++ b/app/src/window/workspace.ts
@@ -11,6 +11,7 @@ import {escapeHtml} from "../util/escape";
import {setWindowWorkspaceTitle} from "../util/processTitle";
import {openNewWindowByWorkspace} from "./openNewWindow";
import {captureWindowGeometry} from "./geometry";
+import {applyWindowTopBarEntryVisibility} from "../config/entryVisibility/runtime";
import {
isWindowWorkspace,
isWindowWorkspaceID,
@@ -240,7 +241,15 @@ export const removeWindowWorkspace = (id: string) => {
}
};
+let workspaceDialog: ReturnType<typeof openInputDialog>;
+let savingWorkspaceDialog = false;
export const editWindowWorkspace = (id?: string) => {
+ if (workspaceDialog) {
+ if (!savingWorkspaceDialog) {
+ workspaceDialog.destroy();
+ }
+ return;
+ }
if (window.siyuan.config.readonly || window.siyuan.isPublish) {
return;
}
@@ -249,22 +258,22 @@ export const editWindowWorkspace = (id?: string) => {
showMessage(window.siyuan.languages.windowWorkspaceUnavailable, 6000, "error");
return;
}
- let saving = false;
- openInputDialog({
+ workspaceDialog = openInputDialog({
title: workspace ? window.siyuan.languages.windowWorkspaces :
window.siyuan.languages.windowWorkspaceSave,
value: workspace?.name || "",
maxLength: 100,
confirmText: window.siyuan.languages[workspace ? "confirm" : "save"],
+ destroyCallback: () => workspaceDialog = undefined,
onConfirm: async (value, dialog) => {
const name = value.trim();
- if (!name || saving) {
+ if (!name || savingWorkspaceDialog) {
if (!name) {
showMessage(window.siyuan.languages._kernel[142]);
}
return;
}
- saving = true;
+ savingWorkspaceDialog = true;
try {
if (workspace) {
const latest = getWindowWorkspace(id);
@@ -293,7 +302,7 @@ export const editWindowWorkspace = (id?: string) => {
console.error(error);
showMessage(window.siyuan.languages.windowWorkspaceSaveError, 6000, "error");
} finally {
- saving = false;
+ savingWorkspaceDialog = false;
}
},
});
@@ -342,9 +351,12 @@ export const initWindowWorkspace = () => {
initialized = true;
const button = document.createElement("button");
button.id = "windowWorkspace";
+ button.dataset.windowTopbarEntry = "windowWorkspace";
button.className = "toolbar__item ariaLabel window-workspace__button";
button.innerHTML = '<svg><use xlink:href="#iconLayout"></use></svg>';
toolbar.insertBefore(button, document.getElementById("pinWindow"));
+ applyWindowTopBarEntryVisibility();
+ window.addEventListener("siyuan-entry-visibility", () => setTabPosition(true));
button.addEventListener("click", () => editWindowWorkspace(currentID));
window.addEventListener("siyuan-window-layout", scheduleSave);
window.addEventListener("resize", scheduleSave);