Skip to content

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

:art: Clarify entry profile restore target

Daniel8fa13776fb09
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.json
index 949a8c0504..9dfde35f9b 100644
--- a/app/appearance/langs/ar.json
+++ b/app/appearance/langs/ar.json
@@ -11,8 +11,8 @@
"entryBasedOn": "استنادًا إلى",
"entryCustomProfile": "ملف تعريف مخصص",
"entryCreateProfile": "إنشاء ملف تعريف",
- "entryRestoreBase": "استعادة الأساس",
- "entryRestoreBaseConfirm": "هل تريد استعادة جميع عناصر هذا الملف إلى ملف التعريف الأساسي؟",
+ "entryRestoreBase": "استعادة إلى [${x}]",
+ "entryRestoreBaseConfirm": "هل تريد استعادة جميع عناصر هذا الملف إلى [${x}]؟",
"entryImportInvalid": "ملف تعريف القوائم وشريط الإرساء غير صالح",
"mobileMenuQuickActions": "إجراءات سريعة",
"mobileMenuCreate": "إنشاء",
diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.json
index 562ff0ea24..a7d9f0eda0 100644
--- a/app/appearance/langs/de.json
+++ b/app/appearance/langs/de.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Basierend auf",
"entryCustomProfile": "Benutzerdefiniertes Profil",
"entryCreateProfile": "Profil erstellen",
- "entryRestoreBase": "Basis wiederherstellen",
- "entryRestoreBaseConfirm": "Alle Einträge dieses Profils auf das Basisprofil zurücksetzen?",
+ "entryRestoreBase": "Auf [${x}] zurücksetzen",
+ "entryRestoreBaseConfirm": "Alle Einträge dieses Profils auf [${x}] zurücksetzen?",
"entryImportInvalid": "Ungültige Menü- und Dock-Profildatei",
"mobileMenuQuickActions": "Schnellaktionen",
"mobileMenuCreate": "Erstellen",
diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.json
index a2ba400abd..8ce0504e48 100644
--- a/app/appearance/langs/en.json
+++ b/app/appearance/langs/en.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Based on",
"entryCustomProfile": "Custom profile",
"entryCreateProfile": "Create profile",
- "entryRestoreBase": "Restore base",
- "entryRestoreBaseConfirm": "Restore all entries in this profile to its base profile?",
+ "entryRestoreBase": "Restore to [${x}]",
+ "entryRestoreBaseConfirm": "Restore all entries in this profile to [${x}]?",
"entryImportInvalid": "Invalid menu and dock profile file",
"mobileMenuQuickActions": "Quick actions",
"mobileMenuCreate": "Create",
diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.json
index 675ea28d98..7dcebf4781 100644
--- a/app/appearance/langs/es.json
+++ b/app/appearance/langs/es.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Basado en",
"entryCustomProfile": "Perfil personalizado",
"entryCreateProfile": "Crear perfil",
- "entryRestoreBase": "Restaurar base",
- "entryRestoreBaseConfirm": "¿Restaurar todas las entradas de este perfil a su perfil base?",
+ "entryRestoreBase": "Restaurar a [${x}]",
+ "entryRestoreBaseConfirm": "¿Restaurar todas las entradas de este perfil a [${x}]?",
"entryImportInvalid": "El archivo de perfil de menús y panel acoplable no es válido",
"mobileMenuQuickActions": "Acciones rápidas",
"mobileMenuCreate": "Crear",
diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.json
index 5f1786072a..ceeb00f50e 100644
--- a/app/appearance/langs/fr.json
+++ b/app/appearance/langs/fr.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Basé sur",
"entryCustomProfile": "Profil personnalisé",
"entryCreateProfile": "Créer un profil",
- "entryRestoreBase": "Restaurer la base",
- "entryRestoreBaseConfirm": "Restaurer toutes les entrées de ce profil selon son profil de base ?",
+ "entryRestoreBase": "Restaurer vers [${x}]",
+ "entryRestoreBaseConfirm": "Restaurer toutes les entrées de ce profil vers [${x}] ?",
"entryImportInvalid": "Fichier de profil des menus et de la barre d'ancrage non valide",
"mobileMenuQuickActions": "Actions rapides",
"mobileMenuCreate": "Créer",
diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.json
index ca86225c13..48453d5518 100644
--- a/app/appearance/langs/he.json
+++ b/app/appearance/langs/he.json
@@ -11,8 +11,8 @@
"entryBasedOn": "מבוסס על",
"entryCustomProfile": "פרופיל מותאם אישית",
"entryCreateProfile": "יצירת פרופיל",
- "entryRestoreBase": "שחזור הבסיס",
- "entryRestoreBaseConfirm": "לשחזר את כל הפריטים בפרופיל זה לפי פרופיל הבסיס?",
+ "entryRestoreBase": "שחזור אל [${x}]",
+ "entryRestoreBaseConfirm": "לשחזר את כל הפריטים בפרופיל זה אל [${x}]?",
"entryImportInvalid": "קובץ פרופיל התפריטים וסרגל העגינה אינו תקין",
"mobileMenuQuickActions": "פעולות מהירות",
"mobileMenuCreate": "יצירה",
diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.json
index 1f28afbae6..d50ab577bc 100644
--- a/app/appearance/langs/hi.json
+++ b/app/appearance/langs/hi.json
@@ -11,8 +11,8 @@
"entryBasedOn": "इस पर आधारित",
"entryCustomProfile": "कस्टम प्रोफ़ाइल",
"entryCreateProfile": "प्रोफ़ाइल बनाएँ",
- "entryRestoreBase": "आधार पुनर्स्थापित करें",
- "entryRestoreBaseConfirm": "क्या इस प्रोफ़ाइल की सभी प्रविष्टियाँ आधार प्रोफ़ाइल के अनुसार पुनर्स्थापित करनी हैं?",
+ "entryRestoreBase": "[${x}] पर पुनर्स्थापित करें",
+ "entryRestoreBaseConfirm": "क्या इस प्रोफ़ाइल की सभी प्रविष्टियाँ [${x}] पर पुनर्स्थापित करनी हैं?",
"entryImportInvalid": "मेनू और डॉक प्रोफ़ाइल फ़ाइल अमान्य है",
"mobileMenuQuickActions": "त्वरित कार्रवाइयाँ",
"mobileMenuCreate": "बनाएँ",
diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.json
index b8a7c64400..45c6a0f7fa 100644
--- a/app/appearance/langs/id.json
+++ b/app/appearance/langs/id.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Berdasarkan",
"entryCustomProfile": "Profil kustom",
"entryCreateProfile": "Buat profil",
- "entryRestoreBase": "Pulihkan dasar",
- "entryRestoreBaseConfirm": "Pulihkan semua entri dalam profil ini ke profil dasarnya?",
+ "entryRestoreBase": "Pulihkan ke [${x}]",
+ "entryRestoreBaseConfirm": "Pulihkan semua entri dalam profil ini ke [${x}]?",
"entryImportInvalid": "Berkas profil menu dan dok tidak valid",
"mobileMenuQuickActions": "Tindakan cepat",
"mobileMenuCreate": "Buat",
diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.json
index f9ca358e7c..e04670adc1 100644
--- a/app/appearance/langs/it.json
+++ b/app/appearance/langs/it.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Basato su",
"entryCustomProfile": "Profilo personalizzato",
"entryCreateProfile": "Crea profilo",
- "entryRestoreBase": "Ripristina base",
- "entryRestoreBaseConfirm": "Ripristinare tutte le voci di questo profilo in base al profilo di base?",
+ "entryRestoreBase": "Ripristina a [${x}]",
+ "entryRestoreBaseConfirm": "Ripristinare tutte le voci di questo profilo a [${x}]?",
"entryImportInvalid": "File del profilo di menu e barra di ancoraggio non valido",
"mobileMenuQuickActions": "Azioni rapide",
"mobileMenuCreate": "Crea",
diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.json
index cd8a78e7a3..e584815c26 100644
--- a/app/appearance/langs/ja.json
+++ b/app/appearance/langs/ja.json
@@ -11,8 +11,8 @@
"entryBasedOn": "ベース",
"entryCustomProfile": "カスタムプロファイル",
"entryCreateProfile": "プロファイルを作成",
- "entryRestoreBase": "ベースを復元",
- "entryRestoreBaseConfirm": "このプロファイルのすべての項目をベースプロファイルに戻しますか?",
+ "entryRestoreBase": "[${x}]に戻す",
+ "entryRestoreBaseConfirm": "このプロファイルのすべての項目を [${x}] に戻しますか?",
"entryImportInvalid": "メニューとドックのプロファイルファイルが無効です",
"mobileMenuQuickActions": "クイック操作",
"mobileMenuCreate": "作成",
diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.json
index fba8c51e78..3e85a0bd91 100644
--- a/app/appearance/langs/ko.json
+++ b/app/appearance/langs/ko.json
@@ -11,8 +11,8 @@
"entryBasedOn": "기준",
"entryCustomProfile": "사용자 지정 프로필",
"entryCreateProfile": "프로필 만들기",
- "entryRestoreBase": "기준 복원",
- "entryRestoreBaseConfirm": "이 프로필의 모든 항목을 기준 프로필로 복원하시겠습니까?",
+ "entryRestoreBase": "[${x}](으)로 복원",
+ "entryRestoreBaseConfirm": "이 프로필의 모든 항목을 [${x}](으)로 복원하시겠습니까?",
"entryImportInvalid": "메뉴 및 도크 프로필 파일이 올바르지 않습니다",
"mobileMenuQuickActions": "빠른 작업",
"mobileMenuCreate": "만들기",
diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.json
index 1561c60e86..6110958b8f 100644
--- a/app/appearance/langs/nl.json
+++ b/app/appearance/langs/nl.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Gebaseerd op",
"entryCustomProfile": "Aangepast profiel",
"entryCreateProfile": "Profiel maken",
- "entryRestoreBase": "Basis herstellen",
- "entryRestoreBaseConfirm": "Alle items in dit profiel herstellen naar het basisprofiel?",
+ "entryRestoreBase": "Herstellen naar [${x}]",
+ "entryRestoreBaseConfirm": "Alle items in dit profiel herstellen naar [${x}]?",
"entryImportInvalid": "Ongeldig profielbestand voor menu's en dock",
"mobileMenuQuickActions": "Snelle acties",
"mobileMenuCreate": "Maken",
diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.json
index 5c1deb3325..f449ede34a 100644
--- a/app/appearance/langs/pl.json
+++ b/app/appearance/langs/pl.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Na podstawie",
"entryCustomProfile": "Profil niestandardowy",
"entryCreateProfile": "Utwórz profil",
- "entryRestoreBase": "Przywróć bazę",
- "entryRestoreBaseConfirm": "Przywrócić wszystkie pozycje tego profilu zgodnie z profilem bazowym?",
+ "entryRestoreBase": "Przywróć do [${x}]",
+ "entryRestoreBaseConfirm": "Przywrócić wszystkie pozycje tego profilu do [${x}]?",
"entryImportInvalid": "Nieprawidłowy plik profilu menu i doku",
"mobileMenuQuickActions": "Szybkie działania",
"mobileMenuCreate": "Utwórz",
diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.json
index 18b60996d0..e6445e5539 100644
--- a/app/appearance/langs/pt-BR.json
+++ b/app/appearance/langs/pt-BR.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Baseado em",
"entryCustomProfile": "Perfil personalizado",
"entryCreateProfile": "Criar perfil",
- "entryRestoreBase": "Restaurar base",
- "entryRestoreBaseConfirm": "Restaurar todas as entradas deste perfil para o perfil base?",
+ "entryRestoreBase": "Restaurar para [${x}]",
+ "entryRestoreBaseConfirm": "Restaurar todas as entradas deste perfil para [${x}]?",
"entryImportInvalid": "Arquivo de perfil de menus e dock inválido",
"mobileMenuQuickActions": "Ações rápidas",
"mobileMenuCreate": "Criar",
diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.json
index 59e39dbfc7..56a0fa4530 100644
--- a/app/appearance/langs/ru.json
+++ b/app/appearance/langs/ru.json
@@ -11,8 +11,8 @@
"entryBasedOn": "На основе",
"entryCustomProfile": "Пользовательский профиль",
"entryCreateProfile": "Создать профиль",
- "entryRestoreBase": "Восстановить основу",
- "entryRestoreBaseConfirm": "Восстановить все элементы этого профиля в соответствии с базовым профилем?",
+ "entryRestoreBase": "Восстановить до [${x}]",
+ "entryRestoreBaseConfirm": "Восстановить все элементы этого профиля до [${x}]?",
"entryImportInvalid": "Недопустимый файл профиля меню и док-панели",
"mobileMenuQuickActions": "Быстрые действия",
"mobileMenuCreate": "Создание",
diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.json
index 0d69e85626..db3bbda756 100644
--- a/app/appearance/langs/sk.json
+++ b/app/appearance/langs/sk.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Založené na",
"entryCustomProfile": "Vlastný profil",
"entryCreateProfile": "Vytvoriť profil",
- "entryRestoreBase": "Obnoviť základ",
- "entryRestoreBaseConfirm": "Obnoviť všetky položky tohto profilu podľa základného profilu?",
+ "entryRestoreBase": "Obnoviť na [${x}]",
+ "entryRestoreBaseConfirm": "Obnoviť všetky položky tohto profilu na [${x}]?",
"entryImportInvalid": "Neplatný súbor profilu ponúk a doku",
"mobileMenuQuickActions": "Rýchle akcie",
"mobileMenuCreate": "Vytvoriť",
diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.json
index 48eba906a0..99925cd47d 100644
--- a/app/appearance/langs/th.json
+++ b/app/appearance/langs/th.json
@@ -11,8 +11,8 @@
"entryBasedOn": "อ้างอิงจาก",
"entryCustomProfile": "โปรไฟล์กำหนดเอง",
"entryCreateProfile": "สร้างโปรไฟล์",
- "entryRestoreBase": "คืนค่าพื้นฐาน",
- "entryRestoreBaseConfirm": "คืนค่ารายการทั้งหมดในโปรไฟล์นี้ตามโปรไฟล์พื้นฐานหรือไม่?",
+ "entryRestoreBase": "คืนค่าเป็น [${x}]",
+ "entryRestoreBaseConfirm": "คืนค่ารายการทั้งหมดในโปรไฟล์นี้เป็น [${x}] หรือไม่?",
"entryImportInvalid": "ไฟล์โปรไฟล์เมนูและแถบเชื่อมต่อไม่ถูกต้อง",
"mobileMenuQuickActions": "การดำเนินการด่วน",
"mobileMenuCreate": "สร้าง",
diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.json
index 45b72f8658..99306e7ec8 100644
--- a/app/appearance/langs/tr.json
+++ b/app/appearance/langs/tr.json
@@ -11,8 +11,8 @@
"entryBasedOn": "Temel alınan",
"entryCustomProfile": "Özel profil",
"entryCreateProfile": "Profil oluştur",
- "entryRestoreBase": "Temeli geri yükle",
- "entryRestoreBaseConfirm": "Bu profildeki tüm öğeler temel profile göre geri yüklensin mi?",
+ "entryRestoreBase": "[${x}] durumuna geri yükle",
+ "entryRestoreBaseConfirm": "Bu profildeki tüm öğeler [${x}] durumuna geri yüklensin mi?",
"entryImportInvalid": "Menü ve yuva profil dosyası geçersiz",
"mobileMenuQuickActions": "Hızlı işlemler",
"mobileMenuCreate": "Oluştur",
diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.json
index bd17c91fd8..8ef833fe3c 100644
--- a/app/appearance/langs/uk.json
+++ b/app/appearance/langs/uk.json
@@ -11,8 +11,8 @@
"entryBasedOn": "На основі",
"entryCustomProfile": "Користувацький профіль",
"entryCreateProfile": "Створити профіль",
- "entryRestoreBase": "Відновити основу",
- "entryRestoreBaseConfirm": "Відновити всі елементи цього профілю відповідно до базового профілю?",
+ "entryRestoreBase": "Відновити до [${x}]",
+ "entryRestoreBaseConfirm": "Відновити всі елементи цього профілю до [${x}]?",
"entryImportInvalid": "Недійсний файл профілю меню та док-панелі",
"mobileMenuQuickActions": "Швидкі дії",
"mobileMenuCreate": "Створення",
diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.json
index 97848e5a6b..6f91ed105f 100644
--- a/app/appearance/langs/zh-CN.json
+++ b/app/appearance/langs/zh-CN.json
@@ -11,8 +11,8 @@
"entryBasedOn": "基于",
"entryCustomProfile": "自定义方案",
"entryCreateProfile": "新建方案",
- "entryRestoreBase": "恢复基础方案",
- "entryRestoreBaseConfirm": "确定将此方案的所有入口恢复为基础方案吗?",
+ "entryRestoreBase": "恢复为 [${x}]",
+ "entryRestoreBaseConfirm": "确定将此方案的所有入口恢复为 [${x}] 吗?",
"entryImportInvalid": "菜单与停靠栏方案文件无效",
"mobileMenuQuickActions": "快捷操作",
"mobileMenuCreate": "创建",
diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.json
index 6d9a30c4b1..507d191cce 100644
--- a/app/appearance/langs/zh-TW.json
+++ b/app/appearance/langs/zh-TW.json
@@ -11,8 +11,8 @@
"entryBasedOn": "基於",
"entryCustomProfile": "自訂方案",
"entryCreateProfile": "新增方案",
- "entryRestoreBase": "還原基礎方案",
- "entryRestoreBaseConfirm": "確定將此方案的所有入口還原為基礎方案嗎?",
+ "entryRestoreBase": "還原為 [${x}]",
+ "entryRestoreBaseConfirm": "確定將此方案的所有入口還原為 [${x}] 嗎?",
"entryImportInvalid": "選單與停靠欄方案檔案無效",
"mobileMenuQuickActions": "快速操作",
"mobileMenuCreate": "建立",
diff --git a/app/src/config/entryVisibility/ui.ts b/app/src/config/entryVisibility/ui.ts
index a3896864e8..878d013d3f 100644
--- a/app/src/config/entryVisibility/ui.ts
+++ b/app/src/config/entryVisibility/ui.ts
@@ -221,7 +221,7 @@ const openProfileEditor = (root: HTMLElement, profileID?: string) => {
<div class="fn__flex">
<input class="b3-text-field fn__flex-1" data-type="entry-search" placeholder="${escapeAttr(window.siyuan.languages.searchPlaceholder)}">
<span class="fn__space"></span>
- <button class="b3-button b3-button--outline" data-action="restore">${window.siyuan.languages.entryRestoreBase}</button>
+ <button class="b3-button b3-button--outline" data-action="restore">${window.siyuan.languages.entryRestoreBase.replace("${x}", baseLabel(draft.base))}</button>
</div>
</div>
<div data-type="entry-sections"></div>
@@ -233,6 +233,10 @@ const openProfileEditor = (root: HTMLElement, profileID?: string) => {
</div>`;
const sections = view.querySelector<HTMLElement>("[data-type='entry-sections']");
const searchInput = view.querySelector<HTMLInputElement>("[data-type='entry-search']");
+ const restoreButton = view.querySelector<HTMLButtonElement>("[data-action='restore']");
+ const updateRestoreButton = () => {
+ restoreButton.textContent = window.siyuan.languages.entryRestoreBase.replace("${x}", baseLabel(draft.base));
+ };
const renderSections = () => {
sections.innerHTML = entryCatalog.map((section) => `<div class="config-group" data-entry-section>
<div class="config-title">${escapeHtml(section.label())}</div>
@@ -286,6 +290,7 @@ const openProfileEditor = (root: HTMLElement, profileID?: string) => {
draft.entries[path] = isEntryVisible(path);
});
}
+ updateRestoreButton();
renderSections();
filterSections();
});
@@ -294,7 +299,9 @@ const openProfileEditor = (root: HTMLElement, profileID?: string) => {
if (action === "back" || action === "cancel") {
closeEditor();
} else if (action === "restore") {
- confirmDialog(window.siyuan.languages.entryRestoreBase, window.siyuan.languages.entryRestoreBaseConfirm, () => {
+ const restoreTarget = baseLabel(draft.base);
+ confirmDialog(window.siyuan.languages.entryRestoreBase.replace("${x}", restoreTarget),
+ window.siyuan.languages.entryRestoreBaseConfirm.replace("${x}", restoreTarget), () => {
draft.entries = createEntryProfileSnapshot(draft.base);
renderSections();
filterSections();