Skip to content

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

:art: Replace document tree click switches with click mode settings https://github.com/siyuan-note/siyuan/issues/18097

Jeffrey Chen45c655034d1e
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.json
index ab280a69f9..06ea5a8ea7 100644
--- a/app/appearance/langs/ar.json
+++ b/app/appearance/langs/ar.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "النقر على أيقونة مستند",
+ "docIconClickActionTip": "الإجراء عند النقر على أيقونة مستند",
+ "parentDocTitleClickAction": "النقر على عنوان المستند الأصل",
+ "parentDocTitleClickActionTip": "اختر الإجراء عند النقر على عنوان المستند الأصل؛ المستندات التي لا تحتوي على مستندات فرعية تُفتح دائمًا مباشرة. يفتح خيار النقر المزدوج المستند الأصل دون تغيير حالة التوسيع، لكن النقرة الواحدة تنتظر نحو 300 مللي ثانية للتمييز بينهما",
+ "docTreeClickExpandChildren": "توسيع أو طي المستندات الفرعية",
+ "docTreeClickExpandChildrenDblclick": "توسيع أو طي المستندات الفرعية (النقر المزدوج يفتح المستند الأصل)",
"newRelationItemWithTemplate": "إنشاء باستخدام القالب الافتراضي في ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "إنشاء باستخدام الاسم المُدخل في ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "فتح المستند الأصل بالنقر المزدوج على العنوان",
- "parentDocDoubleClickOpenTip": "عند التفعيل، يؤدي النقر أو اللمس المزدوج على العنوان إلى فتح المستند الأصل مع الحفاظ على حالة التوسيع؛ تنتظر النقرة أو اللمسة الواحدة نحو 300 مللي ثانية للتعرف على النقر المزدوج. عند التعطيل، تعمل النقرة أو اللمسة الواحدة على توسيع المستندات الفرعية أو طيها مباشرة",
"decisionSaveFailed": "تعذّر حفظ إعدادات خدمة القرار؛ لا تزال مسودتك متاحة",
"decisionProvidersTip": "تُحفظ إعدادات المزوّدين بشكل منفصل؛ يسري التبديل على الطلبات الجديدة",
"decisionCurrentProvider": "قيد الاستخدام حاليًا",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "فشل استيراد Obsidian Vault",
"openDocument": "فتح المستند",
"docIconClickExpand": "انقر فوق أيقونة المستند أو دفتر الملاحظات لتوسيع المستندات الفرعية أو طيها",
- "docIconClickExpandTip": "عند التمكين، يؤدي النقر فوق أيقونة مستند أو دفتر ملاحظات إلى توسيع المستندات الفرعية أو طيها؛ وعند عدم وجود مستندات فرعية، يُفتح المستند إن كان متاحًا، وإلا يمكن تغيير الأيقونة؛ وعند التعطيل، يؤدي النقر فوق أي من الأيقونتين إلى تغييرها",
- "parentDocClickExpand": "انقر فوق عنوان المستند الأصل لتوسيع المستندات الفرعية أو طيها",
- "parentDocClickExpandTip": "عند التفعيل، يؤدي النقر أو اللمس على عنوان المستند الأصل إلى توسيع المستندات الفرعية أو طيها؛ وتظل المستندات التي لا تحتوي على مستندات فرعية تُفتح بنقرة أو لمسة واحدة",
"mcpStatusAuthorizing": "جارٍ التفويض",
"mcpStatusAuthorizationRequired": "التفويض مطلوب",
"mcpAuthorize": "تفويض",
diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.json
index 26b6df2228..8d676f2b25 100644
--- a/app/appearance/langs/de.json
+++ b/app/appearance/langs/de.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Klick auf ein Dokumentsymbol",
+ "docIconClickActionTip": "Aktion beim Klicken auf ein Dokumentsymbol",
+ "parentDocTitleClickAction": "Klick auf den Titel eines übergeordneten Dokuments",
+ "parentDocTitleClickActionTip": "Aktion beim Klicken auf den Titel eines übergeordneten Dokuments auswählen; Dokumente ohne untergeordnete Dokumente öffnen sich immer direkt. Die Doppelklickoption öffnet das übergeordnete Dokument ohne Änderung des Aufklappzustands, ein einzelner Klick wartet jedoch etwa 300 ms zur Unterscheidung",
+ "docTreeClickExpandChildren": "Untergeordnete Dokumente ein- oder ausklappen",
+ "docTreeClickExpandChildrenDblclick": "Untergeordnete Dokumente ein- oder ausklappen (Doppelklick öffnet das übergeordnete Dokument)",
"newRelationItemWithTemplate": "Mit Standardvorlage in ${x} erstellen: <b>${y}</b>",
"newRelationItemWithInputName": "Mit eingegebenem Namen in ${x} erstellen: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Über einen Doppelklick auf den Titel das übergeordnete Dokument öffnen",
- "parentDocDoubleClickOpenTip": "Wenn aktiviert, öffnet ein Doppelklick oder Doppeltippen auf den Titel das übergeordnete Dokument ohne Änderung des Aufklappzustands; ein einzelner Klick oder Tipp wartet etwa 300 ms zur Doppelklickerkennung. Wenn deaktiviert, klappt ein einzelner Klick oder Tipp die untergeordneten Dokumente direkt auf oder zu",
"decisionSaveFailed": "Die Einstellungen des Entscheidungsdienstes konnten nicht gespeichert werden; Ihr Entwurf bleibt erhalten",
"decisionProvidersTip": "Anbietereinstellungen werden getrennt gespeichert; ein Wechsel gilt für neue Anfragen",
"decisionCurrentProvider": "Aktuell verwendet",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Import des Obsidian Vault fehlgeschlagen",
"openDocument": "Dokument öffnen",
"docIconClickExpand": "Dokument- oder Notizbuchsymbol zum Ein- oder Ausklappen untergeordneter Dokumente anklicken",
- "docIconClickExpandTip": "Wenn aktiviert, werden untergeordnete Dokumente durch Anklicken eines Dokument- oder Notizbuchsymbols ein- oder ausgeklappt; ohne untergeordnete Dokumente wird ein verfügbares Dokument geöffnet, andernfalls kann das Symbol geändert werden; wenn deaktiviert, wird das jeweils angeklickte Symbol geändert",
- "parentDocClickExpand": "Titel des übergeordneten Dokuments zum Ein- oder Ausklappen untergeordneter Dokumente anklicken",
- "parentDocClickExpandTip": "Wenn aktiviert, klappt ein Klick oder Tipp auf den Titel eines übergeordneten Dokuments dessen untergeordnete Dokumente auf oder zu; Dokumente ohne untergeordnete Dokumente öffnen sich weiterhin mit einem Klick oder Tipp",
"mcpStatusAuthorizing": "Autorisierung läuft",
"mcpStatusAuthorizationRequired": "Autorisierung erforderlich",
"mcpAuthorize": "Autorisieren",
diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.json
index a254e533d3..7c0064631c 100644
--- a/app/appearance/langs/en.json
+++ b/app/appearance/langs/en.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Clicking a document icon",
+ "docIconClickActionTip": "Action performed by clicking a document icon",
+ "parentDocTitleClickAction": "Clicking a parent document title",
+ "parentDocTitleClickActionTip": "Choose the action for clicking a parent document title; documents without child documents always open directly. The double-click option opens the parent without changing its expansion state, but a single click waits about 300 ms to tell the two apart",
+ "docTreeClickExpandChildren": "Expand or collapse child documents",
+ "docTreeClickExpandChildrenDblclick": "Expand or collapse child documents (double-click opens the parent)",
"newRelationItemWithTemplate": "Create with default template in ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Create with input name in ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Double-click a title to open the parent document",
- "parentDocDoubleClickOpenTip": "When enabled, double-click or double-tap a title to open the parent without changing its expansion state; a single click or tap waits about 300 ms to distinguish a double click. When disabled, a single click or tap directly expands or collapses child documents",
"decisionSaveFailed": "Unable to save the decision service settings; your draft is still available",
"decisionProvidersTip": "Provider settings are saved separately; switching applies to new requests",
"decisionCurrentProvider": "Currently in use",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault import failed",
"openDocument": "Open document",
"docIconClickExpand": "Click document or notebook icon to expand or collapse child documents",
- "docIconClickExpandTip": "When enabled, clicking a document or notebook icon expands or collapses child documents; when there are no child documents, an available document opens, otherwise the icon can be changed; when disabled, clicking either icon changes it",
- "parentDocClickExpand": "Click parent document title to expand or collapse child documents",
- "parentDocClickExpandTip": "When enabled, click or tap a parent title to expand or collapse child documents; documents without children still open with one click or tap",
"mcpStatusAuthorizing": "Authorizing",
"mcpStatusAuthorizationRequired": "Authorization required",
"mcpAuthorize": "Authorize",
diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.json
index abb9636e11..7bf90c9ca5 100644
--- a/app/appearance/langs/es.json
+++ b/app/appearance/langs/es.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Clic en el icono de un documento",
+ "docIconClickActionTip": "Acción al hacer clic en el icono de un documento",
+ "parentDocTitleClickAction": "Clic en el título del documento padre",
+ "parentDocTitleClickActionTip": "Elige la acción al hacer clic en el título del documento padre; los documentos sin documentos secundarios siempre se abren directamente. La opción de doble clic abre el documento padre sin cambiar su estado de expansión, pero un clic simple espera unos 300 ms para distinguirlos",
+ "docTreeClickExpandChildren": "Expandir o contraer documentos secundarios",
+ "docTreeClickExpandChildrenDblclick": "Expandir o contraer documentos secundarios (doble clic abre el documento padre)",
"newRelationItemWithTemplate": "Crear con la plantilla predeterminada en ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Crear con el nombre introducido en ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Abrir el documento padre al hacer doble clic en el título",
- "parentDocDoubleClickOpenTip": "Al activar esta opción, un doble clic o doble toque en el título abre el documento padre sin cambiar su estado de expansión; un clic o toque espera unos 300 ms para detectar el doble clic. Al desactivarla, un clic o toque expande o contrae directamente los documentos hijos",
"decisionSaveFailed": "No se pudo guardar la configuración del servicio de decisión; el borrador se conserva",
"decisionProvidersTip": "La configuración de cada proveedor se guarda por separado; el cambio se aplica a las nuevas solicitudes",
"decisionCurrentProvider": "En uso",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Error al importar Obsidian Vault",
"openDocument": "Abrir documento",
"docIconClickExpand": "Haz clic en el icono del documento o del cuaderno para expandir o contraer los documentos secundarios",
- "docIconClickExpandTip": "Cuando está activado, al hacer clic en el icono de un documento o cuaderno se expanden o contraen los documentos secundarios; si no hay documentos secundarios, se abre un documento si está disponible; de lo contrario, se puede cambiar el icono; cuando está desactivado, al hacer clic en cualquiera de los iconos se cambia",
- "parentDocClickExpand": "Haz clic en el título del documento principal para expandir o contraer los documentos secundarios",
- "parentDocClickExpandTip": "Al activar esta opción, un clic o toque en el título del documento padre expande o contrae los documentos hijos; los documentos sin hijos se siguen abriendo con un clic o toque",
"mcpStatusAuthorizing": "Autorizando",
"mcpStatusAuthorizationRequired": "Se requiere autorización",
"mcpAuthorize": "Autorizar",
diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.json
index 5823440630..7cb6a674eb 100644
--- a/app/appearance/langs/fr.json
+++ b/app/appearance/langs/fr.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Clic sur l’icône d’un document",
+ "docIconClickActionTip": "Action effectuée en cliquant sur l’icône d’un document",
+ "parentDocTitleClickAction": "Clic sur le titre du document parent",
+ "parentDocTitleClickActionTip": "Choisissez l’action effectuée en cliquant sur le titre du document parent ; les documents sans enfants s’ouvrent toujours directement. L’option de double-clic ouvre le document parent sans modifier son état de déploiement, mais un clic simple attend environ 300 ms pour les distinguer",
+ "docTreeClickExpandChildren": "Développer ou réduire les documents enfants",
+ "docTreeClickExpandChildrenDblclick": "Développer ou réduire les documents enfants (double-clic pour ouvrir le document parent)",
"newRelationItemWithTemplate": "Créer avec le modèle par défaut dans ${x} : <b>${y}</b>",
"newRelationItemWithInputName": "Créer avec le nom saisi dans ${x} : <b>${y}</b>",
- "parentDocDoubleClickOpen": "Double-cliquer sur le titre pour ouvrir le document parent",
- "parentDocDoubleClickOpenTip": "Lorsque cette option est activée, un double-clic ou un double appui sur le titre ouvre le document parent sans modifier son état de déploiement ; un clic ou appui simple attend environ 300 ms pour détecter un double-clic. Lorsqu’elle est désactivée, un clic ou appui simple développe ou réduit directement les documents enfants",
"decisionSaveFailed": "Impossible d’enregistrer les paramètres du service de décision ; votre brouillon est conservé",
"decisionProvidersTip": "Les paramètres des fournisseurs sont enregistrés séparément ; le changement s’applique aux nouvelles requêtes",
"decisionCurrentProvider": "Actuellement utilisé",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Échec de l’importation du coffre Obsidian",
"openDocument": "Ouvrir le document",
"docIconClickExpand": "Cliquer sur l’icône d’un document ou d’un carnet pour développer ou réduire les documents enfants",
- "docIconClickExpandTip": "Lorsque cette option est activée, cliquer sur l’icône d’un document ou d’un carnet développe ou réduit les documents enfants ; en l’absence de document enfant, un document disponible s’ouvre, sinon l’icône peut être modifiée ; lorsqu’elle est désactivée, cliquer sur l’une ou l’autre icône permet de la modifier",
- "parentDocClickExpand": "Cliquer sur le titre du document parent pour développer ou réduire les documents enfants",
- "parentDocClickExpandTip": "Lorsque cette option est activée, un clic ou un appui sur le titre du document parent développe ou réduit les documents enfants ; les documents sans enfants s’ouvrent toujours en un clic ou un appui",
"mcpStatusAuthorizing": "Autorisation en cours",
"mcpStatusAuthorizationRequired": "Autorisation requise",
"mcpAuthorize": "Autoriser",
diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.json
index 2162a95a27..aafc977c1f 100644
--- a/app/appearance/langs/he.json
+++ b/app/appearance/langs/he.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "לחיצה על סמל מסמך",
+ "docIconClickActionTip": "הפעולה בעת לחיצה על סמל מסמך",
+ "parentDocTitleClickAction": "לחיצה על כותרת מסמך האב",
+ "parentDocTitleClickActionTip": "בחרו את הפעולה בעת לחיצה על כותרת מסמך האב; מסמכים ללא מסמכי משנה נפתחים תמיד ישירות. אפשרות הלחיצה הכפולה פותחת את מסמך האב בלי לשנות את מצב ההרחבה, אך לחיצה יחידה ממתינה כ־300 מילישניות כדי להבחין ביניהן",
+ "docTreeClickExpandChildren": "הרחבה או כיווץ של מסמכי משנה",
+ "docTreeClickExpandChildrenDblclick": "הרחבה או כיווץ של מסמכי משנה (לחיצה כפולה פותחת את מסמך האב)",
"newRelationItemWithTemplate": "יצירה עם תבנית ברירת המחדל ב־${x}: <b>${y}</b>",
"newRelationItemWithInputName": "יצירה עם השם שהוזן ב־${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "פתיחת מסמך האב בלחיצה כפולה על הכותרת",
- "parentDocDoubleClickOpenTip": "כאשר האפשרות מופעלת, לחיצה או הקשה כפולה על הכותרת פותחת את מסמך האב בלי לשנות את מצב ההרחבה; לחיצה או הקשה יחידה ממתינה כ־300 מילישניות כדי לזהות לחיצה כפולה. כאשר האפשרות כבויה, לחיצה או הקשה יחידה מרחיבה או מכווצת מיד את מסמכי המשנה",
"decisionSaveFailed": "לא ניתן לשמור את הגדרות שירות ההחלטות; הטיוטה שלך נשמרה",
"decisionProvidersTip": "הגדרות הספקים נשמרות בנפרד; ההחלפה חלה על בקשות חדשות",
"decisionCurrentProvider": "בשימוש כעת",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "ייבוא Obsidian Vault נכשל",
"openDocument": "פתיחת מסמך",
"docIconClickExpand": "לחיצה על סמל מסמך או מחברת כדי להרחיב או לכווץ מסמכי משנה",
- "docIconClickExpandTip": "כאשר האפשרות מופעלת, לחיצה על סמל מסמך או מחברת מרחיבה או מכווצת מסמכי משנה; כשאין מסמכי משנה, מסמך זמין נפתח, אחרת ניתן לשנות את הסמל; כאשר האפשרות מושבתת, לחיצה על אחד מהסמלים משנה אותו",
- "parentDocClickExpand": "לחיצה על כותרת מסמך האב כדי להרחיב או לכווץ מסמכי משנה",
- "parentDocClickExpandTip": "כאשר האפשרות מופעלת, לחיצה או הקשה על כותרת מסמך האב מרחיבה או מכווצת את מסמכי המשנה; מסמכים ללא מסמכי משנה עדיין נפתחים בלחיצה או בהקשה אחת",
"mcpStatusAuthorizing": "מתבצע אישור",
"mcpStatusAuthorizationRequired": "נדרש אישור",
"mcpAuthorize": "אישור",
diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.json
index 35844ed426..ab7ba58b67 100644
--- a/app/appearance/langs/hi.json
+++ b/app/appearance/langs/hi.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "दस्तावेज़ आइकन पर क्लिक",
+ "docIconClickActionTip": "दस्तावेज़ आइकन पर क्लिक करने पर होने वाली क्रिया",
+ "parentDocTitleClickAction": "मूल दस्तावेज़ के शीर्षक पर क्लिक",
+ "parentDocTitleClickActionTip": "मूल दस्तावेज़ के शीर्षक पर क्लिक करने पर होने वाली क्रिया चुनें; बिना उप-दस्तावेज़ वाले दस्तावेज़ हमेशा सीधे खुलते हैं। डबल-क्लिक विकल्प विस्तार की स्थिति बदले बिना मूल दस्तावेज़ खोलता है, परंतु एक क्लिक दोनों में अंतर करने के लिए लगभग 300 मिलीसेकंड प्रतीक्षा करता है",
+ "docTreeClickExpandChildren": "उप-दस्तावेज़ फैलाएँ या समेटें",
+ "docTreeClickExpandChildrenDblclick": "उप-दस्तावेज़ फैलाएँ या समेटें (डबल-क्लिक से मूल दस्तावेज़ खुलता है)",
"newRelationItemWithTemplate": "${x} में डिफ़ॉल्ट टेम्पलेट से बनाएँ: <b>${y}</b>",
"newRelationItemWithInputName": "${x} में दर्ज किए गए नाम से बनाएँ: <b>${y}</b>",
- "parentDocDoubleClickOpen": "शीर्षक पर डबल-क्लिक करके मूल दस्तावेज़ खोलें",
- "parentDocDoubleClickOpenTip": "सक्षम होने पर शीर्षक पर डबल-क्लिक या दो बार टैप करने से विस्तार की स्थिति बदले बिना मूल दस्तावेज़ खुलता है; एक क्लिक या टैप डबल-क्लिक पहचानने के लिए लगभग 300 मिलीसेकंड प्रतीक्षा करता है। अक्षम होने पर एक क्लिक या टैप सीधे उप-दस्तावेज़ों को फैलाता या समेटता है",
"decisionSaveFailed": "निर्णय सेवा की सेटिंग सहेजी नहीं जा सकीं; आपका मसौदा सुरक्षित है",
"decisionProvidersTip": "प्रदाताओं की सेटिंग अलग-अलग सहेजी जाती हैं; बदलाव नए अनुरोधों पर लागू होता है",
"decisionCurrentProvider": "अभी उपयोग में",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault आयात विफल रहा",
"openDocument": "दस्तावेज़ खोलें",
"docIconClickExpand": "चाइल्ड दस्तावेज़ों को विस्तृत या संक्षिप्त करने के लिए दस्तावेज़ या नोटबुक आइकन पर क्लिक करें",
- "docIconClickExpandTip": "सक्षम होने पर दस्तावेज़ या नोटबुक आइकन पर क्लिक करने से चाइल्ड दस्तावेज़ विस्तृत या संक्षिप्त होते हैं; चाइल्ड दस्तावेज़ न होने पर उपलब्ध दस्तावेज़ खुलता है, अन्यथा आइकन बदला जा सकता है; अक्षम होने पर किसी भी आइकन पर क्लिक करने से वह बदलता है",
- "parentDocClickExpand": "चाइल्ड दस्तावेज़ों को विस्तृत या संक्षिप्त करने के लिए पैरेंट दस्तावेज़ के शीर्षक पर क्लिक करें",
- "parentDocClickExpandTip": "सक्षम होने पर मूल दस्तावेज़ के शीर्षक पर क्लिक या टैप करने से उप-दस्तावेज़ फैलते या सिमटते हैं; बिना उप-दस्तावेज़ वाले दस्तावेज़ अब भी एक क्लिक या टैप से खुलते हैं",
"mcpStatusAuthorizing": "प्राधिकरण जारी है",
"mcpStatusAuthorizationRequired": "प्राधिकरण आवश्यक है",
"mcpAuthorize": "प्राधिकृत करें",
diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.json
index 646a41e0b5..ed420bca2c 100644
--- a/app/appearance/langs/id.json
+++ b/app/appearance/langs/id.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Klik ikon dokumen",
+ "docIconClickActionTip": "Tindakan saat mengeklik ikon dokumen",
+ "parentDocTitleClickAction": "Klik judul dokumen induk",
+ "parentDocTitleClickActionTip": "Pilih tindakan saat mengeklik judul dokumen induk; dokumen tanpa dokumen anak selalu terbuka langsung. Opsi klik ganda membuka dokumen induk tanpa mengubah status perluasannya, tetapi satu klik menunggu sekitar 300 ms untuk membedakannya",
+ "docTreeClickExpandChildren": "Perluas atau ciutkan dokumen anak",
+ "docTreeClickExpandChildrenDblclick": "Perluas atau ciutkan dokumen anak (klik ganda membuka dokumen induk)",
"newRelationItemWithTemplate": "Buat dengan templat bawaan di ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Buat dengan nama yang dimasukkan di ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Buka dokumen induk dengan klik ganda pada judul",
- "parentDocDoubleClickOpenTip": "Jika diaktifkan, klik atau ketuk dua kali pada judul membuka dokumen induk tanpa mengubah status perluasannya; satu klik atau ketukan menunggu sekitar 300 ms untuk mengenali klik ganda. Jika dinonaktifkan, satu klik atau ketukan langsung memperluas atau menciutkan dokumen anak",
"decisionSaveFailed": "Tidak dapat menyimpan pengaturan layanan keputusan; draf Anda tetap tersedia",
"decisionProvidersTip": "Pengaturan penyedia disimpan terpisah; pergantian berlaku untuk permintaan baru",
"decisionCurrentProvider": "Sedang digunakan",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Impor Obsidian Vault gagal",
"openDocument": "Buka dokumen",
"docIconClickExpand": "Klik ikon dokumen atau buku catatan untuk memperluas atau menciutkan dokumen anak",
- "docIconClickExpandTip": "Jika diaktifkan, mengeklik ikon dokumen atau buku catatan akan memperluas atau menciutkan dokumen anak; jika tidak ada dokumen anak, dokumen yang tersedia akan dibuka, jika tidak, ikon dapat diubah; jika dinonaktifkan, mengeklik salah satu ikon akan mengubahnya",
- "parentDocClickExpand": "Klik judul dokumen induk untuk memperluas atau menciutkan dokumen anak",
- "parentDocClickExpandTip": "Jika diaktifkan, klik atau ketuk judul dokumen induk untuk memperluas atau menciutkan dokumen anak; dokumen tanpa anak tetap terbuka dengan satu klik atau ketukan",
"mcpStatusAuthorizing": "Mengotorisasi",
"mcpStatusAuthorizationRequired": "Otorisasi diperlukan",
"mcpAuthorize": "Otorisasi",
diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.json
index 21af3783e8..891c931d49 100644
--- a/app/appearance/langs/it.json
+++ b/app/appearance/langs/it.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Clic sull’icona di un documento",
+ "docIconClickActionTip": "Azione eseguita facendo clic sull’icona di un documento",
+ "parentDocTitleClickAction": "Clic sul titolo del documento padre",
+ "parentDocTitleClickActionTip": "Scegli l’azione eseguita facendo clic sul titolo del documento padre; i documenti senza documenti secondari si aprono sempre direttamente. L’opzione doppio clic apre il documento padre senza modificarne lo stato di espansione, ma un clic singolo attende circa 300 ms per distinguerli",
+ "docTreeClickExpandChildren": "Espandi o comprimi i documenti secondari",
+ "docTreeClickExpandChildrenDblclick": "Espandi o comprimi i documenti secondari (doppio clic apre il documento padre)",
"newRelationItemWithTemplate": "Crea con il modello predefinito in ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Crea con il nome inserito in ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Apri il documento padre con un doppio clic sul titolo",
- "parentDocDoubleClickOpenTip": "Se attivato, un doppio clic o doppio tocco sul titolo apre il documento padre senza modificarne lo stato di espansione; un clic o tocco singolo attende circa 300 ms per rilevare il doppio clic. Se disattivato, un clic o tocco singolo espande o comprime direttamente i documenti figli",
"decisionSaveFailed": "Impossibile salvare le impostazioni del servizio decisionale; la bozza è stata conservata",
"decisionProvidersTip": "Le impostazioni dei fornitori vengono salvate separatamente; il cambio si applica alle nuove richieste",
"decisionCurrentProvider": "Attualmente in uso",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Importazione di Obsidian Vault non riuscita",
"openDocument": "Apri documento",
"docIconClickExpand": "Fai clic sull’icona di un documento o di un taccuino per espandere o comprimere i documenti secondari",
- "docIconClickExpandTip": "Quando è attiva, facendo clic sull’icona di un documento o di un taccuino si espandono o comprimono i documenti secondari; se non sono presenti documenti secondari, viene aperto un documento disponibile, altrimenti è possibile modificare l’icona; quando è disattiva, facendo clic su una delle due icone la si modifica",
- "parentDocClickExpand": "Fai clic sul titolo del documento principale per espandere o comprimere i documenti secondari",
- "parentDocClickExpandTip": "Se attivato, un clic o tocco sul titolo del documento padre espande o comprime i documenti figli; i documenti senza figli si aprono comunque con un clic o tocco",
"mcpStatusAuthorizing": "Autorizzazione in corso",
"mcpStatusAuthorizationRequired": "Autorizzazione richiesta",
"mcpAuthorize": "Autorizza",
diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.json
index 2e271f60cc..fae8b2b567 100644
--- a/app/appearance/langs/ja.json
+++ b/app/appearance/langs/ja.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "文書アイコンをクリックしたとき",
+ "docIconClickActionTip": "文書アイコンをクリックしたときの動作",
+ "parentDocTitleClickAction": "親文書のタイトルをクリックしたとき",
+ "parentDocTitleClickActionTip": "親文書のタイトルをクリックしたときの動作を選択します。子文書がない場合は常に直接開きます。ダブルクリックで開くオプションは展開状態を変えずに親文書を開きますが、シングルクリックは約 300 ミリ秒待ってダブルクリックを判定します",
+ "docTreeClickExpandChildren": "子文書を展開または折りたたむ",
+ "docTreeClickExpandChildrenDblclick": "子文書を展開または折りたたむ(ダブルクリックで親文書を開く)",
"newRelationItemWithTemplate": "${x} にデフォルトテンプレートで新規作成:<b>${y}</b>",
"newRelationItemWithInputName": "${x} に入力した名前で新規作成:<b>${y}</b>",
- "parentDocDoubleClickOpen": "タイトルをダブルクリックして親文書を開く",
- "parentDocDoubleClickOpenTip": "有効にすると、タイトルをダブルクリックまたはダブルタップして展開状態を変えずに親文書を開きます。シングルクリックまたはタップは約 300 ミリ秒待ってダブルクリックを判定します。無効にすると、1 回のクリックまたはタップで子文書を直接展開または折りたたみます",
"decisionSaveFailed": "判定サービスの設定を保存できませんでした。編集中の内容は保持されています",
"decisionProvidersTip": "プロバイダーごとに設定を保存します。切り替えは新しいリクエストに適用されます",
"decisionCurrentProvider": "使用中",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault のインポートに失敗しました",
"openDocument": "文書を開く",
"docIconClickExpand": "文書またはノートブックのアイコンをクリックして子文書を展開または折りたたむ",
- "docIconClickExpandTip": "有効にすると、文書またはノートブックのアイコンをクリックして子文書を展開または折りたためます。子文書がない場合、開くことのできる文書があれば開き、それ以外の場合はアイコンを変更できます。無効にすると、どちらのアイコンもクリックして変更できます",
- "parentDocClickExpand": "親文書のタイトルをクリックして子文書を展開または折りたたむ",
- "parentDocClickExpandTip": "有効にすると、親文書のタイトルをクリックまたはタップして子文書を展開または折りたたみます。子文書がない場合は、1 回のクリックまたはタップで直接開きます",
"mcpStatusAuthorizing": "認可中",
"mcpStatusAuthorizationRequired": "認可が必要です",
"mcpAuthorize": "認可",
diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.json
index 88bcf228c3..4be09f54b1 100644
--- a/app/appearance/langs/ko.json
+++ b/app/appearance/langs/ko.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "문서 아이콘 클릭",
+ "docIconClickActionTip": "문서 아이콘을 클릭할 때 수행할 동작",
+ "parentDocTitleClickAction": "상위 문서 제목 클릭",
+ "parentDocTitleClickActionTip": "상위 문서 제목을 클릭할 때 수행할 동작을 선택합니다. 하위 문서가 없으면 항상 바로 엽니다. 두 번 클릭 옵션은 펼침 상태를 바꾸지 않고 상위 문서를 열지만, 한 번 클릭하면 구분을 위해 약 300밀리초 기다립니다",
+ "docTreeClickExpandChildren": "하위 문서 펼치기 또는 접기",
+ "docTreeClickExpandChildrenDblclick": "하위 문서 펼치기 또는 접기(두 번 클릭하면 상위 문서 열기)",
"newRelationItemWithTemplate": "${x}에 기본 템플릿으로 새로 만들기: <b>${y}</b>",
"newRelationItemWithInputName": "${x}에 입력한 이름으로 새로 만들기: <b>${y}</b>",
- "parentDocDoubleClickOpen": "제목을 두 번 클릭하여 상위 문서 열기",
- "parentDocDoubleClickOpenTip": "활성화하면 제목을 두 번 클릭하거나 탭하여 펼침 상태를 유지한 채 상위 문서를 엽니다. 한 번 클릭하거나 탭하면 두 번 클릭인지 판단하기 위해 약 300밀리초 기다립니다. 비활성화하면 한 번 클릭하거나 탭하여 하위 문서를 바로 펼치거나 접습니다",
"decisionSaveFailed": "의사결정 서비스 설정을 저장할 수 없습니다. 작성 중인 내용은 유지됩니다",
"decisionProvidersTip": "공급자 설정은 개별 저장되며 전환은 새 요청에 적용됩니다",
"decisionCurrentProvider": "현재 사용 중",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault 가져오기 실패",
"openDocument": "문서 열기",
"docIconClickExpand": "문서 또는 노트북 아이콘을 클릭하여 하위 문서 펼치기 또는 접기",
- "docIconClickExpandTip": "활성화하면 문서 또는 노트북 아이콘을 클릭하여 하위 문서를 펼치거나 접을 수 있습니다. 하위 문서가 없으면 열 수 있는 문서를 열고, 그렇지 않으면 아이콘을 변경할 수 있습니다. 비활성화하면 어느 아이콘이든 클릭하여 변경할 수 있습니다",
- "parentDocClickExpand": "상위 문서 제목을 클릭하여 하위 문서 펼치기 또는 접기",
- "parentDocClickExpandTip": "활성화하면 상위 문서 제목을 클릭하거나 탭하여 하위 문서를 펼치거나 접습니다. 하위 문서가 없으면 한 번 클릭하거나 탭하여 바로 엽니다",
"mcpStatusAuthorizing": "인증 중",
"mcpStatusAuthorizationRequired": "인증 필요",
"mcpAuthorize": "인증",
diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.json
index 0a90ff5499..a933d902c6 100644
--- a/app/appearance/langs/nl.json
+++ b/app/appearance/langs/nl.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Klikken op een documentpictogram",
+ "docIconClickActionTip": "Actie bij het klikken op een documentpictogram",
+ "parentDocTitleClickAction": "Klikken op de titel van een bovenliggend document",
+ "parentDocTitleClickActionTip": "Kies de actie bij het klikken op de titel van een bovenliggend document; documenten zonder onderliggende documenten openen altijd direct. De dubbelklikoptie opent het bovenliggende document zonder de uitvouwstatus te wijzigen, maar een enkele klik wacht ongeveer 300 ms om beide te onderscheiden",
+ "docTreeClickExpandChildren": "Onderliggende documenten uit- of inklappen",
+ "docTreeClickExpandChildrenDblclick": "Onderliggende documenten uit- of inklappen (dubbelklik opent het bovenliggende document)",
"newRelationItemWithTemplate": "Met standaardsjabloon maken in ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Met ingevoerde naam maken in ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Bovenliggend document openen met een dubbelklik op de titel",
- "parentDocDoubleClickOpenTip": "Als dit is ingeschakeld, opent een dubbelklik of dubbele tik op de titel het bovenliggende document zonder de uitvouwstatus te wijzigen; een enkele klik of tik wacht ongeveer 300 ms om een dubbelklik te herkennen. Als dit is uitgeschakeld, vouwt een enkele klik of tik de onderliggende documenten direct uit of in",
"decisionSaveFailed": "De instellingen van de beslissingsdienst konden niet worden opgeslagen; uw concept is bewaard",
"decisionProvidersTip": "Providerinstellingen worden afzonderlijk opgeslagen; wisselen geldt voor nieuwe verzoeken",
"decisionCurrentProvider": "Momenteel in gebruik",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Importeren van Obsidian Vault mislukt",
"openDocument": "Document openen",
"docIconClickExpand": "Klik op het document- of notitieboekpictogram om onderliggende documenten uit of in te klappen",
- "docIconClickExpandTip": "Indien ingeschakeld, worden onderliggende documenten uit- of ingeklapt door op een document- of notitieboekpictogram te klikken; zonder onderliggende documenten wordt een beschikbaar document geopend, anders kan het pictogram worden gewijzigd; indien uitgeschakeld, wordt het aangeklikte pictogram gewijzigd",
- "parentDocClickExpand": "Klik op de titel van het bovenliggende document om onderliggende documenten uit of in te klappen",
- "parentDocClickExpandTip": "Als dit is ingeschakeld, vouwt een klik of tik op de titel van het bovenliggende document de onderliggende documenten uit of in; documenten zonder onderliggende documenten openen nog steeds met één klik of tik",
"mcpStatusAuthorizing": "Bezig met autoriseren",
"mcpStatusAuthorizationRequired": "Autorisatie vereist",
"mcpAuthorize": "Autoriseren",
diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.json
index a0b1944525..810ce14d34 100644
--- a/app/appearance/langs/pl.json
+++ b/app/appearance/langs/pl.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Kliknięcie ikony dokumentu",
+ "docIconClickActionTip": "Działanie po kliknięciu ikony dokumentu",
+ "parentDocTitleClickAction": "Kliknięcie tytułu dokumentu nadrzędnego",
+ "parentDocTitleClickActionTip": "Wybierz działanie po kliknięciu tytułu dokumentu nadrzędnego; dokumenty bez dokumentów podrzędnych zawsze otwierają się bezpośrednio. Opcja dwukrotnego kliknięcia otwiera dokument nadrzędny bez zmiany stanu rozwinięcia, ale pojedyncze kliknięcie czeka około 300 ms na ich rozróżnienie",
+ "docTreeClickExpandChildren": "Rozwiń lub zwiń dokumenty podrzędne",
+ "docTreeClickExpandChildrenDblclick": "Rozwiń lub zwiń dokumenty podrzędne (dwukrotne kliknięcie otwiera dokument nadrzędny)",
"newRelationItemWithTemplate": "Utwórz z domyślnym szablonem w ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Utwórz z wpisaną nazwą w ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Otwieraj dokument nadrzędny po dwukrotnym kliknięciu tytułu",
- "parentDocDoubleClickOpenTip": "Po włączeniu dwukrotne kliknięcie lub stuknięcie tytułu otwiera dokument nadrzędny bez zmiany stanu rozwinięcia; pojedyncze kliknięcie lub stuknięcie czeka około 300 ms na rozpoznanie podwójnego kliknięcia. Po wyłączeniu pojedyncze kliknięcie lub stuknięcie bezpośrednio rozwija lub zwija dokumenty podrzędne",
"decisionSaveFailed": "Nie można zapisać ustawień usługi decyzyjnej; wersja robocza została zachowana",
"decisionProvidersTip": "Ustawienia dostawców są zapisywane oddzielnie; zmiana dotyczy nowych żądań",
"decisionCurrentProvider": "Obecnie używany",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Import Obsidian Vault nie powiódł się",
"openDocument": "Otwórz dokument",
"docIconClickExpand": "Kliknij ikonę dokumentu lub notatnika, aby rozwinąć lub zwinąć dokumenty podrzędne",
- "docIconClickExpandTip": "Po włączeniu kliknięcie ikony dokumentu lub notatnika rozwija albo zwija dokumenty podrzędne; gdy nie ma dokumentów podrzędnych, dostępny dokument zostaje otwarty, w przeciwnym razie ikonę można zmienić; po wyłączeniu kliknięcie dowolnej z tych ikon zmienia ją",
- "parentDocClickExpand": "Kliknij tytuł dokumentu nadrzędnego, aby rozwinąć lub zwinąć dokumenty podrzędne",
- "parentDocClickExpandTip": "Po włączeniu kliknięcie lub stuknięcie tytułu dokumentu nadrzędnego rozwija lub zwija dokumenty podrzędne; dokumenty bez dokumentów podrzędnych nadal otwierają się po jednym kliknięciu lub stuknięciu",
"mcpStatusAuthorizing": "Autoryzowanie",
"mcpStatusAuthorizationRequired": "Wymagana autoryzacja",
"mcpAuthorize": "Autoryzuj",
diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.json
index 128350229f..3e063b8d17 100644
--- a/app/appearance/langs/pt-BR.json
+++ b/app/appearance/langs/pt-BR.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Clique no ícone de um documento",
+ "docIconClickActionTip": "Ação ao clicar no ícone de um documento",
+ "parentDocTitleClickAction": "Clique no título do documento pai",
+ "parentDocTitleClickActionTip": "Escolha a ação ao clicar no título do documento pai; documentos sem filhos sempre abrem diretamente. A opção de clique duplo abre o documento pai sem alterar seu estado de expansão, mas um clique simples aguarda cerca de 300 ms para diferenciá-los",
+ "docTreeClickExpandChildren": "Expandir ou recolher documentos filhos",
+ "docTreeClickExpandChildrenDblclick": "Expandir ou recolher documentos filhos (clique duplo abre o documento pai)",
"newRelationItemWithTemplate": "Criar com o modelo padrão em ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Criar com o nome digitado em ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Abrir o documento pai com um clique duplo no título",
- "parentDocDoubleClickOpenTip": "Quando ativado, um clique duplo ou toque duplo no título abre o documento pai sem alterar seu estado de expansão; um clique ou toque simples aguarda cerca de 300 ms para identificar o clique duplo. Quando desativado, um clique ou toque simples expande ou recolhe diretamente os documentos filhos",
"decisionSaveFailed": "Não foi possível salvar as configurações do serviço de decisão; seu rascunho foi mantido",
"decisionProvidersTip": "As configurações dos provedores são salvas separadamente; a troca se aplica às novas solicitações",
"decisionCurrentProvider": "Em uso",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Falha ao importar Obsidian Vault",
"openDocument": "Abrir documento",
"docIconClickExpand": "Clique no ícone do documento ou do caderno para expandir ou recolher documentos filhos",
- "docIconClickExpandTip": "Quando ativado, clicar no ícone de um documento ou caderno expande ou recolhe os documentos filhos; quando não há documentos filhos, um documento disponível é aberto, caso contrário, o ícone pode ser alterado; quando desativado, clicar em qualquer um dos ícones o altera",
- "parentDocClickExpand": "Clique no título do documento pai para expandir ou recolher documentos filhos",
- "parentDocClickExpandTip": "Quando ativado, um clique ou toque no título do documento pai expande ou recolhe os documentos filhos; documentos sem filhos continuam abrindo com um clique ou toque",
"mcpStatusAuthorizing": "Autorizando",
"mcpStatusAuthorizationRequired": "Autorização necessária",
"mcpAuthorize": "Autorizar",
diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.json
index e6a5b8f2a1..8b956d03f7 100644
--- a/app/appearance/langs/ru.json
+++ b/app/appearance/langs/ru.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Щелчок по значку документа",
+ "docIconClickActionTip": "Действие при щелчке по значку документа",
+ "parentDocTitleClickAction": "Щелчок по заголовку родительского документа",
+ "parentDocTitleClickActionTip": "Выберите действие при щелчке по заголовку родительского документа; документы без дочерних всегда открываются сразу. Вариант с двойным щелчком открывает родительский документ, не меняя состояние раскрытия, но одиночный щелчок ожидает около 300 мс для их различения",
+ "docTreeClickExpandChildren": "Раскрыть или свернуть дочерние документы",
+ "docTreeClickExpandChildrenDblclick": "Раскрыть или свернуть дочерние документы (двойной щелчок открывает родительский документ)",
"newRelationItemWithTemplate": "Создать по шаблону по умолчанию в ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Создать с введённым именем в ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Открывать родительский документ двойным щелчком по заголовку",
- "parentDocDoubleClickOpenTip": "Если включено, двойной щелчок или двойное касание заголовка открывает родительский документ, сохраняя состояние раскрытия; одиночный щелчок или касание ожидает около 300 мс для распознавания двойного щелчка. Если выключено, одиночный щелчок или касание сразу раскрывает или сворачивает дочерние документы",
"decisionSaveFailed": "Не удалось сохранить настройки службы принятия решений; черновик сохранён",
"decisionProvidersTip": "Настройки провайдеров сохраняются отдельно; переключение применяется к новым запросам",
"decisionCurrentProvider": "Используется сейчас",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Не удалось импортировать Obsidian Vault",
"openDocument": "Открыть документ",
"docIconClickExpand": "Нажатие значка документа или блокнота разворачивает или сворачивает дочерние документы",
- "docIconClickExpandTip": "Если включено, нажатие значка документа или блокнота разворачивает либо сворачивает дочерние документы; если дочерних документов нет, открывается доступный документ, иначе значок можно изменить; если выключено, нажатие любого из этих значков изменяет его",
- "parentDocClickExpand": "Нажатие заголовка родительского документа разворачивает или сворачивает дочерние документы",
- "parentDocClickExpandTip": "Если включено, щелчок или касание заголовка родительского документа раскрывает или сворачивает дочерние документы; документы без дочерних по-прежнему открываются одним щелчком или касанием",
"mcpStatusAuthorizing": "Авторизация",
"mcpStatusAuthorizationRequired": "Требуется авторизация",
"mcpAuthorize": "Авторизовать",
diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.json
index dccfd3adb9..4e9bc83de6 100644
--- a/app/appearance/langs/sk.json
+++ b/app/appearance/langs/sk.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Kliknutie na ikonu dokumentu",
+ "docIconClickActionTip": "Činnosť po kliknutí na ikonu dokumentu",
+ "parentDocTitleClickAction": "Kliknutie na názov nadradeného dokumentu",
+ "parentDocTitleClickActionTip": "Vyberte činnosť po kliknutí na názov nadradeného dokumentu; dokumenty bez podradených dokumentov sa vždy otvárajú priamo. Možnosť dvojkliku otvorí nadradený dokument bez zmeny stavu rozbalenia, ale jedno kliknutie čaká približne 300 ms na ich rozlíšenie",
+ "docTreeClickExpandChildren": "Rozbaliť alebo zbaliť podradené dokumenty",
+ "docTreeClickExpandChildrenDblclick": "Rozbaliť alebo zbaliť podradené dokumenty (dvojklik otvorí nadradený dokument)",
"newRelationItemWithTemplate": "Vytvoriť s predvolenou šablónou v ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Vytvoriť so zadaným názvom v ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Otvoriť nadradený dokument dvojklikom na názov",
- "parentDocDoubleClickOpenTip": "Po zapnutí dvojklik alebo dvojité ťuknutie na názov otvorí nadradený dokument bez zmeny stavu rozbalenia; jedno kliknutie alebo ťuknutie čaká približne 300 ms na rozpoznanie dvojkliku. Po vypnutí jedno kliknutie alebo ťuknutie priamo rozbalí alebo zbalí podradené dokumenty",
"decisionSaveFailed": "Nastavenia rozhodovacej služby sa nepodarilo uložiť; koncept zostal zachovaný",
"decisionProvidersTip": "Nastavenia poskytovateľov sa ukladajú oddelene; prepnutie sa vzťahuje na nové požiadavky",
"decisionCurrentProvider": "Aktuálne sa používa",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Import Obsidian Vault zlyhal",
"openDocument": "Otvoriť dokument",
"docIconClickExpand": "Kliknutím na ikonu dokumentu alebo zápisníka rozbaliť alebo zbaliť podradené dokumenty",
- "docIconClickExpandTip": "Ak je možnosť zapnutá, kliknutie na ikonu dokumentu alebo zápisníka rozbalí alebo zbalí podradené dokumenty; ak neexistujú podradené dokumenty, otvorí sa dostupný dokument, inak možno ikonu zmeniť; ak je vypnutá, kliknutie na ktorúkoľvek z ikon ju zmení",
- "parentDocClickExpand": "Kliknutím na nadpis nadradeného dokumentu rozbaliť alebo zbaliť podradené dokumenty",
- "parentDocClickExpandTip": "Po zapnutí kliknutie alebo ťuknutie na názov nadradeného dokumentu rozbalí alebo zbalí podradené dokumenty; dokumenty bez podradených dokumentov sa naďalej otvárajú jedným kliknutím alebo ťuknutím",
"mcpStatusAuthorizing": "Prebieha autorizácia",
"mcpStatusAuthorizationRequired": "Vyžaduje sa autorizácia",
"mcpAuthorize": "Autorizovať",
diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.json
index 4aa1393e30..358f4ed1b9 100644
--- a/app/appearance/langs/sr.json
+++ b/app/appearance/langs/sr.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Клик на иконицу документа",
+ "docIconClickActionTip": "Радња при клику на иконицу документа",
+ "parentDocTitleClickAction": "Клик на наслов надређеног документа",
+ "parentDocTitleClickActionTip": "Изаберите радњу при клику на наслов надређеног документа; документи без подређених докумената увек се отварају непосредно. Опција двоструког клика отвара надређени документ без промене стања проширења, али један клик чека око 300 ms да их разликује",
+ "docTreeClickExpandChildren": "Прошири или скупи подређене документе",
+ "docTreeClickExpandChildrenDblclick": "Прошири или скупи подређене документе (двоструки клик отвара надређени документ)",
"newRelationItemWithTemplate": "Направи са подразумеваним шаблоном у ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Направи са унетим називом у ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Отвори надређени документ двоструким кликом на наслов",
- "parentDocDoubleClickOpenTip": "Када је укључено, двоструки клик или додир на наслов отвара надређени документ без промене стања проширења; један клик или додир чека око 300 ms ради препознавања двоструког клика. Када је искључено, један клик или додир непосредно проширује или скупља подређене документе",
"decisionSaveFailed": "Није могуће сачувати подешавања услуге одлучивања; нацрт је задржан",
"decisionProvidersTip": "Подешавања добављача се чувају одвојено; промена важи за нове захтеве",
"decisionCurrentProvider": "Тренутно се користи",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Uvoz Obsidian Vault-a nije uspeo",
"openDocument": "Otvori dokument",
"docIconClickExpand": "Klik na ikonicu dokumenta ili beležnice razvija ili sklapa poddokumente",
- "docIconClickExpandTip": "Kada je uključeno, klik na ikonicu dokumenta ili beležnice razvija ili sklapa poddokumente; ako poddokumenata nema, otvara se dostupan dokument, a u suprotnom se ikonica može promeniti; kada je isključeno, klik na bilo koju ikonicu je menja",
- "parentDocClickExpand": "Klik na naslov nadređenog dokumenta širi ili sažima poddokumente",
- "parentDocClickExpandTip": "Када је укључено, клик или додир на наслов надређеног документа проширује или скупља подређене документе; документи без подређених докумената и даље се отварају једним кликом или додиром",
"mcpStatusAuthorizing": "Autorizacija u toku",
"mcpStatusAuthorizationRequired": "Potrebna autorizacija",
"mcpAuthorize": "Autorizuj",
diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.json
index ad057aa4b9..74a44ecf63 100644
--- a/app/appearance/langs/th.json
+++ b/app/appearance/langs/th.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "คลิกไอคอนเอกสาร",
+ "docIconClickActionTip": "การทำงานเมื่อคลิกไอคอนเอกสาร",
+ "parentDocTitleClickAction": "คลิกชื่อเอกสารแม่",
+ "parentDocTitleClickActionTip": "เลือกการทำงานเมื่อคลิกชื่อเอกสารแม่ เอกสารที่ไม่มีเอกสารลูกจะเปิดโดยตรงเสมอ ตัวเลือกดับเบิลคลิกจะเปิดเอกสารแม่โดยไม่เปลี่ยนสถานะการขยาย แต่การคลิกครั้งเดียวจะรอประมาณ 300 มิลลิวินาทีเพื่อแยกแยะ",
+ "docTreeClickExpandChildren": "ขยายหรือยุบเอกสารย่อย",
+ "docTreeClickExpandChildrenDblclick": "ขยายหรือยุบเอกสารย่อย (ดับเบิลคลิกเพื่อเปิดเอกสารแม่)",
"newRelationItemWithTemplate": "สร้างด้วยแม่แบบเริ่มต้นใน ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "สร้างด้วยชื่อที่ป้อนใน ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "เปิดเอกสารแม่ด้วยการดับเบิลคลิกที่ชื่อ",
- "parentDocDoubleClickOpenTip": "เมื่อเปิดใช้งาน การดับเบิลคลิกหรือแตะสองครั้งที่ชื่อจะเปิดเอกสารแม่โดยไม่เปลี่ยนสถานะการขยาย การคลิกหรือแตะครั้งเดียวจะรอประมาณ 300 มิลลิวินาทีเพื่อแยกแยะการดับเบิลคลิก เมื่อปิดใช้งาน การคลิกหรือแตะครั้งเดียวจะขยายหรือยุบเอกสารลูกทันที",
"decisionSaveFailed": "ไม่สามารถบันทึกการตั้งค่าบริการตัดสินใจได้ ฉบับร่างของคุณยังคงอยู่",
"decisionProvidersTip": "บันทึกการตั้งค่าของผู้ให้บริการแยกกัน การสลับมีผลกับคำขอใหม่",
"decisionCurrentProvider": "กำลังใช้งาน",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "นำเข้า Obsidian Vault ไม่สำเร็จ",
"openDocument": "เปิดเอกสาร",
"docIconClickExpand": "คลิกไอคอนเอกสารหรือสมุดบันทึกเพื่อขยายหรือยุบเอกสารย่อย",
- "docIconClickExpandTip": "เมื่อเปิดใช้งาน การคลิกไอคอนเอกสารหรือสมุดบันทึกจะขยายหรือยุบเอกสารย่อย เมื่อไม่มีเอกสารย่อย จะเปิดเอกสารที่พร้อมใช้งาน มิฉะนั้นจะสามารถเปลี่ยนไอคอนได้ เมื่อปิดใช้งาน การคลิกไอคอนใดไอคอนหนึ่งจะเปลี่ยนไอคอนนั้น",
- "parentDocClickExpand": "คลิกชื่อเรื่องของเอกสารหลักเพื่อขยายหรือยุบเอกสารย่อย",
- "parentDocClickExpandTip": "เมื่อเปิดใช้งาน การคลิกหรือแตะชื่อเอกสารแม่จะขยายหรือยุบเอกสารลูก เอกสารที่ไม่มีเอกสารลูกยังคงเปิดได้ด้วยการคลิกหรือแตะครั้งเดียว",
"mcpStatusAuthorizing": "กำลังอนุญาต",
"mcpStatusAuthorizationRequired": "ต้องได้รับอนุญาต",
"mcpAuthorize": "อนุญาต",
diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.json
index 742e853708..ee8291d4aa 100644
--- a/app/appearance/langs/tr.json
+++ b/app/appearance/langs/tr.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Belge simgesine tıklama",
+ "docIconClickActionTip": "Belge simgesine tıklandığında yapılacak işlem",
+ "parentDocTitleClickAction": "Üst belge başlığına tıklama",
+ "parentDocTitleClickActionTip": "Üst belge başlığına tıklandığında yapılacak işlemi seçin; alt belgesi olmayan belgeler her zaman doğrudan açılır. Çift tıklama seçeneği genişletme durumunu değiştirmeden üst belgeyi açar, ancak tek tıklama ikisini ayırt etmek için yaklaşık 300 ms bekler",
+ "docTreeClickExpandChildren": "Alt belgeleri genişlet veya daralt",
+ "docTreeClickExpandChildrenDblclick": "Alt belgeleri genişlet veya daralt (çift tıklama üst belgeyi açar)",
"newRelationItemWithTemplate": "${x} içinde varsayılan şablonla oluştur: <b>${y}</b>",
"newRelationItemWithInputName": "${x} içinde girilen adla oluştur: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Üst belgeyi başlığa çift tıklayarak aç",
- "parentDocDoubleClickOpenTip": "Etkinleştirildiğinde başlığa çift tıklamak veya çift dokunmak, genişletme durumunu değiştirmeden üst belgeyi açar; tek tıklama veya dokunma, çift tıklamayı ayırt etmek için yaklaşık 300 ms bekler. Devre dışı bırakıldığında tek tıklama veya dokunma alt belgeleri doğrudan genişletir veya daraltır",
"decisionSaveFailed": "Karar hizmeti ayarları kaydedilemedi; taslağınız korunuyor",
"decisionProvidersTip": "Sağlayıcı ayarları ayrı kaydedilir; değişiklik yeni isteklere uygulanır",
"decisionCurrentProvider": "Şu anda kullanılıyor",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault içe aktarılamadı",
"openDocument": "Belgeyi aç",
"docIconClickExpand": "Alt belgeleri genişletmek veya daraltmak için belge ya da not defteri simgesine tıklayın",
- "docIconClickExpandTip": "Etkinleştirildiğinde belge veya not defteri simgesine tıklamak alt belgeleri genişletir ya da daraltır; alt belge yoksa kullanılabilir bir belge açılır, aksi takdirde simge değiştirilebilir; devre dışı bırakıldığında iki simgeden birine tıklamak o simgeyi değiştirir",
- "parentDocClickExpand": "Alt belgeleri genişletmek veya daraltmak için üst belgenin başlığına tıklayın",
- "parentDocClickExpandTip": "Etkinleştirildiğinde üst belgenin başlığına tıklamak veya dokunmak alt belgeleri genişletir veya daraltır; alt belgesi olmayan belgeler tek tıklama veya dokunmayla açılmaya devam eder",
"mcpStatusAuthorizing": "Yetkilendiriliyor",
"mcpStatusAuthorizationRequired": "Yetkilendirme gerekli",
"mcpAuthorize": "Yetkilendir",
diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.json
index a976895bba..0b831f0f25 100644
--- a/app/appearance/langs/uk.json
+++ b/app/appearance/langs/uk.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "Клацання піктограми документа",
+ "docIconClickActionTip": "Дія після клацання піктограми документа",
+ "parentDocTitleClickAction": "Клацання заголовка батьківського документа",
+ "parentDocTitleClickActionTip": "Виберіть дію після клацання заголовка батьківського документа; документи без дочірніх завжди відкриваються одразу. Варіант із подвійним клацанням відкриває батьківський документ без зміни стану розгортання, але одиночне клацання очікує близько 300 мс, щоб їх розрізнити",
+ "docTreeClickExpandChildren": "Розгорнути або згорнути дочірні документи",
+ "docTreeClickExpandChildrenDblclick": "Розгорнути або згорнути дочірні документи (подвійне клацання відкриває батьківський документ)",
"newRelationItemWithTemplate": "Створити за типовим шаблоном у ${x}: <b>${y}</b>",
"newRelationItemWithInputName": "Створити з введеною назвою у ${x}: <b>${y}</b>",
- "parentDocDoubleClickOpen": "Відкривати батьківський документ подвійним клацанням заголовка",
- "parentDocDoubleClickOpenTip": "Якщо ввімкнено, подвійне клацання або подвійний дотик до заголовка відкриває батьківський документ без зміни стану розгортання; одиночне клацання або дотик очікує близько 300 мс для розпізнавання подвійного клацання. Якщо вимкнено, одиночне клацання або дотик одразу розгортає чи згортає дочірні документи",
"decisionSaveFailed": "Не вдалося зберегти налаштування служби ухвалення рішень; чернетку збережено",
"decisionProvidersTip": "Налаштування постачальників зберігаються окремо; перемикання застосовується до нових запитів",
"decisionCurrentProvider": "Зараз використовується",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Не вдалося імпортувати Obsidian Vault",
"openDocument": "Відкрити документ",
"docIconClickExpand": "Клацання піктограми документа або нотатника розгортає чи згортає дочірні документи",
- "docIconClickExpandTip": "Якщо ввімкнено, клацання піктограми документа або нотатника розгортає чи згортає дочірні документи; якщо дочірніх документів немає, відкривається доступний документ, інакше піктограму можна змінити; якщо вимкнено, клацання будь-якої з цих піктограм змінює її",
- "parentDocClickExpand": "Клацання заголовка батьківського документа розгортає або згортає дочірні документи",
- "parentDocClickExpandTip": "Якщо ввімкнено, клацання або дотик до заголовка батьківського документа розгортає чи згортає дочірні документи; документи без дочірніх і надалі відкриваються одним клацанням або дотиком",
"mcpStatusAuthorizing": "Авторизація",
"mcpStatusAuthorizationRequired": "Потрібна авторизація",
"mcpAuthorize": "Авторизувати",
diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.json
index 5fff17e98d..60b20390d6 100644
--- a/app/appearance/langs/zh-CN.json
+++ b/app/appearance/langs/zh-CN.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "单击文档图标",
+ "docIconClickActionTip": "单击文档图标执行的操作",
+ "parentDocTitleClickAction": "点击父文档标题",
+ "parentDocTitleClickActionTip": "点击父文档标题执行的操作。选择「展开或折叠子文档」时,若没有子文档则直接打开文档;选择「双击打开父文档」时,单击需等待约 300 毫秒以判断是否双击",
+ "docTreeClickExpandChildren": "展开或折叠子文档",
+ "docTreeClickExpandChildrenDblclick": "单击展开或折叠子文档、双击打开父文档",
"newRelationItemWithTemplate": "在 ${x} 中按默认模板新建:<b>${y}</b>",
"newRelationItemWithInputName": "在 ${x} 中使用输入名称新建:<b>${y}</b>",
- "parentDocDoubleClickOpen": "双击标题打开父文档",
- "parentDocDoubleClickOpenTip": "启用后双击标题打开父文档并保持展开或折叠状态,单击需等待约 300 毫秒以判断是否双击;关闭后单击直接展开或折叠下级文档",
"decisionSaveFailed": "保存决策服务配置失败,草稿已保留",
"decisionProvidersTip": "各提供商的配置独立保存,切换仅对新请求生效",
"decisionCurrentProvider": "当前使用",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault 导入失败",
"openDocument": "打开文档",
"docIconClickExpand": "单击文档或笔记本图标展开或折叠下级文档",
- "docIconClickExpandTip": "启用后单击文档或笔记本图标将展开或折叠下级文档;没有下级文档时,有可打开文档则打开文档,否则修改图标;关闭后单击文档或笔记本图标将修改图标",
- "parentDocClickExpand": "单击父文档标题时展开或折叠下级文档",
- "parentDocClickExpandTip": "启用后单击或点按父文档标题展开或折叠下级文档;没有子文档时仍单击或点按直接打开",
"mcpStatusAuthorizing": "正在授权",
"mcpStatusAuthorizationRequired": "需要授权",
"mcpAuthorize": "授权",
diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.json
index 4aa8c77fb4..7695017cc4 100644
--- a/app/appearance/langs/zh-TW.json
+++ b/app/appearance/langs/zh-TW.json
@@ -1,8 +1,12 @@
{
+ "docIconClickAction": "點擊文件圖示",
+ "docIconClickActionTip": "點擊文件圖示執行的操作",
+ "parentDocTitleClickAction": "點擊父文件標題",
+ "parentDocTitleClickActionTip": "點擊父文件標題執行的操作。選擇「展開或折疊子文件」時,若沒有子文件則直接開啟文件;選擇「按兩下開啟父文件」時,點擊需等待約 300 毫秒以判斷是否按兩下",
+ "docTreeClickExpandChildren": "展開或折疊子文件",
+ "docTreeClickExpandChildrenDblclick": "點擊展開或折疊子文件、按兩下開啟父文件",
"newRelationItemWithTemplate": "在 ${x} 中依預設範本新增:<b>${y}</b>",
"newRelationItemWithInputName": "在 ${x} 中使用輸入名稱新增:<b>${y}</b>",
- "parentDocDoubleClickOpen": "按兩下標題開啟父文件",
- "parentDocDoubleClickOpenTip": "啟用後按兩下標題可開啟父文件,並保持展開或折疊狀態,點擊需等待約 300 毫秒以判斷是否按兩下;關閉後點擊直接展開或折疊下級文件",
"decisionSaveFailed": "儲存決策服務設定失敗,草稿已保留",
"decisionProvidersTip": "各提供商的設定獨立儲存,切換僅對新請求生效",
"decisionCurrentProvider": "目前使用",
@@ -870,9 +874,6 @@
"obsidianImportFailed": "Obsidian Vault 匯入失敗",
"openDocument": "開啟文件",
"docIconClickExpand": "點擊文件或筆記本圖示展開或折疊下級文件",
- "docIconClickExpandTip": "啟用後點擊文件或筆記本圖示將展開或折疊下級文件;沒有下級文件時,有可開啟文件則開啟文件,否則修改圖示;關閉後點擊文件或筆記本圖示將修改圖示",
- "parentDocClickExpand": "點擊父文件標題時展開或折疊下級文件",
- "parentDocClickExpandTip": "啟用後點擊或點按父文件標題可展開或折疊下級文件;沒有子文件時仍點擊或點按直接開啟",
"mcpStatusAuthorizing": "正在授權",
"mcpStatusAuthorizationRequired": "需要授權",
"mcpAuthorize": "授權",
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
index bb99baf6ac..bbc870d57f 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy
@@ -17567,25 +17567,25 @@
"Children": [
{
"Type": "NodeText",
- "Data": "When "
+ "Data": "With "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Click parent document title to expand or collapse child documents"
+ "TextMarkTextContent": "Clicking a document icon"
},
{
"Type": "NodeText",
- "Data": " is enabled, click or tap a parent title in the document tree or pinned documents to expand or collapse its children. Its "
+ "Data": " and "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "Double-click a title to open the parent document"
+ "TextMarkTextContent": "Clicking a parent document title"
},
{
"Type": "NodeText",
- "Data": " sub-option is enabled by default: a single click or tap waits about 300 ms, while a double-click or double-tap opens the parent without changing its expansion state. Disable the sub-option to expand or collapse with one click or tap without waiting for double-click detection; open the parent through its document menu. Documents without children still open with one click or tap"
+ "Data": " set, the document tree and pinned documents decide the click action: the expand-only choice expands or collapses immediately, while the double-click choice opens the parent on a double-click or double-tap without changing its expansion state and makes a single click or tap wait about 300 ms; the parent can still be opened from its document menu. A title without child documents still opens directly; clicking a document icon opens an openable document or otherwise changes the icon; a notebook icon always only changes the icon"
}
]
},
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
index aee03c89a6..52c3c1333a 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
@@ -17621,25 +17621,25 @@
"Children": [
{
"Type": "NodeText",
- "Data": "启用 "
+ "Data": "设置 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "单击父文档标题时展开或折叠下级文档"
+ "TextMarkTextContent": "单击文档图标"
},
{
"Type": "NodeText",
- "Data": " 后,在文档树或置顶文档区单击或点按父文档标题可展开或折叠下级文档。其子项 "
+ "Data": " 和 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "双击标题打开父文档"
+ "TextMarkTextContent": "点击父文档标题"
},
{
"Type": "NodeText",
- "Data": " 默认开启:单击需等待约 300 毫秒以判断是否双击,双击或连续点按两次标题打开父文档并保持展开或折叠状态。关闭子项后,单击或点按展开或折叠不再等待双击判定,仍可通过文档菜单打开父文档。没有子文档时仍单击或点按直接打开"
+ "Data": " 后,在文档树或置顶文档区可决定单击或点按执行的操作:选择「展开或折叠子文档」立即展开或折叠;选择「单击展开或折叠子文档、双击打开父文档」则双击或连续点按两次打开父文档并保持展开或折叠状态,单击需等待约 300 毫秒以判断是否双击,仍可通过文档菜单打开父文档。没有子文档时单击或点按标题仍直接打开;单击有可打开文档的文档图标则打开文档,否则修改图标;笔记本图标始终用于修改图标"
}
]
},
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
index 698e03130f..e92804f283 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy
@@ -17563,25 +17563,25 @@
"Children": [
{
"Type": "NodeText",
- "Data": "啟用 "
+ "Data": "設定 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "點擊父文件標題時展開或折疊下級文件"
+ "TextMarkTextContent": "點擊文件圖示"
},
{
"Type": "NodeText",
- "Data": " 後,在文件樹或置頂文件區點擊或點按父文件標題可展開或折疊下級文件。其子項 "
+ "Data": " 和 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "按兩下標題開啟父文件"
+ "TextMarkTextContent": "點擊父文件標題"
},
{
"Type": "NodeText",
- "Data": " 預設開啟:點擊需等待約 300 毫秒以判斷是否按兩下,按兩下或連續點按兩次標題開啟父文件並保持展開或折疊狀態。關閉子項後,點擊或點按展開或折疊不再等待按兩下判定,仍可透過文件選單開啟父文件。沒有子文件時仍點擊或點按直接開啟"
+ "Data": " 後,在文件樹或置頂文件區可決定點擊或點按執行的操作:選擇「展開或折疊子文件」立即展開或折疊;選擇「點擊展開或折疊子文件、按兩下開啟父文件」則按兩下或連續點按兩次開啟父文件並保持展開或折疊狀態,點擊需等待約 300 毫秒以判斷是否按兩下,仍可透過文件選單開啟父文件。沒有子文件時點擊或點按標題仍直接開啟;點擊有可開啟文件的文件圖示則開啟文件,否則修改圖示;筆記本圖示一律用於修改圖示"
}
]
},
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
index d516059445..7a67e47397 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy
@@ -17566,20 +17566,20 @@
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "親文書のタイトルをクリックして子文書を展開または折りたたむ"
+ "TextMarkTextContent": "文書アイコンをクリックしたとき"
},
{
"Type": "NodeText",
- "Data": " を有効にすると、ドキュメントツリーやピン留めした文書で親文書のタイトルをクリックまたはタップして子文書を展開または折りたたみます。子設定の "
+ "Data": " と "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
- "TextMarkTextContent": "タイトルをダブルクリックして親文書を開く"
+ "TextMarkTextContent": "親文書のタイトルをクリックしたとき"
},
{
"Type": "NodeText",
- "Data": " は既定で有効です。シングルクリックまたはタップは約 300 ミリ秒待ってダブルクリックを判定し、ダブルクリックまたはダブルタップは展開状態を変えずに親文書を開きます。子設定を無効にすると、1 回のクリックまたはタップで判定を待たずに展開または折りたたみます。親文書は文書メニューから引き続き開けます。子文書がない場合は、1 回のクリックまたはタップで直接開きます"
+ "Data": " では、ドキュメントツリーやピン留めした文書でクリック時の動作を選べます。「子文書を展開または折りたたむ」はその場で展開または折りたたみ、「子文書を展開または折りたたむ(ダブルクリックで親文書を開く)」はダブルクリックまたはダブルタップで展開状態を変えずに親文書を開き、シングルクリックまたはタップは約 300 ミリ秒待って判定します。親文書は文書メニューから引き続き開けます。子文書がない場合は、1 回のクリックまたはタップで直接開き、文書アイコンは開ける文書があれば開き、それ以外はアイコンを変更します。ノートブックのアイコンは常にアイコンの変更にのみ使われます"
}
]
},
diff --git a/app/src/config/tabs/fileTab.test.ts b/app/src/config/tabs/fileTab.test.ts
index 06a87617a8..73838895f5 100644
--- a/app/src/config/tabs/fileTab.test.ts
+++ b/app/src/config/tabs/fileTab.test.ts
@@ -4,7 +4,7 @@ import {readFileSync} from "node:fs";
import {join} from "node:path";
import {runInNewContext} from "node:vm";
import * as ts from "typescript";
-import {controlBoolean} from "../setting/control";
+import {controlBoolean, controlSelect} from "../setting/control";
import * as fragments from "../render/fragments";
import {isSettingControl} from "../render/parts";
import {buildItemSearchIndex} from "../search/normalize";
@@ -16,20 +16,38 @@ const compile = (file: string, extra = "") => ts.transpileModule(
{compilerOptions: {module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020}},
).outputText;
-const loadBehaviorSettings = (parentEnabled: boolean, childEnabled?: boolean) => {
- const fileTree = {parentDocClickExpand: parentEnabled, parentDocDoubleClickOpen: childEnabled};
- const languages = {parentDocClickExpand: "Expand parent title", parentDocClickExpandTip: "Toggle child documents",
- parentDocDoubleClickOpen: "Double-click to open", parentDocDoubleClickOpenTip: "Wait about 300 ms"};
+const loadBehaviorSettings = (config: {docIconClickMode?: number, parentDocTitleClickMode?: number} = {}) => {
+ const fileTree = {docIconClickMode: 0, parentDocTitleClickMode: 0, ...config};
+ const languages = {
+ docIconClickAction: "Clicking a document icon",
+ docIconClickActionTip: "Action performed by clicking a document icon; without child documents an openable document opens, otherwise the icon is changed",
+ parentDocTitleClickAction: "Clicking a parent document title",
+ parentDocTitleClickActionTip: "Choose the action; the double-click option opens the parent but a single click waits about 300 ms",
+ changeIcon: "Change icon",
+ openDocument: "Open document",
+ docTreeClickExpandChildren: "Expand or collapse child documents",
+ docTreeClickExpandChildrenDblclick: "Expand or collapse child documents (double-click opens the parent)",
+ };
const saved: unknown[][] = [];
+ const updates: string[] = [];
const registered: RegisterSettingItem[] = [];
- const windowContext = {siyuan: {config: {fileTree}, languages}};
+ const windowContext = {siyuan: {config: {fileTree, system: {container: ""}}, languages}};
const builderExports: {SettingTabBuilder?: typeof SettingTabBuilder} = {};
runInNewContext(compile("../setting/builder.ts"), {
exports: builderExports, window: windowContext,
require: (name: string) => {
- if (name === "./control") return {controlBoolean: (id: string, options?: {readConfig?: () => boolean}) =>
- controlBoolean(id, {readConfig: options?.readConfig ??
- (() => Boolean(fileTree[id.split(".")[1] as keyof typeof fileTree]))})};
+ if (name === "./control") return {
+ // 未显式传入 readConfig 的开关与下拉按控件 id 末段从测试配置读取,避免依赖运行环境
+ controlSelect: (id: string, options: {options: {value: number | string, label?: string}[],
+ readConfig?: () => number | string}) => controlSelect(id, {
+ options: options.options,
+ readConfig: options.readConfig ?? (() => fileTree[id.split(".")[1] as keyof typeof fileTree]),
+ }),
+ controlBoolean: (id: string, options?: {readConfig?: () => boolean}) => controlBoolean(id, {
+ readConfig: options?.readConfig ??
+ (() => Boolean(fileTree[id.split(".")[1] as keyof typeof fileTree])),
+ }),
+ };
if (name === "./group") return {registerSettingGroup() {}};
if (name === "./item") return {registerSettingItem: (item: RegisterSettingItem) => registered.push(item)};
return {};
@@ -38,15 +56,27 @@ const loadBehaviorSettings = (parentEnabled: boolean, childEnabled?: boolean) =>
const exports: {registerFileTreeBehaviorGroup?: (tab: SettingTabBuilder) => void} = {};
runInNewContext(compile("fileTab.ts", "\nexport {registerFileTreeBehaviorGroup};"), {
exports, CSS: {escape: (text: string) => text}, window: windowContext,
- require: (name: string) => name.endsWith("/fileRuntime")
- ? {fileConfigApi: {patch: (...args: unknown[]) => saved.push(args)}} : {},
+ require: (name: string) => {
+ if (name.endsWith("/fileRuntime")) {
+ return {fileConfigApi: {patch: (...args: unknown[]) => {
+ saved.push(args);
+ // 保存成功后的刷新回调
+ if (typeof args[2] === "function") { (args[2] as () => void)(); }
+ return Promise.resolve();
+ }}};
+ }
+ if (name.endsWith("/getAll")) {
+ return {getAllModels: () => ({files: [{updateDocActions: () => updates.push("docActions")}]})};
+ }
+ return {};
+ },
});
exports.registerFileTreeBehaviorGroup(new builderExports.SettingTabBuilder({
id: "file", icon: "iconFile", title: () => "Documents",
}));
- const parent = registered.find(item => item.id === "fileTree.parentDocClickExpand");
- const child = registered.find(item => item.id === "fileTree.parentDocDoubleClickOpen");
- assert.ok(parent?.kind === "full" && child?.kind === "full");
+ const icon = registered.find(item => item.id === "fileTree.docIconClickMode");
+ const title = registered.find(item => item.id === "fileTree.parentDocTitleClickMode");
+ assert.ok(icon?.kind === "full" && title?.kind === "full");
const entries = () => [{group: {id: "behavior", title: "Behavior", searchTitle: "behavior"},
items: registered.filter(item => item.kind === "full").map(item => ({...item, searchIndex: buildItemSearchIndex(item)}))}];
const renderExports: {buildGroupedItemsView?: (id: string) => {html: string}} = {};
@@ -63,59 +93,64 @@ const loadBehaviorSettings = (parentEnabled: boolean, childEnabled?: boolean) =>
const scanExports: {scanSettingTabSearch?: (id: string, title: string, query: string) => SettingTabSearchResult} = {};
runInNewContext(compile("../search/scan.ts"), {exports: scanExports,
require: () => ({getTabGroupEntries: entries})});
- return {parent, child, saved, fileTree,
+ return {icon, title, saved, updates, fileTree,
+ iconControl: icon?.rowParts.find(isSettingControl), titleControl: title?.rowParts.find(isSettingControl),
html: () => renderExports.buildGroupedItemsView("file").html,
search: (query: string) => scanExports.scanSettingTabSearch("file", "documents", query)};
};
-test("parent and child use separate standard setting rows and inherit the enabled default", () => {
- const h = loadBehaviorSettings(false);
- const control = h.child.rowParts.find(isSettingControl);
- assert.equal(control.id, "fileTree.parentDocDoubleClickOpen");
- assert.equal(control.readConfig(), true);
+test("both click settings are standard select rows that replace the removed switches", () => {
+ const h = loadBehaviorSettings();
+ assert.ok(h.iconControl?.kind === "select" && h.titleControl?.kind === "select");
+ // 选项数组由被测代码所在上下文创建,用字符串比对避免跨上下文原型差异
+ assert.equal(h.iconControl.options.map(option => option.value).join(","), "0,1");
+ assert.equal(h.titleControl.options.map(option => option.value).join(","), "0,1,2");
const html = h.html();
- assert.equal(html.includes("b3-label--inner"), false);
- assert.match(html, /<label class="fn__flex b3-label config-item" data-config-item-id="fileTree.parentDocClickExpand">/);
- assert.match(html, /<label class="fn__flex b3-label config-item" data-config-item-id="fileTree.parentDocDoubleClickOpen">/);
+ assert.match(html, /data-config-item-id="fileTree.docIconClickMode"/);
+ assert.match(html, /data-config-item-id="fileTree.parentDocTitleClickMode"/);
+ assert.equal(html.includes("fileTree.docIconClickExpand"), false);
+ assert.equal(html.includes("fileTree.parentDocClickExpand"), false);
+ assert.equal(html.includes("fileTree.parentDocDoubleClickOpen"), false);
+ assert.equal(h.saved.length, 0);
});
-test("searching either setting retains parent and child context", () => {
- const h = loadBehaviorSettings(false);
- for (const query of ["double-click", "expand parent title", "300 ms"]) {
+test("the stored mode selects its own option and defaults to the conventional behaviour", () => {
+ const defaults = loadBehaviorSettings();
+ assert.equal(defaults.iconControl?.readConfig(), 0);
+ assert.equal(defaults.titleControl?.readConfig(), 0);
+ // 默认「修改图标」与「打开文档」选中,即单击不需等待双击判定
+ assert.equal((defaults.html().match(/value="0" selected>/g) || []).length, 2);
+
+ const expand = loadBehaviorSettings({docIconClickMode: 1, parentDocTitleClickMode: 2});
+ assert.equal(expand.iconControl?.readConfig(), 1);
+ assert.equal(expand.titleControl?.readConfig(), 2);
+ const html = expand.html();
+ assert.equal((html.match(/value="1" selected>/g) || []).length, 1);
+ assert.equal((html.match(/value="2" selected>/g) || []).length, 1);
+ assert.equal(html.includes("value=\"0\" selected>"), false);
+});
+
+test("shared action keywords reveal both rows while a specific wrong row stays hidden", () => {
+ const h = loadBehaviorSettings();
+ for (const query of ["expand or collapse child documents", "double-click opens the parent"]) {
const result = h.search(query);
assert.equal(result.matches, true);
- assert.equal(result.visibleItemIds.has(h.parent.id), true);
- assert.equal(result.visibleItemIds.has(h.child.id), true);
+ assert.equal(result.visibleItemIds.has("fileTree.docIconClickMode"), true);
+ assert.equal(result.visibleItemIds.has("fileTree.parentDocTitleClickMode"), true);
}
+ const iconOnly = h.search("change icon");
+ assert.equal(iconOnly.visibleItemIds.has("fileTree.docIconClickMode"), true);
+ assert.equal(iconOnly.visibleItemIds.has("fileTree.parentDocTitleClickMode"), false);
});
-test("parent toggling hides its child without changing or saving the child's preference", async () => {
- for (const checked of [false, true]) {
- const h = loadBehaviorSettings(false, checked);
- let change: () => void;
- const parent = {checked: false, addEventListener: (_name: string, listener: () => void) => { change = listener; }};
- const classes = new Set<string>();
- const childRow = {classList: {
- add: (name: string) => classes.add(name),
- toggle: (name: string, enabled: boolean) => {
- if (enabled) { classes.add(name); } else { classes.delete(name); }
- },
- }};
- const child = {closest: () => childRow};
- const root = {querySelector: (selector: string) => selector.includes("parentDocClickExpand") ? parent : child};
- await h.parent.afterMount(root as unknown as HTMLElement);
- assert.equal(classes.has("fn__none"), true);
- assert.equal(classes.has("config-filetree-click__child"), true);
- parent.checked = true;
- change();
- assert.equal(classes.has("fn__none"), false);
- parent.checked = false;
- change();
- assert.equal(classes.has("fn__none"), true);
- assert.equal(h.fileTree.parentDocDoubleClickOpen, checked);
- assert.equal(h.saved.length, 0);
- h.parent.save(true);
- assert.equal(h.saved[0][0], "parentDocClickExpand");
- assert.equal(h.saved[0][1], true);
- }
+test("saving patches only its own mode field and refreshes the document tree", async () => {
+ const h = loadBehaviorSettings();
+ await h.icon.save(1);
+ assert.deepEqual(h.saved.at(-1)?.slice(0, 2), ["docIconClickMode", 1]);
+ assert.equal(typeof h.saved.at(-1)?.[1], "number");
+ assert.equal(h.updates.length, 1);
+ await h.title.save(2);
+ assert.deepEqual(h.saved.at(-1)?.slice(0, 2), ["parentDocTitleClickMode", 2]);
+ assert.equal(h.saved.length, 2);
+ assert.equal(h.updates.length, 2);
});
diff --git a/app/src/config/tabs/fileTab.ts b/app/src/config/tabs/fileTab.ts
index 259d725fef..7a9006ee39 100644
--- a/app/src/config/tabs/fileTab.ts
+++ b/app/src/config/tabs/fileTab.ts
@@ -15,18 +15,6 @@ import {getAllModels} from "../../layout/getAll";
const isMobileKernelContainer = () =>
["android", "ios", "harmony"].includes(window.siyuan.config.system.container);
-const bindParentDocClickSettingsVisibility = (root: HTMLElement) => {
- const parent = root.querySelector<HTMLInputElement>(`#${CSS.escape("fileTree.parentDocClickExpand")}`);
- const childRow = root.querySelector(`#${CSS.escape("fileTree.parentDocDoubleClickOpen")}`)?.closest(".config-item");
- if (!parent || !childRow) {
- return;
- }
- childRow.classList.add("config-filetree-click__child");
- const updateVisibility = () => childRow.classList.toggle("fn__none", !parent.checked);
- parent.addEventListener("change", updateVisibility);
- updateVisibility();
-};
-
const genNotebookSavePathHtml = (
title: string,
desc: string,
@@ -54,35 +42,41 @@ const genNotebookSavePathHtml = (
const registerFileTreeBehaviorGroup = (tab: SettingTabBuilder) => {
const group = tab.group("behavior", window.siyuan.languages.configGroupBehavior);
+ // 两个下拉共用展开项文案,搜索任一文案都同时命中两项
+ const clickActionKeywords = [window.siyuan.languages.docTreeClickExpandChildren,
+ window.siyuan.languages.docTreeClickExpandChildrenDblclick];
/// #if !MOBILE
- group.switch("fileTree.docIconClickExpand", {
- title: window.siyuan.languages.docIconClickExpand,
- desc: window.siyuan.languages.docIconClickExpandTip,
- save: (value) => fileConfigApi.patch("docIconClickExpand", value, () => {
+ group.select("fileTree.docIconClickMode", {
+ title: window.siyuan.languages.docIconClickAction,
+ desc: window.siyuan.languages.docIconClickActionTip,
+ keywords: [...clickActionKeywords, window.siyuan.languages.changeIcon,
+ window.siyuan.languages.docIconClickActionTip],
+ options: [
+ {value: 0, label: window.siyuan.languages.changeIcon},
+ {value: 1, label: window.siyuan.languages.docTreeClickExpandChildren},
+ ],
+ save: (value) => fileConfigApi.patch("docIconClickMode", value, () => {
getAllModels().files.forEach((files) => files.updateDocActions());
}),
});
/// #endif
- const parentDocClickKeywords = [window.siyuan.languages.parentDocClickExpand, window.siyuan.languages.parentDocClickExpandTip,
- window.siyuan.languages.parentDocDoubleClickOpen, window.siyuan.languages.parentDocDoubleClickOpenTip];
- group.switch("fileTree.parentDocClickExpand", {
- title: window.siyuan.languages.parentDocClickExpand,
- desc: window.siyuan.languages.parentDocClickExpandTip,
- keywords: parentDocClickKeywords,
- afterMount: bindParentDocClickSettingsVisibility,
- save: (value) => fileConfigApi.patch("parentDocClickExpand", value, () => {
+ group.select("fileTree.parentDocTitleClickMode", {
+ title: window.siyuan.languages.parentDocTitleClickAction,
+ desc: window.siyuan.languages.parentDocTitleClickActionTip,
+ keywords: [...clickActionKeywords, window.siyuan.languages.openDocument,
+ window.siyuan.languages.parentDocTitleClickActionTip],
+ options: [
+ {value: 0, label: window.siyuan.languages.openDocument},
+ {value: 1, label: window.siyuan.languages.docTreeClickExpandChildren},
+ {value: 2, label: window.siyuan.languages.docTreeClickExpandChildrenDblclick},
+ ],
+ save: (value) => fileConfigApi.patch("parentDocTitleClickMode", value, () => {
/// #if !MOBILE
getAllModels().files.forEach((files) => files.updateDocActions());
/// #endif
}),
});
- group.switch("fileTree.parentDocDoubleClickOpen", {
- title: window.siyuan.languages.parentDocDoubleClickOpen,
- desc: window.siyuan.languages.parentDocDoubleClickOpenTip,
- keywords: parentDocClickKeywords,
- readConfig: () => window.siyuan.config.fileTree.parentDocDoubleClickOpen !== false,
- });
group.switch("fileTree.alwaysSelectOpenedFile", {
title: window.siyuan.languages.selectOpen,
desc: window.siyuan.languages.fileTree2,
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index d6e9e5878b..846b3c78d5 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -271,31 +271,29 @@ export class Files extends Model {
event.stopPropagation();
const liElement = target.parentElement;
const isFile = liElement.getAttribute("data-type") === "navigation-file";
- const isNotebook = liElement.getAttribute("data-type") === "navigation-root";
- const isBoxDoc = isNotebook && liElement.getAttribute("data-node-id");
- if ((isFile || isNotebook) && window.siyuan.config.fileTree.docIconClickExpand) {
+ // 单击文档图标展开或折叠下级,笔记本图标始终用于修改图标
+ if (isFile && window.siyuan.config.fileTree.docIconClickMode === 1) {
if (Number(liElement.getAttribute("data-count")) > 0) {
this.lastSelectedElement = liElement;
this.setCurrent(liElement, false);
this.toggleLeaf(liElement, notebookId);
break;
- } else if (isFile || isBoxDoc) {
- needFocus = false;
- if (!liElement.getAttribute("data-opening")) {
- this.lastSelectedElement = liElement;
- this.setCurrent(liElement, false);
- liElement.setAttribute("data-opening", "true");
- openFileById({
- app: options.app,
- id: liElement.getAttribute("data-node-id"),
- action: isPhablet() ? [Constants.CB_GET_SCROLL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL],
- afterOpen() {
- liElement.removeAttribute("data-opening");
- }
- });
- }
- break;
}
+ needFocus = false;
+ if (!liElement.getAttribute("data-opening")) {
+ this.lastSelectedElement = liElement;
+ this.setCurrent(liElement, false);
+ liElement.setAttribute("data-opening", "true");
+ openFileById({
+ app: options.app,
+ id: liElement.getAttribute("data-node-id"),
+ action: isPhablet() ? [Constants.CB_GET_SCROLL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL],
+ afterOpen() {
+ liElement.removeAttribute("data-opening");
+ }
+ });
+ }
+ break;
}
const rect = target.getBoundingClientRect();
if (isFile) {
@@ -374,12 +372,13 @@ export class Files extends Model {
target.classList.contains("b3-list-item__text") &&
(target.parentElement.getAttribute("data-type") === "navigation-file" ||
(target.parentElement.getAttribute("data-type") === "navigation-root" && target.parentElement.getAttribute("data-node-id"))) &&
- window.siyuan.config.fileTree.parentDocClickExpand &&
+ window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 &&
Number(target.parentElement.getAttribute("data-count")) > 0) {
this.lastSelectedElement = target.parentElement;
this.setCurrent(target.parentElement, false);
const row = target.parentElement;
- if (window.siyuan.config.fileTree.parentDocDoubleClickOpen === false) {
+ // 单击展开且不双击打开时立即切换,无需等待双击判定
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 2) {
this.toggleLeaf(row, notebookId);
event.preventDefault();
event.stopPropagation();
@@ -395,8 +394,7 @@ export class Files extends Model {
app: Constants.SIYUAN_APPID,
});
return () => {
- if (!window.siyuan.config.fileTree.parentDocClickExpand ||
- window.siyuan.config.fileTree.parentDocDoubleClickOpen === false ||
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 2 ||
row.getAttribute("data-path") !== path ||
!!row.querySelector(".b3-list-item__arrow--open") !== expanded) { return; }
if (expanded) {
@@ -1337,18 +1335,23 @@ export class Files extends Model {
return;
}
const isFile = liElement.getAttribute("data-type") === "navigation-file";
- const isNotebook = liElement.getAttribute("data-type") === "navigation-root";
- const isBoxDoc = isNotebook && Boolean(liElement.getAttribute("data-node-id"));
- const hasChildren = (isFile || isNotebook) && Number(liElement.getAttribute("data-count")) > 0;
- const iconExpands = window.siyuan.config.fileTree.docIconClickExpand && hasChildren;
- const iconOpens = window.siyuan.config.fileTree.docIconClickExpand && !hasChildren && (isFile || isBoxDoc);
+ const hasChildren = Number(liElement.getAttribute("data-count")) > 0;
+ // 单击文档图标展开或折叠下级,笔记本图标不参与
+ const iconClickExpands = isFile && window.siyuan.config.fileTree.docIconClickMode === 1;
+ const iconExpands = iconClickExpands && hasChildren;
+ const iconOpens = iconClickExpands && !hasChildren;
const editingPublishAccess = this.element.classList.contains("file-tree__publish-access--active");
- iconElement.setAttribute("aria-label", iconExpands ? window.siyuan.languages.docIconClickExpand :
- (iconOpens ? window.siyuan.languages.openDocument : window.siyuan.languages.changeIcon));
+ // 点击会修改图标时给出提示,展开或打开时不提示
+ iconElement.classList.toggle("ariaLabel", !iconClickExpands);
+ if (iconClickExpands) {
+ iconElement.removeAttribute("aria-label");
+ } else {
+ iconElement.setAttribute("aria-label", window.siyuan.languages.changeIcon);
+ }
liElement.classList.toggle("file-tree__item--icon-expand", iconExpands && !editingPublishAccess);
liElement.classList.toggle("file-tree__item--icon-open", iconOpens && !editingPublishAccess);
liElement.classList.toggle("file-tree__item--title-expand", hasChildren &&
- window.siyuan.config.fileTree.parentDocClickExpand);
+ window.siyuan.config.fileTree.parentDocTitleClickMode !== 0);
}
public updateDocActions() {
@@ -1449,14 +1452,10 @@ export class Files extends Model {
const defaultIconAttr = getFileTreeDefaultIconAttr(locked ? "" : item.icon, locked ? "lock" : "notebook");
const isBoxDoc = !item.closed && window.siyuan.config.fileTree.boxDocEnabled;
const hasChildren = !item.closed && item.subFileCount > 0;
- const iconExpands = window.siyuan.config.fileTree.docIconClickExpand && hasChildren;
- const iconOpens = window.siyuan.config.fileTree.docIconClickExpand && isBoxDoc && !hasChildren;
- const iconAriaLabel = iconExpands ? window.siyuan.languages.docIconClickExpand :
- (iconOpens ? window.siyuan.languages.openDocument : window.siyuan.languages.changeIcon);
- const actionClasses = `${iconExpands && !editingPublishAccess ? " file-tree__item--icon-expand" : ""}${
- iconOpens && !editingPublishAccess ? " file-tree__item--icon-open" : ""}${
- hasChildren && window.siyuan.config.fileTree.parentDocClickExpand ? " file-tree__item--title-expand" : ""}`;
- const emojiHTML = `<span class="b3-list-item__icon ariaLabel${isBoxDoc ? " popover__block" : ""}${editingPublishAccess && !item.encrypted ? " fn__none" : ""}" data-position="8east"${isBoxDoc ? ` data-id="${item.id}"` : ""} aria-label="${iconAriaLabel}">${iconContent}</span>`;
+ // 笔记本图标始终用于修改图标
+ const actionClasses = `${hasChildren && window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 ?
+ " file-tree__item--title-expand" : ""}`;
+ const emojiHTML = `<span class="b3-list-item__icon ariaLabel${isBoxDoc ? " popover__block" : ""}${editingPublishAccess && !item.encrypted ? " fn__none" : ""}" data-position="8east"${isBoxDoc ? ` data-id="${item.id}"` : ""} aria-label="${window.siyuan.languages.changeIcon}">${iconContent}</span>`;
const switchHTML = `<span class="b3-list-item__switch b3-tooltips b3-tooltips__e${editingPublishAccess && !item.encrypted ? "" : " fn__none"}" aria-label="${window.siyuan.languages.publishAccess}">${getPublishAccessOptionByLevel("public").iconHTML}</span>`;
if (item.closed) {
return `<li data-url="${item.id}" class="b3-list-item b3-list-item--hide-action"${item.encrypted ? ' data-encrypted="true"' : ""}${defaultIconAttr}>
@@ -2147,13 +2146,12 @@ data-type="navigation-root" data-path="/" data-count="${item.subFileCount || 0}"
const ariaLabel = this.genDocAriaLabel(item, escapeAriaLabel);
const paddingLeft = (item.path.split("/").length - 1) * 18;
const editingPublishAccess = this.element.classList.contains("file-tree__publish-access--active");
- const iconExpands = window.siyuan.config.fileTree.docIconClickExpand;
- const iconAriaLabel = iconExpands ?
- (item.subFileCount > 0 ? window.siyuan.languages.docIconClickExpand : window.siyuan.languages.openDocument) :
- window.siyuan.languages.changeIcon;
+ const iconExpands = window.siyuan.config.fileTree.docIconClickMode === 1;
+ // 点击会修改图标时给出提示,展开或打开时不提示
+ const iconChanges = !iconExpands;
const actionClasses = `${iconExpands && item.subFileCount > 0 && !editingPublishAccess ? " file-tree__item--icon-expand" : ""}${
iconExpands && item.subFileCount === 0 && !editingPublishAccess ? " file-tree__item--icon-open" : ""}${
- window.siyuan.config.fileTree.parentDocClickExpand && item.subFileCount > 0 ? " file-tree__item--title-expand" : ""}`;
+ window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 && item.subFileCount > 0 ? " file-tree__item--title-expand" : ""}`;
const defaultIcon = item.subFileCount === 0 ? "file" : "folder";
return `<li data-node-id="${item.id}" data-name="${escapeHtmlTextAndAttr(item.name)}" draggable="true" data-count="${item.subFileCount}" ${FILE_TREE_CHILDREN_SORT_MODE}="${item.childrenSortMode ?? ""}"
data-type="navigation-file"
@@ -2162,7 +2160,7 @@ class="b3-list-item b3-list-item--hide-action${actionClasses}" data-path="${item
<span style="padding-left: ${paddingLeft}px" class="b3-list-item__toggle b3-list-item__toggle--hl${item.subFileCount === 0 ? " fn__hidden" : ""}">
<svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg>
</span>
- <span class="b3-list-item__icon ariaLabel popover__block${editingPublishAccess ? " fn__none" : ""}" data-position="8east" data-id="${item.id}" aria-label="${iconAriaLabel}">${getFileTreeIconHTML(item.icon, defaultIcon)}</span>
+ <span class="b3-list-item__icon${iconChanges ? " ariaLabel" : ""} popover__block${editingPublishAccess ? " fn__none" : ""}" data-position="8east" data-id="${item.id}"${iconChanges ? ` aria-label="${window.siyuan.languages.changeIcon}"` : ""}>${getFileTreeIconHTML(item.icon, defaultIcon)}</span>
<span class="b3-list-item__switch b3-tooltips b3-tooltips__n${editingPublishAccess ? "" : " fn__none"}" aria-label="${window.siyuan.languages.publishAccess}">${getPublishAccessOptionByLevel("public").iconHTML}</span>
<span class="b3-list-item__text ariaLabel" data-delay="200" data-position="parentE"
aria-label="${ariaLabel}">${getDocDisplayName(item.name, item.titleEmpty, true)}</span>
diff --git a/app/src/layout/dock/PinnedDocs.test.ts b/app/src/layout/dock/PinnedDocs.test.ts
index 5f2ae1b705..754d45d934 100644
--- a/app/src/layout/dock/PinnedDocs.test.ts
+++ b/app/src/layout/dock/PinnedDocs.test.ts
@@ -45,8 +45,7 @@ const loadPanel = (fetchCode = 0) => {
const storage = new Map<string, string>();
const docs: {id: string, notebook: string, name: string}[] = [];
const childData = {effectiveSortMode: 6, files: [] as {id: string, name: string, icon?: string}[]};
- const config = {readonly: false, fileTree: {docIconClickExpand: false, parentDocClickExpand: false,
- parentDocDoubleClickOpen: undefined as boolean | undefined}};
+ const config = {readonly: false, fileTree: {docIconClickMode: 0, parentDocTitleClickMode: 0}};
const calls: {kind: string, args: unknown[]}[] = [];
const timers: (() => void)[] = [];
const runtime = {config, notebooks: [] as unknown[], languages: {pinDoc: "Pin", dragTipMoveChild: "Into ${x}",
@@ -212,7 +211,7 @@ test("pinned icons respect editing, expansion and readonly settings", () => {
config.readonly = true;
panel.click(event);
assert.equal(calls.length, 1);
- config.fileTree.docIconClickExpand = true;
+ config.fileTree.docIconClickMode = 1;
panel.toggle = () => { calls.push({kind: "toggle", args: []}); };
panel.open = () => { calls.push({kind: "open", args: []}); };
panel.click(event);
@@ -406,7 +405,7 @@ test("parent titles prefetch once and double clicks preserve expanded and collap
{expanded: false, mobile: true}, {expanded: true, mobile: true},
]) {
const {panel, config, calls} = loadPanel();
- config.fileTree.parentDocClickExpand = true;
+ config.fileTree.parentDocTitleClickMode = 2;
panel.mobile = mobile;
panel.generation = 0;
panel.expanded = new Set(expanded ? ["doc"] : []);
@@ -430,7 +429,7 @@ test("parent titles prefetch once and double clicks preserve expanded and collap
test("single parent click reuses prefetched children after the click window", async () => {
const {panel, config, calls, childData} = loadPanel();
- config.fileTree.parentDocClickExpand = true;
+ config.fileTree.parentDocTitleClickMode = 2;
panel.generation = 0;
panel.expanded = new Set();
const row = {isConnected: true, dataset: {nodeId: "doc", notebook: "box", pinRow: "doc", path: "/doc.sy", count: "1"},
@@ -445,17 +444,16 @@ test("single parent click reuses prefetched children after the click window", as
assert.deepEqual(calls.find(call => call.kind === "toggle").args, [row, true, childData]);
});
-test("disabled double-click opening toggles pinned parent titles immediately on desktop and mobile", () => {
+test("expand-only mode toggles pinned parent titles immediately on desktop and mobile", () => {
for (const mobile of [false, true]) {
const {panel, config, calls} = loadPanel();
- config.fileTree.parentDocClickExpand = true;
- config.fileTree.parentDocDoubleClickOpen = false;
+ config.fileTree.parentDocTitleClickMode = 1;
panel.mobile = mobile;
const row = {dataset: {nodeId: "doc", notebook: "box", count: "4"}, classList: {add() {}}};
const event = {stopPropagation() {}, target: {closest: (selector: string) =>
selector === "[data-pin-row]" || selector === ".b3-list-item__text" ? row : null}};
panel.toggle = () => { panel.parentDocClick.cancel(); calls.push({kind: "toggle", args: []}); };
- panel.open = () => assert.fail("disabled double-click opening must not open the document");
+ panel.open = () => assert.fail("expand-only mode must not open the document");
panel.click(event);
assert.deepEqual(calls.map(call => call.kind), ["toggle"]);
panel.click(event);
diff --git a/app/src/layout/dock/PinnedDocs.ts b/app/src/layout/dock/PinnedDocs.ts
index 83aa12b4d0..489a9d8eb2 100644
--- a/app/src/layout/dock/PinnedDocs.ts
+++ b/app/src/layout/dock/PinnedDocs.ts
@@ -300,10 +300,13 @@ export class PinnedDocs {
row.style.setProperty("--file-action-offset", `${paddingLeft + 20}px`);
row.setAttribute("aria-disabled", String(Boolean(doc.unavailable)));
if (doc.subFileCount) { row.setAttribute("aria-expanded", "false"); }
- const iconExpands = this.mobile || window.siyuan.config.fileTree.docIconClickExpand;
- const iconLabel = iconExpands ? (doc.subFileCount ? window.siyuan.languages.docIconClickExpand : window.siyuan.languages.openDocument) : window.siyuan.languages.changeIcon;
+ // 桌面端点击会修改图标时给出提示,移动端保留无障碍标签
+ const iconExpands = this.mobile || window.siyuan.config.fileTree.docIconClickMode === 1;
+ const iconLabel = iconExpands ? (this.mobile ?
+ (doc.subFileCount ? window.siyuan.languages.docIconClickExpand : window.siyuan.languages.openDocument) : "") :
+ window.siyuan.languages.changeIcon;
if (!doc.icon) { row.dataset.defaultIcon = doc.subFileCount ? "folder" : "file"; }
- row.innerHTML = `<span data-pin-toggle="true" style="padding-left:${paddingLeft}px" class="b3-list-item__toggle b3-list-item__toggle--hl${doc.subFileCount ? "" : " fn__hidden"}"><svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg></span><span class="b3-list-item__icon ariaLabel" data-position="8east" aria-label="${iconLabel}">${getFileTreeIconHTML(doc.icon, doc.subFileCount ? "folder" : "file")}</span><span class="b3-list-item__text">${escapeHtml(doc.name)}${doc.unavailable ? ` (${window.siyuan.languages.closeNotebook})` : ""}</span><span data-pin-more="true" class="b3-list-item__action" aria-label="${window.siyuan.languages.more}"><svg><use xlink:href="#iconMore"></use></svg></span>`;
+ row.innerHTML = `<span data-pin-toggle="true" style="padding-left:${paddingLeft}px" class="b3-list-item__toggle b3-list-item__toggle--hl${doc.subFileCount ? "" : " fn__hidden"}"><svg class="b3-list-item__arrow"><use xlink:href="#iconRight"></use></svg></span><span class="b3-list-item__icon${iconLabel ? " ariaLabel" : ""}" data-position="8east"${iconLabel ? ` aria-label="${iconLabel}"` : ""}>${getFileTreeIconHTML(doc.icon, doc.subFileCount ? "folder" : "file")}</span><span class="b3-list-item__text">${escapeHtml(doc.name)}${doc.unavailable ? ` (${window.siyuan.languages.closeNotebook})` : ""}</span><span data-pin-more="true" class="b3-list-item__action" aria-label="${window.siyuan.languages.more}"><svg><use xlink:href="#iconMore"></use></svg></span>`;
if (!doc.unavailable && !window.siyuan.config.readonly) {
const add = document.createElement("span");
add.className = "b3-list-item__action";
@@ -443,7 +446,7 @@ export class PinnedDocs {
} else if (target.closest("[data-pin-toggle]")) {
this.toggle(row);
} else if (target.closest(".b3-list-item__icon") && row.dataset.unavailable !== "true") {
- if (this.mobile || window.siyuan.config.fileTree.docIconClickExpand) {
+ if (this.mobile || window.siyuan.config.fileTree.docIconClickMode === 1) {
this.selectRow(row);
if (Number(row.dataset.count) > 0) { this.toggle(row); } else { this.open(row.dataset.nodeId, row.dataset.notebook); }
} else if (!window.siyuan.config.readonly) {
@@ -454,10 +457,10 @@ export class PinnedDocs {
}
} else if (row.dataset.unavailable !== "true") {
this.selectRow(row);
- if (window.siyuan.config.fileTree.parentDocClickExpand && Number(row.dataset.count) > 0) {
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 && Number(row.dataset.count) > 0) {
if (!target.closest(".b3-list-item__text") ||
event.ctrlKey || event.metaKey || event.altKey || event.shiftKey ||
- window.siyuan.config.fileTree.parentDocDoubleClickOpen === false) {
+ window.siyuan.config.fileTree.parentDocTitleClickMode !== 2) {
this.toggle(row);
return;
}
@@ -468,8 +471,7 @@ export class PinnedDocs {
const response = expanded ? undefined : await this.requestChildren(row);
return () => {
if (generation !== this.generation || row.dataset.path !== path ||
- !window.siyuan.config.fileTree.parentDocClickExpand ||
- window.siyuan.config.fileTree.parentDocDoubleClickOpen === false ||
+ window.siyuan.config.fileTree.parentDocTitleClickMode !== 2 ||
this.expanded.has(row.dataset.pinRow) !== expanded) { return; }
if (expanded) {
void this.toggle(row, false);
diff --git a/app/src/layout/dock/parentDocClickIntegration.test.ts b/app/src/layout/dock/parentDocClickIntegration.test.ts
index bbcad2d82d..0be5a6ebca 100644
--- a/app/src/layout/dock/parentDocClickIntegration.test.ts
+++ b/app/src/layout/dock/parentDocClickIntegration.test.ts
@@ -32,9 +32,9 @@ const loadClick = (mobile: boolean, context: Record<string, unknown>) => {
return exports.click;
};
-const harness = (mobile: boolean, doubleClickOpen?: boolean, expanded = false) => {
+const harness = (mobile: boolean, mode: 1 | 2 = 2, expanded = false) => {
const calls: string[] = [];
- const config = {parentDocClickExpand: true, parentDocDoubleClickOpen: doubleClickOpen};
+ const config = {parentDocTitleClickMode: mode};
const attributes: Record<string, string> = {
"data-type": "navigation-file", "data-path": "/doc.sy", "data-node-id": "doc", "data-count": "4",
};
@@ -73,10 +73,10 @@ const harness = (mobile: boolean, doubleClickOpen?: boolean, expanded = false) =
resolve: (code = 0) => resolveRequest({...response, code})};
};
-test("desktop and mobile titles toggle immediately with double-click opening disabled", () => {
+test("desktop and mobile titles toggle immediately in expand-only mode", () => {
for (const mobile of [false, true]) {
for (const expanded of [false, true]) {
- const h = harness(mobile, false, expanded);
+ const h = harness(mobile, 1, expanded);
h.click();
assert.deepEqual(h.calls, ["toggle"]);
h.click();
@@ -86,23 +86,21 @@ test("desktop and mobile titles toggle immediately with double-click opening dis
}
});
-test("missing and enabled preferences prefetch immediately and double clicks discard child responses", async () => {
+test("double-click mode prefetches immediately and double clicks discard child responses", async () => {
for (const mobile of [false, true]) {
- for (const setting of [undefined, true]) {
- const h = harness(mobile, setting);
- h.click();
- assert.deepEqual(h.calls, ["request"]);
- h.click();
- assert.deepEqual(h.calls, ["request", "open"]);
- h.resolve();
- await delay(0);
- assert.deepEqual(h.calls, ["request", "open"]);
- }
+ const h = harness(mobile, 2);
+ h.click();
+ assert.deepEqual(h.calls, ["request"]);
+ h.click();
+ assert.deepEqual(h.calls, ["request", "open"]);
+ h.resolve();
+ await delay(0);
+ assert.deepEqual(h.calls, ["request", "open"]);
}
});
test("desktop and mobile single clicks wait for data without requesting children twice", async () => {
- const contexts = [false, true].map(mobile => harness(mobile, true));
+ const contexts = [false, true].map(mobile => harness(mobile, 2));
contexts.forEach(h => h.click());
await delay(330);
contexts.forEach(h => {
@@ -115,9 +113,9 @@ test("desktop and mobile single clicks wait for data without requesting children
test("prefetch results cannot apply after settings, paths, attachment or expansion state change", async () => {
const contexts = [false, true].flatMap(mobile => [0, 1, 2, 3].map(change => {
- const h = harness(mobile, true);
+ const h = harness(mobile, 2);
h.click();
- if (change === 0) { h.config.parentDocDoubleClickOpen = false; }
+ if (change === 0) { h.config.parentDocTitleClickMode = 1; }
if (change === 1) { h.attributes["data-path"] = "/moved.sy"; }
if (change === 2) { h.row.isConnected = false; }
if (change === 3) { h.row.querySelector = () => ({}); }
@@ -129,7 +127,7 @@ test("prefetch results cannot apply after settings, paths, attachment or expansi
});
test("failed child requests never render prefetched lists", async () => {
- const contexts = [false, true].map(mobile => harness(mobile, true));
+ const contexts = [false, true].map(mobile => harness(mobile, 2));
contexts.forEach(h => { h.click(); h.resolve(-1); });
await delay(330);
contexts.forEach(h => assert.deepEqual(h.calls, ["request"]));
diff --git a/app/src/menus/documentMenu.test.ts b/app/src/menus/documentMenu.test.ts
index 6e97329139..6172a30681 100644
--- a/app/src/menus/documentMenu.test.ts
+++ b/app/src/menus/documentMenu.test.ts
@@ -59,7 +59,7 @@ const setup = (mobile = false, readonly = false) => {
return dependencies[name] || {};
},
window: {siyuan: {menus: {menu}, languages: {}, mobile: {docks: {}},
- config: {readonly, fileTree: {parentDocClickExpand: true}, flashcard: {deck: true},
+ config: {readonly, fileTree: {parentDocTitleClickMode: 1}, flashcard: {deck: true},
keymap: {general: keymap, editor: {general: keymap}}}}},
});
const options: Parameters<typeof exports.initDocumentMenu>[1] = {
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts
index eb0f885885..5092d5ed36 100644
--- a/app/src/menus/navigation.ts
+++ b/app/src/menus/navigation.ts
@@ -433,7 +433,7 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
const notebookId = liElement.parentElement.getAttribute("data-url");
const name = getNotebookName(notebookId);
const boxDocID = liElement.getAttribute("data-node-id");
- if (boxDocID && window.siyuan.config.fileTree.parentDocClickExpand &&
+ if (boxDocID && window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 &&
Number(liElement.getAttribute("data-count")) > 0) {
window.siyuan.menus.menu.append(new MenuItem({
id: "openDocument",
@@ -766,7 +766,7 @@ export const initDocumentMenu = (app: App, options: {
}).element);
window.siyuan.menus.menu.append(new MenuItem({id: "separator_open", type: "separator"}).element);
/// #endif
- if (window.siyuan.config.fileTree.parentDocClickExpand && subFileCount > 0) {
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 && subFileCount > 0) {
window.siyuan.menus.menu.append(new MenuItem({
id: "openDocument",
label: window.siyuan.languages.openDocument,
diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts
index e7c0436880..de94d1541e 100644
--- a/app/src/mobile/dock/MobileFiles.ts
+++ b/app/src/mobile/dock/MobileFiles.ts
@@ -164,7 +164,7 @@ export class MobileFiles extends Model {
let target = event.target as HTMLElement;
const parentTitle = target.closest<HTMLElement>(".b3-list-item__text");
const parentRow = parentTitle?.parentElement;
- const isParentTitle = window.siyuan.config.fileTree.parentDocClickExpand &&
+ const isParentTitle = window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 &&
!!parentRow?.getAttribute("data-node-id") && Number(parentRow.getAttribute("data-count")) > 0;
if (!isParentTitle) {
this.parentDocClick.cancel();
@@ -315,7 +315,7 @@ export class MobileFiles extends Model {
const ulElement = hasTopClosestByTag(target, "UL");
const notebookId = ulElement ? ulElement.getAttribute("data-url") : "";
if (target.getAttribute("data-type") === "navigation-file") {
- if (window.siyuan.config.fileTree.parentDocClickExpand && Number(target.getAttribute("data-count")) > 0) {
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 && Number(target.getAttribute("data-count")) > 0) {
if (parentRow === target) {
this.handleParentDocClick(target, notebookId);
} else {
@@ -328,7 +328,7 @@ export class MobileFiles extends Model {
} else if (target.getAttribute("data-type") === "navigation-root") {
const boxDocID = target.getAttribute("data-node-id");
if (boxDocID) {
- if (window.siyuan.config.fileTree.parentDocClickExpand && Number(target.getAttribute("data-count")) > 0) {
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 0 && Number(target.getAttribute("data-count")) > 0) {
if (parentRow === target) {
this.handleParentDocClick(target, notebookId);
} else {
@@ -1483,7 +1483,8 @@ export class MobileFiles extends Model {
private handleParentDocClick(item: HTMLElement, notebookId: string) {
const docId = item.getAttribute("data-node-id");
- if (window.siyuan.config.fileTree.parentDocDoubleClickOpen === false) {
+ // 单击展开且不双击打开时立即切换,无需等待双击判定
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 2) {
this.parentDocClick.cancel();
this.toggleTreeItem(item);
return;
@@ -1497,8 +1498,7 @@ export class MobileFiles extends Model {
app: Constants.SIYUAN_APPID,
});
return () => {
- if (!window.siyuan.config.fileTree.parentDocClickExpand ||
- window.siyuan.config.fileTree.parentDocDoubleClickOpen === false ||
+ if (window.siyuan.config.fileTree.parentDocTitleClickMode !== 2 ||
item.getAttribute("data-node-id") !== docId || item.getAttribute("data-path") !== path ||
Number(item.getAttribute("data-count")) <= 0 ||
!!item.querySelector(".b3-list-item__arrow--open") !== expanded) { return; }
diff --git a/app/src/types/api/index.d.ts b/app/src/types/api/index.d.ts
index 8ae1c63d6a..e812c6eb5e 100644
--- a/app/src/types/api/index.d.ts
+++ b/app/src/types/api/index.d.ts
@@ -1400,9 +1400,9 @@ export type NetworkEchoAttributeTypeAndValue = { "Type": Array<number> | null; "
export type NetworkEchoBitString = { "BitLength": number; "Bytes": string | null; };
-export type NetworkEchoCertificate = { "AuthorityKeyId": string | null; "BasicConstraintsValid": boolean; "CRLDistributionPoints": Array<string> | null; "DNSNames": Array<string> | null; "EmailAddresses": Array<string> | null; "ExcludedDNSDomains": Array<string> | null; "ExcludedEmailAddresses": Array<string> | null; "ExcludedIPRanges": Array<NetworkEchoIPNet | null> | null; "ExcludedURIDomains": Array<string> | null; "ExtKeyUsage": Array<number> | null; "Extensions": Array<NetworkEchoExtension> | null; "ExtraExtensions": Array<NetworkEchoExtension> | null; "IPAddresses": Array<string> | null; "InhibitAnyPolicy": number; "InhibitAnyPolicyZero": boolean; "InhibitPolicyMapping": number; "InhibitPolicyMappingZero": boolean; "IsCA": boolean; "Issuer": NetworkEchoName; "IssuingCertificateURL": Array<string> | null; "KeyUsage": number; "MaxPathLen": number; "MaxPathLenZero": boolean; "NotAfter": string; "NotBefore": string; "OCSPServer": Array<string> | null; "PermittedDNSDomains": Array<string> | null; "PermittedDNSDomainsCritical": boolean; "PermittedEmailAddresses": Array<string> | null; "PermittedIPRanges": Array<NetworkEchoIPNet | null> | null; "PermittedURIDomains": Array<string> | null; "Policies": Array<string> | null; "PolicyIdentifiers": Array<Array<number> | null> | null; "PolicyMappings": Array<NetworkEchoPolicyMapping> | null; "PublicKey": null | string | (NetworkEchoRSAPublicKey & { "Curve"?: never; "G"?: never; "P"?: never; "Q"?: never; "X"?: never; "Y"?: never; }) | (NetworkEchoECDSAPublicKey & { "E"?: never; "G"?: never; "N"?: never; "P"?: never; "Q"?: never; }) | (NetworkEchoDSAPublicKey & { "Curve"?: never; "E"?: never; "N"?: never; "X"?: never; }); "PublicKeyAlgorithm": number; "Raw": string | null; "RawIssuer": string | null; "RawSubject": string | null; "RawSubjectPublicKeyInfo": string | null; "RawTBSCertificate": string | null; "RequireExplicitPolicy": number; "RequireExplicitPolicyZero": boolean; "SerialNumber": number | null; "Signature": string | null; "SignatureAlgorithm": number; "Subject": NetworkEchoName; "SubjectKeyId": string | null; "URIs": Array<NetworkEchoURL | null> | null; "UnhandledCriticalExtensions": Array<Array<number> | null> | null; "UnknownExtKeyUsage": Array<Array<number> | null> | null; "Version": number; };
+export type NetworkEchoCertificate = { "AuthorityKeyId": string | null; "BasicConstraintsValid": boolean; "CRLDistributionPoints": Array<string> | null; "DNSNames": Array<string> | null; "EmailAddresses": Array<string> | null; "ExcludedDNSDomains": Array<string> | null; "ExcludedEmailAddresses": Array<string> | null; "ExcludedIPRanges": Array<NetworkEchoIPNet | null> | null; "ExcludedURIDomains": Array<string> | null; "ExtKeyUsage": Array<number> | null; "Extensions": Array<NetworkEchoExtension> | null; "ExtraExtensions": Array<NetworkEchoExtension> | null; "IPAddresses": Array<string> | null; "InhibitAnyPolicy": number; "InhibitAnyPolicyZero": boolean; "InhibitPolicyMapping": number; "InhibitPolicyMappingZero": boolean; "IsCA": boolean; "Issuer": NetworkEchoName; "IssuingCertificateURL": Array<string> | null; "KeyUsage": number; "MaxPathLen": number; "MaxPathLenZero": boolean; "NotAfter": string; "NotBefore": string; "OCSPServer": Array<string> | null; "PermittedDNSDomains": Array<string> | null; "PermittedDNSDomainsCritical": boolean; "PermittedEmailAddresses": Array<string> | null; "PermittedIPRanges": Array<NetworkEchoIPNet | null> | null; "PermittedURIDomains": Array<string> | null; "Policies": Array<string> | null; "PolicyIdentifiers": Array<Array<number> | null> | null; "PolicyMappings": Array<NetworkEchoPolicyMapping> | null; "PublicKey": null | string | (NetworkEchoRSAPublicKey & { "Curve"?: never; "G"?: never; "P"?: never; "Q"?: never; "X"?: never; "Y"?: never; }) | (NetworkEchoECDSAPublicKey & { "E"?: never; "G"?: never; "N"?: never; "P"?: never; "Q"?: never; }) | (NetworkEchoDSAPublicKey & { "Curve"?: never; "E"?: never; "N"?: never; "X"?: never; }); "PublicKeyAlgorithm": number; "Raw": string | null; "RawIssuer": string | null; "RawSignatureAlgorithm": string | null; "RawSubject": string | null; "RawSubjectPublicKeyInfo": string | null; "RawTBSCertificate": string | null; "RequireExplicitPolicy": number; "RequireExplicitPolicyZero": boolean; "SerialNumber": number | null; "Signature": string | null; "SignatureAlgorithm": number; "Subject": NetworkEchoName; "SubjectKeyId": string | null; "URIs": Array<NetworkEchoURL | null> | null; "UnhandledCriticalExtensions": Array<Array<number> | null> | null; "UnknownExtKeyUsage": Array<Array<number> | null> | null; "Version": number; };
-export type NetworkEchoConnectionState = { "CipherSuite": number; "CurveID": number; "DidResume": boolean; "ECHAccepted": boolean; "HandshakeComplete": boolean; "HelloRetryRequest": boolean; "NegotiatedProtocol": string; "NegotiatedProtocolIsMutual": boolean; "OCSPResponse": string | null; "PeerCertificates": Array<NetworkEchoCertificate | null> | null; "ServerName": string; "SignedCertificateTimestamps": Array<string | null> | null; "TLSUnique": string | null; "VerifiedChains": Array<Array<NetworkEchoCertificate | null> | null> | null; "Version": number; };
+export type NetworkEchoConnectionState = { "CipherSuite": number; "CurveID": number; "DidResume": boolean; "ECHAccepted": boolean; "HandshakeComplete": boolean; "HelloRetryRequest": boolean; "LocalCertificate": Array<string | null> | null; "NegotiatedProtocol": string; "NegotiatedProtocolIsMutual": boolean; "OCSPResponse": string | null; "PeerCertificates": Array<NetworkEchoCertificate | null> | null; "ServerName": string; "SignedCertificateTimestamps": Array<string | null> | null; "TLSUnique": string | null; "VerifiedChains": Array<Array<NetworkEchoCertificate | null> | null> | null; "Version": number; };
export type NetworkEchoContext = { "ClientIP": string; "ContentType": string; "FullPath": string; "HandlerNames": Array<string> | null; "IsWebsocket": boolean; "Params": Array<NetworkEchoParam> | null; "RawData": string | null; "RemoteIP": string; };
@@ -1840,7 +1840,7 @@ export type SetEntryVisibilityRequestInput = { "active"?: string | null; "profil
export type SetExportRequestInput = { "addTitle"?: boolean | null; "blockEmbedMode"?: number | null; "blockRefMode"?: number | null; "blockRefTextLeft"?: string | null; "blockRefTextRight"?: string | null; "docxTemplate"?: string | null; "fileAnnotationRefMode"?: number | null; "imageWatermarkDesc"?: string | null; "imageWatermarkStr"?: string | null; "includeRelatedDocs"?: boolean | null; "includeSubDocs"?: boolean | null; "inlineMemo"?: boolean | null; "markdownYFM"?: boolean | null; "pandocBin"?: string | null; "pandocParams"?: string | null; "paragraphBeginningSpace"?: boolean | null; "pdfFooter"?: string | null; "pdfWatermarkDesc"?: string | null; "pdfWatermarkStr"?: string | null; "removeAssetsID"?: boolean | null; "tagCloseMarker"?: string | null; "tagOpenMarker"?: string | null; };
-export type SetFiletreeRequestInput = { "allowCreateDeeper"?: boolean | null; "alwaysSelectOpenedFile"?: boolean | null; "boxDocEnabled"?: boolean | null; "closeTabOnDoubleClick"?: boolean | null; "closeTabsOnStart"?: boolean | null; "createDocAtTop"?: boolean | null; "docCreateSaveBox"?: string | null; "docCreateSavePath"?: string | null; "docCreateTemplatePath"?: string | null; "docIconClickExpand"?: boolean | null; "largeFileWarningSize"?: number | null; "maxListCount"?: number | null; "maxOpenTabCount"?: number | null; "noSplitScreenWhenOpenTab"?: boolean | null; "openFilesUseCurrentTab"?: boolean | null; "parentDocClickExpand"?: boolean | null; "parentDocDoubleClickOpen"?: boolean | null; "recentDocsMaxListCount"?: number | null; "refCreateSaveBox"?: string | null; "refCreateSavePath"?: string | null; "removeDocWithoutConfirm"?: boolean | null; "shorthandSaveBox"?: string | null; "shorthandSavePath"?: string | null; "sort"?: number | null; "tabStartupMode"?: number | null; "useSVGDefaultIcon"?: boolean | null; "useSingleLineSave"?: boolean | null; };
+export type SetFiletreeRequestInput = { "allowCreateDeeper"?: boolean | null; "alwaysSelectOpenedFile"?: boolean | null; "boxDocEnabled"?: boolean | null; "closeTabOnDoubleClick"?: boolean | null; "closeTabsOnStart"?: boolean | null; "createDocAtTop"?: boolean | null; "docCreateSaveBox"?: string | null; "docCreateSavePath"?: string | null; "docCreateTemplatePath"?: string | null; "docIconClickMode"?: number | null; "largeFileWarningSize"?: number | null; "maxListCount"?: number | null; "maxOpenTabCount"?: number | null; "noSplitScreenWhenOpenTab"?: boolean | null; "openFilesUseCurrentTab"?: boolean | null; "parentDocTitleClickMode"?: number | null; "recentDocsMaxListCount"?: number | null; "refCreateSaveBox"?: string | null; "refCreateSavePath"?: string | null; "removeDocWithoutConfirm"?: boolean | null; "shorthandSaveBox"?: string | null; "shorthandSavePath"?: string | null; "sort"?: number | null; "tabStartupMode"?: number | null; "useSVGDefaultIcon"?: boolean | null; "useSingleLineSave"?: boolean | null; };
export type SetFlashcardRequestInput = { "blockquote"?: boolean | null; "callout"?: boolean | null; "deck"?: boolean | null; "heading"?: boolean | null; "list"?: boolean | null; "mark"?: boolean | null; "maximumInterval"?: number | null; "newCardLimit"?: number | null; "requestRetention"?: number | null; "reviewCardLimit"?: number | null; "reviewMode"?: number | null; "superBlock"?: boolean | null; "weights"?: string | null; };
@@ -1994,9 +1994,9 @@ export type SettingExport = { "addTitle": boolean; "blockEmbedMode": number; "bl
export type SettingExportInput = { "addTitle"?: boolean | null; "blockEmbedMode"?: number | null; "blockRefMode"?: number | null; "blockRefTextLeft"?: string | null; "blockRefTextRight"?: string | null; "docxTemplate"?: string | null; "fileAnnotationRefMode"?: number | null; "imageWatermarkDesc"?: string | null; "imageWatermarkStr"?: string | null; "includeRelatedDocs"?: boolean | null; "includeSubDocs"?: boolean | null; "inlineMemo"?: boolean | null; "markdownYFM"?: boolean | null; "pandocBin"?: string | null; "pandocParams"?: string | null; "paragraphBeginningSpace"?: boolean | null; "pdfFooter"?: string | null; "pdfWatermarkDesc"?: string | null; "pdfWatermarkStr"?: string | null; "removeAssetsID"?: boolean | null; "tagCloseMarker"?: string | null; "tagOpenMarker"?: string | null; };
-export type SettingFileTree = { "allowCreateDeeper": boolean; "alwaysSelectOpenedFile": boolean; "boxDocEnabled": boolean | null; "closeTabOnDoubleClick": boolean; "closeTabsOnStart": boolean; "createDocAtTop": boolean | null; "docCreateSaveBox": string; "docCreateSavePath": string; "docCreateTemplatePath": string; "docIconClickExpand": boolean; "largeFileWarningSize": number; "maxListCount": number; "maxOpenTabCount": number; "noSplitScreenWhenOpenTab": boolean; "openFilesUseCurrentTab": boolean; "parentDocClickExpand": boolean; "parentDocDoubleClickOpen": boolean | null; "recentDocsMaxListCount": number; "refCreateSaveBox": string; "refCreateSavePath": string; "removeDocWithoutConfirm": boolean; "shorthandSaveBox": string; "shorthandSavePath": string; "sort": number; "tabStartupMode": number | null; "useSVGDefaultIcon": boolean | null; "useSingleLineSave": boolean; };
+export type SettingFileTree = { "allowCreateDeeper": boolean; "alwaysSelectOpenedFile": boolean; "boxDocEnabled": boolean | null; "closeTabOnDoubleClick": boolean; "closeTabsOnStart": boolean; "createDocAtTop": boolean | null; "docCreateSaveBox": string; "docCreateSavePath": string; "docCreateTemplatePath": string; "docIconClickMode": number; "largeFileWarningSize": number; "maxListCount": number; "maxOpenTabCount": number; "noSplitScreenWhenOpenTab": boolean; "openFilesUseCurrentTab": boolean; "parentDocTitleClickMode": number; "recentDocsMaxListCount": number; "refCreateSaveBox": string; "refCreateSavePath": string; "removeDocWithoutConfirm": boolean; "shorthandSaveBox": string; "shorthandSavePath": string; "sort": number; "tabStartupMode": number | null; "useSVGDefaultIcon": boolean | null; "useSingleLineSave": boolean; };
-export type SettingFileTreeInput = { "allowCreateDeeper"?: boolean | null; "alwaysSelectOpenedFile"?: boolean | null; "boxDocEnabled"?: boolean | null; "closeTabOnDoubleClick"?: boolean | null; "closeTabsOnStart"?: boolean | null; "createDocAtTop"?: boolean | null; "docCreateSaveBox"?: string | null; "docCreateSavePath"?: string | null; "docCreateTemplatePath"?: string | null; "docIconClickExpand"?: boolean | null; "largeFileWarningSize"?: number | null; "maxListCount"?: number | null; "maxOpenTabCount"?: number | null; "noSplitScreenWhenOpenTab"?: boolean | null; "openFilesUseCurrentTab"?: boolean | null; "parentDocClickExpand"?: boolean | null; "parentDocDoubleClickOpen"?: boolean | null; "recentDocsMaxListCount"?: number | null; "refCreateSaveBox"?: string | null; "refCreateSavePath"?: string | null; "removeDocWithoutConfirm"?: boolean | null; "shorthandSaveBox"?: string | null; "shorthandSavePath"?: string | null; "sort"?: number | null; "tabStartupMode"?: number | null; "useSVGDefaultIcon"?: boolean | null; "useSingleLineSave"?: boolean | null; };
+export type SettingFileTreeInput = { "allowCreateDeeper"?: boolean | null; "alwaysSelectOpenedFile"?: boolean | null; "boxDocEnabled"?: boolean | null; "closeTabOnDoubleClick"?: boolean | null; "closeTabsOnStart"?: boolean | null; "createDocAtTop"?: boolean | null; "docCreateSaveBox"?: string | null; "docCreateSavePath"?: string | null; "docCreateTemplatePath"?: string | null; "docIconClickMode"?: number | null; "largeFileWarningSize"?: number | null; "maxListCount"?: number | null; "maxOpenTabCount"?: number | null; "noSplitScreenWhenOpenTab"?: boolean | null; "openFilesUseCurrentTab"?: boolean | null; "parentDocTitleClickMode"?: number | null; "recentDocsMaxListCount"?: number | null; "refCreateSaveBox"?: string | null; "refCreateSavePath"?: string | null; "removeDocWithoutConfirm"?: boolean | null; "shorthandSaveBox"?: string | null; "shorthandSavePath"?: string | null; "sort"?: number | null; "tabStartupMode"?: number | null; "useSVGDefaultIcon"?: boolean | null; "useSingleLineSave"?: boolean | null; };
export type SettingFlashcard = { "blockquote": boolean; "callout": boolean; "deck": boolean; "heading": boolean; "list": boolean; "mark": boolean; "maximumInterval": number; "newCardLimit": number; "requestRetention": number; "reviewCardLimit": number; "reviewMode": number; "superBlock": boolean; "weights": string; };
diff --git a/app/src/types/config.d.ts b/app/src/types/config.d.ts
index ef03d268ed..accb786cae 100644
--- a/app/src/types/config.d.ts
+++ b/app/src/types/config.d.ts
@@ -926,18 +926,14 @@ declare namespace Config {
*/
alwaysSelectOpenedFile: boolean;
/**
- * Whether clicking a document icon expands or collapses its child documents
+ * Behavior of clicking a document or notebook icon: 0 changes the icon, 1 expands or collapses its child documents
*/
- docIconClickExpand: boolean;
+ docIconClickMode: number;
/**
- * Whether clicking a parent document title expands or collapses its child documents
+ * Behavior of clicking a parent document title: 0 opens the document, 1 expands or collapses its child documents,
+ * 2 expands or collapses on a single click and opens the parent on a double-click
*/
- parentDocClickExpand: boolean;
- /**
- * 单击标题展开启用时,是否允许双击打开父文档;缺失时默认启用
- * 关闭后单击不等待双击判定;设置接口省略或传 null 时保留当前值
- */
- parentDocDoubleClickOpen: boolean;
+ parentDocTitleClickMode: number;
/**
* Whether to enable top-level notebook documents
*/
diff --git a/kernel/api/contract_setting_file_tree_click_test.go b/kernel/api/contract_setting_file_tree_click_test.go
new file mode 100644
index 0000000000..9b3697fd4c
--- /dev/null
+++ b/kernel/api/contract_setting_file_tree_click_test.go
@@ -0,0 +1,112 @@
+package api
+
+import (
+ "encoding/json"
+ "net/http/httptest"
+ "strings"
+ "testing"
+
+ "github.com/gin-gonic/gin"
+ "github.com/siyuan-note/siyuan/kernel/apicontract"
+ "github.com/siyuan-note/siyuan/kernel/conf"
+ "github.com/siyuan-note/siyuan/kernel/model"
+ "github.com/siyuan-note/siyuan/kernel/util"
+)
+
+func TestAPIContractSettingFileTreeClickMode(t *testing.T) {
+ gin.SetMode(gin.TestMode)
+ previousConf, previousReadOnly := model.Conf, util.ReadOnly
+ util.ReadOnly = true
+ t.Cleanup(func() { model.Conf, util.ReadOnly = previousConf, previousReadOnly })
+ engine := gin.New()
+ engine.POST("/api/setting/setFiletree", setFiletree)
+ engine.POST("/api/setting/patch", patchSetting)
+ for _, entry := range []struct {
+ path, body string
+ docIcon, title int
+ echo bool // setFiletree 响应回显应用后的取值
+ }{
+ // setFiletree 为整体替换,未提交的字段回到默认值
+ {"/api/setting/setFiletree", `{}`, 0, 0, true},
+ {"/api/setting/setFiletree", `{"docIconClickMode":1,"parentDocTitleClickMode":2}`, 1, 2, true},
+ {"/api/setting/setFiletree", `{"DocIconClickMode":1,"ParentDocTitleClickMode":1}`, 1, 1, true},
+ {"/api/setting/setFiletree", `{"docIconClickMode":2,"parentDocTitleClickMode":9}`, 0, 0, true},
+ {"/api/setting/setFiletree", `{"docIconClickMode":-1}`, 0, 0, true},
+ // patch 在现有配置上合并,未提交的字段保留当前值,null 按零值处理
+ {"/api/setting/patch", `{"fileTree":{"docIconClickMode":1}}`, 1, 1, false},
+ {"/api/setting/patch", `{"fileTree":{"parentDocTitleClickMode":2}}`, 0, 2, false},
+ {"/api/setting/patch", `{"fileTree":{"docIconClickMode":null}}`, 0, 1, false},
+ {"/api/setting/patch", `{"fileTree":{"parentDocTitleClickMode":9}}`, 0, 0, false},
+ } {
+ model.Conf = model.NewAppConf()
+ model.Conf.FileTree = conf.NewFileTree()
+ model.Conf.FileTree.ParentDocTitleClickMode = 1
+ recorder := httptest.NewRecorder()
+ request := httptest.NewRequest("POST", entry.path, strings.NewReader(entry.body))
+ request.Header.Set("Content-Type", "application/json")
+ engine.ServeHTTP(recorder, request)
+ requireAPIContract(t, "POST", entry.path, recorder)
+ var response struct {
+ Code int `json:"code"`
+ Data *apicontract.SettingFileTree `json:"data"`
+ }
+ if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil {
+ t.Fatal(err)
+ }
+ if response.Code != 0 {
+ t.Fatalf("setting failed: %s", recorder.Body.String())
+ }
+ if entry.echo && (response.Data == nil ||
+ response.Data.DocIconClickMode != entry.docIcon ||
+ response.Data.ParentDocTitleClickMode != entry.title) {
+ t.Fatalf("response lost the click modes: %s", recorder.Body.String())
+ }
+ if model.Conf.FileTree.DocIconClickMode != entry.docIcon ||
+ model.Conf.FileTree.ParentDocTitleClickMode != entry.title {
+ t.Fatalf("%s %s: want %d/%d, got %d/%d", entry.path, entry.body, entry.docIcon, entry.title,
+ model.Conf.FileTree.DocIconClickMode, model.Conf.FileTree.ParentDocTitleClickMode)
+ }
+ }
+}
+
+func TestAPIContractSettingFileTreeClickModeRejectsWrongTypes(t *testing.T) {
+ gin.SetMode(gin.TestMode)
+ previousConf, previousReadOnly := model.Conf, util.ReadOnly
+ util.ReadOnly = true
+ t.Cleanup(func() { model.Conf, util.ReadOnly = previousConf, previousReadOnly })
+ engine := gin.New()
+ engine.POST("/api/setting/setFiletree", setFiletree)
+ engine.POST("/api/setting/patch", patchSetting)
+ for _, entry := range []string{
+ `{"docIconClickMode":"1"}`,
+ `{"parentDocTitleClickMode":"1"}`,
+ `{"docIconClickMode":1.5}`,
+ `{"parentDocTitleClickMode":true}`,
+ } {
+ for _, path := range []string{"/api/setting/setFiletree", "/api/setting/patch"} {
+ model.Conf = model.NewAppConf()
+ model.Conf.FileTree = conf.NewFileTree()
+ body := entry
+ if path == "/api/setting/patch" {
+ body = `{"fileTree":` + entry + `}`
+ }
+ recorder := httptest.NewRecorder()
+ request := httptest.NewRequest("POST", path, strings.NewReader(body))
+ request.Header.Set("Content-Type", "application/json")
+ engine.ServeHTTP(recorder, request)
+ var response struct {
+ Code int `json:"code"`
+ Msg string `json:"msg"`
+ }
+ if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil {
+ t.Fatal(err)
+ }
+ if response.Code == 0 {
+ t.Fatalf("%s %s: invalid value accepted", path, body)
+ }
+ if 0 != model.Conf.FileTree.DocIconClickMode || 0 != model.Conf.FileTree.ParentDocTitleClickMode {
+ t.Fatalf("%s %s: configuration changed on rejection", path, body)
+ }
+ }
+ }
+}
diff --git a/kernel/api/contract_setting_parent_doc_test.go b/kernel/api/contract_setting_parent_doc_test.go
deleted file mode 100644
index d64044b8b9..0000000000
--- a/kernel/api/contract_setting_parent_doc_test.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package api
-
-import (
- "encoding/json"
- "net/http/httptest"
- "strings"
- "testing"
-
- "github.com/gin-gonic/gin"
- "github.com/siyuan-note/siyuan/kernel/apicontract"
- "github.com/siyuan-note/siyuan/kernel/conf"
- "github.com/siyuan-note/siyuan/kernel/model"
- "github.com/siyuan-note/siyuan/kernel/util"
-)
-
-func TestAPIContractSettingParentDocDoubleClick(t *testing.T) {
- gin.SetMode(gin.TestMode)
- previousConf, previousReadOnly := model.Conf, util.ReadOnly
- util.ReadOnly = true
- t.Cleanup(func() { model.Conf, util.ReadOnly = previousConf, previousReadOnly })
- engine := gin.New()
- engine.POST("/api/setting/setFiletree", setFiletree)
- engine.POST("/api/setting/patch", patchSetting)
- for _, previous := range []*bool{nil, new(true), new(false)} {
- for _, entry := range []struct {
- path, body string
- want *bool
- }{
- {"/api/setting/setFiletree", `{}`, previous},
- {"/api/setting/setFiletree", `{"parentDocDoubleClickOpen":null}`, previous},
- {"/api/setting/setFiletree", `{"ParentDocDoubleClickOpen":false}`, new(false)},
- {"/api/setting/setFiletree", `{"parentDocDoubleClickOpen":true}`, new(true)},
- {"/api/setting/patch", `{"fileTree":{"parentDocDoubleClickOpen":false}}`, new(false)},
- {"/api/setting/patch", `{"fileTree":{"parentDocDoubleClickOpen":true}}`, new(true)},
- {"/api/setting/patch", `{"fileTree":{"parentDocDoubleClickOpen":null}}`, previous},
- {"/api/setting/patch", `{"fileTree":{"parentDocClickExpand":false}}`, previous},
- } {
- model.Conf = model.NewAppConf()
- model.Conf.FileTree = conf.NewFileTree()
- model.Conf.FileTree.ParentDocClickExpand = true
- model.Conf.FileTree.ParentDocDoubleClickOpen = previous
- recorder := httptest.NewRecorder()
- request := httptest.NewRequest("POST", entry.path, strings.NewReader(entry.body))
- request.Header.Set("Content-Type", "application/json")
- engine.ServeHTTP(recorder, request)
- requireAPIContract(t, "POST", entry.path, recorder)
- var response struct {
- Code int `json:"code"`
- Data *apicontract.SettingFileTree `json:"data"`
- }
- if err := json.Unmarshal(recorder.Body.Bytes(), &response); err != nil {
- t.Fatal(err)
- }
- if response.Code != 0 {
- t.Fatalf("setting failed: %s", recorder.Body.String())
- }
- want := entry.want == nil || *entry.want
- if entry.path == "/api/setting/setFiletree" &&
- (response.Data == nil || response.Data.ParentDocDoubleClickOpen == nil ||
- *response.Data.ParentDocDoubleClickOpen != want) {
- t.Fatalf("response lost the double-click preference: %s", recorder.Body.String())
- }
- if got := model.Conf.FileTree.ParentDocDoubleClickOpen; got == nil || *got != want {
- t.Fatalf("%s: want %v, got %v", entry.body, want, got)
- }
- }
- }
-}
diff --git a/kernel/api/contract_setting_test.go b/kernel/api/contract_setting_test.go
index 61477bf9b9..4636ec473a 100644
--- a/kernel/api/contract_setting_test.go
+++ b/kernel/api/contract_setting_test.go
@@ -93,11 +93,15 @@ func TestAPIContractSettingMindmapCompatibility(t *testing.T) {
})
}
-func TestAPIContractSettingParentDocDoubleClickCompatibility(t *testing.T) {
+func TestAPIContractSettingFileTreeClickModeCompatibility(t *testing.T) {
compareSettingConfig(t, apicontract.SetFiletree, conf.NewFileTree, []string{
- `{}`, `{"parentDocDoubleClickOpen":true}`, `{"parentDocDoubleClickOpen":false}`,
- `{"parentDocDoubleClickOpen":null}`, `{"ParentDocDoubleClickOpen":false}`,
- `{"parentDocDoubleClickOpen":"false"}`, `{"parentDocDoubleClickOpen":0}`,
+ `{}`, `{"docIconClickMode":1,"parentDocTitleClickMode":2}`,
+ `{"docIconClickMode":0}`, `{"docIconClickMode":null}`, `{"DocIconClickMode":1}`,
+ `{"parentDocTitleClickMode":0}`, `{"parentDocTitleClickMode":1}`, `{"parentDocTitleClickMode":null}`,
+ `{"ParentDocTitleClickMode":2}`, `{"docIconClickMode":2}`, `{"parentDocTitleClickMode":3}`,
+ `{"docIconClickMode":"1"}`, `{"docIconClickMode":1.5}`, `{"parentDocTitleClickMode":true}`,
+ // 已废弃的布尔字段不再被读取
+ `{"docIconClickExpand":true}`, `{"parentDocClickExpand":true,"parentDocDoubleClickOpen":false}`,
})
}
diff --git a/kernel/api/setting.go b/kernel/api/setting.go
index c93f26d977..438c8f34b1 100644
--- a/kernel/api/setting.go
+++ b/kernel/api/setting.go
@@ -515,7 +515,6 @@ func applyFiletreeSetting(c *gin.Context, request apicontract.SetFiletreeRequest
fileTree := conf.NewFileTree()
fileTree.BoxDocEnabled = nil
fileTree.UseSVGDefaultIcon = nil
- fileTree.ParentDocDoubleClickOpen = nil
if err = gulu.JSON.UnmarshalJSON(param, fileTree); err != nil {
ret = apicontract.Failure[*apicontract.SettingFileTree](-1, err.Error())
return
@@ -535,10 +534,6 @@ func applyFiletreeSetting(c *gin.Context, request apicontract.SetFiletreeRequest
}
}
oldBoxDocEnabled := model.IsBoxDocEnabled()
- if nil == fileTree.ParentDocDoubleClickOpen {
- fileTree.ParentDocDoubleClickOpen = model.Conf.FileTree.ParentDocDoubleClickOpen
- fileTree.NormalizeParentDocDoubleClickOpen()
- }
fileTree.DocCreateSavePath = util.TrimSpaceInPath(fileTree.DocCreateSavePath)
fileTree.DocCreateTemplatePath = util.NormalizeTemplatePath(fileTree.DocCreateTemplatePath)
@@ -558,6 +553,12 @@ func applyFiletreeSetting(c *gin.Context, request apicontract.SetFiletreeRequest
if 32 < fileTree.MaxOpenTabCount {
fileTree.MaxOpenTabCount = 32
}
+ if 0 > fileTree.DocIconClickMode || 1 < fileTree.DocIconClickMode {
+ fileTree.DocIconClickMode = 0
+ }
+ if 0 > fileTree.ParentDocTitleClickMode || 2 < fileTree.ParentDocTitleClickMode {
+ fileTree.ParentDocTitleClickMode = 0
+ }
if nil == fileTree.TabStartupMode {
fileTree.TabStartupMode = new(int)
if fileTree.CloseTabsOnStart {
diff --git a/kernel/api/setting_contract.go b/kernel/api/setting_contract.go
index 748d5e599f..5c442065b8 100644
--- a/kernel/api/setting_contract.go
+++ b/kernel/api/setting_contract.go
@@ -496,9 +496,8 @@ func settingFileTreePayload(value *conf.FileTree) *apicontract.SettingFileTree {
result.AlwaysSelectOpenedFile = value.AlwaysSelectOpenedFile
result.OpenFilesUseCurrentTab = value.OpenFilesUseCurrentTab
result.CloseTabOnDoubleClick = value.CloseTabOnDoubleClick
- result.DocIconClickExpand = value.DocIconClickExpand
- result.ParentDocClickExpand = value.ParentDocClickExpand
- result.ParentDocDoubleClickOpen = value.ParentDocDoubleClickOpen
+ result.DocIconClickMode = value.DocIconClickMode
+ result.ParentDocTitleClickMode = value.ParentDocTitleClickMode
result.BoxDocEnabled = value.BoxDocEnabled
result.UseSVGDefaultIcon = value.UseSVGDefaultIcon
result.RefCreateSaveBox = value.RefCreateSaveBox
diff --git a/kernel/apicontract/schema.json b/kernel/apicontract/schema.json
index c0647d4318..cb323237a2 100644
--- a/kernel/apicontract/schema.json
+++ b/kernel/apicontract/schema.json
@@ -31235,6 +31235,16 @@
}
]
},
+ "RawSignatureAlgorithm": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"RawSubject": {
"anyOf": [
{
@@ -31416,6 +31426,7 @@
"PublicKeyAlgorithm",
"Raw",
"RawIssuer",
+ "RawSignatureAlgorithm",
"RawSubject",
"RawSubjectPublicKeyInfo",
"RawTBSCertificate",
@@ -31454,6 +31465,26 @@
"HelloRetryRequest": {
"type": "boolean"
},
+ "LocalCertificate": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
"NegotiatedProtocol": {
"type": "string"
},
@@ -31564,6 +31595,7 @@
"ECHAccepted",
"HandshakeComplete",
"HelloRetryRequest",
+ "LocalCertificate",
"NegotiatedProtocol",
"NegotiatedProtocolIsMutual",
"OCSPResponse",
@@ -40391,10 +40423,10 @@
}
]
},
- "docIconClickExpand": {
+ "docIconClickMode": {
"anyOf": [
{
- "type": "boolean"
+ "type": "integer"
},
{
"type": "null"
@@ -40451,20 +40483,10 @@
}
]
},
- "parentDocClickExpand": {
+ "parentDocTitleClickMode": {
"anyOf": [
{
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
- },
- "parentDocDoubleClickOpen": {
- "anyOf": [
- {
- "type": "boolean"
+ "type": "integer"
},
{
"type": "null"
@@ -45279,8 +45301,8 @@
"docCreateTemplatePath": {
"type": "string"
},
- "docIconClickExpand": {
- "type": "boolean"
+ "docIconClickMode": {
+ "type": "integer"
},
"largeFileWarningSize": {
"type": "integer"
@@ -45297,18 +45319,8 @@
"openFilesUseCurrentTab": {
"type": "boolean"
},
- "parentDocClickExpand": {
- "type": "boolean"
- },
- "parentDocDoubleClickOpen": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
+ "parentDocTitleClickMode": {
+ "type": "integer"
},
"recentDocsMaxListCount": {
"type": "integer"
@@ -45365,14 +45377,13 @@
"docCreateSaveBox",
"docCreateSavePath",
"docCreateTemplatePath",
- "docIconClickExpand",
+ "docIconClickMode",
"largeFileWarningSize",
"maxListCount",
"maxOpenTabCount",
"noSplitScreenWhenOpenTab",
"openFilesUseCurrentTab",
- "parentDocClickExpand",
- "parentDocDoubleClickOpen",
+ "parentDocTitleClickMode",
"recentDocsMaxListCount",
"refCreateSaveBox",
"refCreateSavePath",
@@ -45479,10 +45490,10 @@
}
]
},
- "docIconClickExpand": {
+ "docIconClickMode": {
"anyOf": [
{
- "type": "boolean"
+ "type": "integer"
},
{
"type": "null"
@@ -45539,20 +45550,10 @@
}
]
},
- "parentDocClickExpand": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ]
- },
- "parentDocDoubleClickOpen": {
+ "parentDocTitleClickMode": {
"anyOf": [
{
- "type": "boolean"
+ "type": "integer"
},
{
"type": "null"
diff --git a/kernel/apicontract/setting.go b/kernel/apicontract/setting.go
index a3d90511b4..1ae474bb7f 100644
--- a/kernel/apicontract/setting.go
+++ b/kernel/apicontract/setting.go
@@ -314,11 +314,13 @@ type SettingFileTree struct {
AlwaysSelectOpenedFile bool `json:"alwaysSelectOpenedFile" api:"optional,nullable"`
OpenFilesUseCurrentTab bool `json:"openFilesUseCurrentTab" api:"optional,nullable"`
CloseTabOnDoubleClick bool `json:"closeTabOnDoubleClick" api:"optional,nullable"`
- DocIconClickExpand bool `json:"docIconClickExpand" api:"optional,nullable"`
- ParentDocClickExpand bool `json:"parentDocClickExpand" api:"optional,nullable"`
- // 仅在 parentDocClickExpand 启用时生效;关闭后单击标题不再等待双击判定。
- // 默认启用;更新时省略或传 null 保留当前值,旧持久化配置缺失时继承默认值。
- ParentDocDoubleClickOpen *bool `json:"parentDocDoubleClickOpen" api:"optional,nullable"`
+ // 单击文档图标或笔记本图标的行为:0 修改图标,1 展开或折叠子文档。无子文档时,1 在有可打开文档时打开文档,否则修改图标。
+ // 超出取值范围的输入按 0 处理。已废弃的 docIconClickExpand 不再读取,旧配置升级后回到 0。
+ DocIconClickMode int `json:"docIconClickMode" api:"optional,nullable"`
+ // 点击父文档标题的行为:0 打开文档,1 展开或折叠子文档,2 单击展开或折叠子文档、双击打开父文档。
+ // 没有子文档时各取值均直接打开文档;取 2 时单击需等待约 300 毫秒以判断是否双击。超出取值范围的输入按 0 处理。
+ // 已废弃的 parentDocClickExpand 与 parentDocDoubleClickOpen 不再读取,旧配置升级后回到 0。
+ ParentDocTitleClickMode int `json:"parentDocTitleClickMode" api:"optional,nullable"`
BoxDocEnabled *bool `json:"boxDocEnabled" api:"optional,nullable"`
UseSVGDefaultIcon *bool `json:"useSVGDefaultIcon" api:"optional,nullable"`
RefCreateSaveBox string `json:"refCreateSaveBox" api:"optional,nullable"`
diff --git a/kernel/conf/filetree.go b/kernel/conf/filetree.go
index e10cd503c5..d3db8b77ee 100644
--- a/kernel/conf/filetree.go
+++ b/kernel/conf/filetree.go
@@ -24,9 +24,8 @@ type FileTree struct {
AlwaysSelectOpenedFile bool `json:"alwaysSelectOpenedFile"` // 是否自动选中当前打开的文件
OpenFilesUseCurrentTab bool `json:"openFilesUseCurrentTab"` // 在当前页签打开文件
CloseTabOnDoubleClick bool `json:"closeTabOnDoubleClick"` // 是否使用双击关闭页签
- DocIconClickExpand bool `json:"docIconClickExpand"` // 单击文档或笔记本图标时展开或折叠下级文档
- ParentDocClickExpand bool `json:"parentDocClickExpand"` // 单击父文档标题时展开或折叠下级文档
- ParentDocDoubleClickOpen *bool `json:"parentDocDoubleClickOpen"` // 双击父文档标题打开文档
+ DocIconClickMode int `json:"docIconClickMode"` // 单击文档图标或笔记本图标的行为:0 修改图标,1 展开或折叠子文档
+ ParentDocTitleClickMode int `json:"parentDocTitleClickMode"` // 点击父文档标题的行为:0 打开文档,1 展开或折叠子文档,2 单击展开或折叠子文档、双击打开父文档
BoxDocEnabled *bool `json:"boxDocEnabled"` // 是否启用顶层笔记本文档
UseSVGDefaultIcon *bool `json:"useSVGDefaultIcon"` // 是否使用 SVG 默认图标
RefCreateSaveBox string `json:"refCreateSaveBox"` // 块引时新建文档存储笔记本
@@ -55,9 +54,8 @@ func NewFileTree() *FileTree {
AlwaysSelectOpenedFile: false,
OpenFilesUseCurrentTab: false,
CloseTabOnDoubleClick: false,
- DocIconClickExpand: false,
- ParentDocClickExpand: false,
- ParentDocDoubleClickOpen: new(true),
+ DocIconClickMode: 0,
+ ParentDocTitleClickMode: 0,
BoxDocEnabled: new(bool),
UseSVGDefaultIcon: new(true),
Sort: util.SortModeCustom,
@@ -73,13 +71,6 @@ func NewFileTree() *FileTree {
}
}
-// 缺失配置时启用父文档标题双击打开,保留文档树的展开状态。
-func (fileTree *FileTree) NormalizeParentDocDoubleClickOpen() {
- if nil == fileTree.ParentDocDoubleClickOpen {
- fileTree.ParentDocDoubleClickOpen = new(true)
- }
-}
-
const (
MinFileTreeRecentDocsListCount = 32
MaxFileTreeRecentDocsListCount = 256
diff --git a/kernel/conf/filetree_test.go b/kernel/conf/filetree_test.go
index e6eae93f75..d352d201c2 100644
--- a/kernel/conf/filetree_test.go
+++ b/kernel/conf/filetree_test.go
@@ -23,8 +23,11 @@ import (
func TestNewFileTreeDefaults(t *testing.T) {
fileTree := NewFileTree()
- if nil == fileTree.ParentDocDoubleClickOpen || !*fileTree.ParentDocDoubleClickOpen {
- t.Fatal("parent document double-click opening should be enabled by default")
+ if 0 != fileTree.DocIconClickMode {
+ t.Fatal("clicking a document or notebook icon should change the icon by default")
+ }
+ if 0 != fileTree.ParentDocTitleClickMode {
+ t.Fatal("clicking a parent document title should open the document by default")
}
if nil == fileTree.BoxDocEnabled {
t.Fatal("box document setting should be initialized")
@@ -40,26 +43,26 @@ func TestNewFileTreeDefaults(t *testing.T) {
}
}
-func TestFileTreeParentDocDoubleClickOpenCompatibility(t *testing.T) {
+func TestFileTreeClickModeSerialization(t *testing.T) {
for _, entry := range []struct {
- body string
- want bool
+ body string
+ docIcon, parentTitle int
}{
- {`{"parentDocClickExpand":true}`, true},
- {`{"parentDocDoubleClickOpen":null}`, true},
- {`{"parentDocDoubleClickOpen":false}`, false},
- {`{"parentDocDoubleClickOpen":true}`, true},
+ {`{"docIconClickMode":1,"parentDocTitleClickMode":2}`, 1, 2},
+ {`{"docIconClickMode":0,"parentDocTitleClickMode":0}`, 0, 0},
+ {`{"parentDocTitleClickMode":1}`, 0, 1},
+ // 已废弃的布尔字段不再被读取,升级后按默认值生效
+ {`{"docIconClickExpand":true,"parentDocClickExpand":true,"parentDocDoubleClickOpen":false}`, 0, 0},
} {
t.Run(entry.body, func(t *testing.T) {
- var fileTree FileTree
- if err := json.Unmarshal([]byte(entry.body), &fileTree); err != nil {
+ fileTree := NewFileTree()
+ if err := json.Unmarshal([]byte(entry.body), fileTree); err != nil {
t.Fatal(err)
}
- fileTree.NormalizeParentDocDoubleClickOpen()
- if nil == fileTree.ParentDocDoubleClickOpen || *fileTree.ParentDocDoubleClickOpen != entry.want {
- t.Fatalf("double-click preference: %v", fileTree.ParentDocDoubleClickOpen)
+ if fileTree.DocIconClickMode != entry.docIcon || fileTree.ParentDocTitleClickMode != entry.parentTitle {
+ t.Fatalf("click modes: %d, %d", fileTree.DocIconClickMode, fileTree.ParentDocTitleClickMode)
}
- encoded, err := json.Marshal(&fileTree)
+ encoded, err := json.Marshal(fileTree)
if err != nil {
t.Fatal(err)
}
@@ -67,8 +70,8 @@ func TestFileTreeParentDocDoubleClickOpenCompatibility(t *testing.T) {
if err = json.Unmarshal(encoded, &restored); err != nil {
t.Fatal(err)
}
- if nil == restored.ParentDocDoubleClickOpen || *restored.ParentDocDoubleClickOpen != entry.want {
- t.Fatal("double-click preference was not preserved after serialization")
+ if restored.DocIconClickMode != entry.docIcon || restored.ParentDocTitleClickMode != entry.parentTitle {
+ t.Fatal("click modes were not preserved after serialization")
}
})
}
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index c4afd3e278..aae34eacbe 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -441,7 +441,6 @@ func InitConf() {
// 配置缺失时默认关闭顶层笔记本文档。
Conf.FileTree.BoxDocEnabled = new(bool)
}
- Conf.FileTree.NormalizeParentDocDoubleClickOpen()
if conf.MinFileTreeRecentDocsListCount > Conf.FileTree.RecentDocsMaxListCount {
Conf.FileTree.RecentDocsMaxListCount = conf.MinFileTreeRecentDocsListCount