An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve new notebook and user guide sort placement https://github.com/siyuan-note/siyuan/issues/19075
Daniel8c98c226c592
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.jsonindex 1584f8062c..a73dd9ad10 100644--- a/app/appearance/langs/ar.json+++ b/app/appearance/langs/ar.json@@ -1995,8 +1995,8 @@"fileTree21": "بعد التمكين، سيتم استخدام تنسيق JSON ذي السطر الواحد عند حفظ مستندات .sy وقاعدة بيانات .json، مما يقلل حجم الملف بحوالي 30٪ وتحسين كفاءة القراءة والكتابة بنسبة 50٪","fileTree22": "تنبيه ملف كبير","fileTree23": "إشعار عند تجاوز ملفات .sy أو قاعدة بيانات .json لهذا الحجم",- "fileTree24": "وضع المستندات الفرعية الجديدة في الأعلى",- "fileTree25": "عند التمكين، سيتم وضع المستندات الفرعية الجديدة في أعلى قائمة المستندات الفرعية (ينطبق فقط عند تمكين الترتيب المخصص)",+ "fileTree24": "وضع دفاتر الملاحظات والمستندات الجديدة في الأعلى",+ "fileTree25": "عند التمكين، ستوضع دفاتر الملاحظات والمستندات الجديدة ودليل المستخدم عند فتحه في أعلى قوائمها (ينطبق فقط عند تمكين الترتيب المخصص)","fileTree26": "مسار الحفظ الافتراضي للمذكرات السريعة","fileTree27": "على سبيل المثال، <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>، إذا لم يتم استخدام متغير قالب، ستُضاف المذكرة السريعة إلى نهاية المستند في المسار المحدد","export10": "على سبيل المثال <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>، إذا كان فارغاً، سيتم استخدام العلامة المائية من النص المخصص أو مسار ملف العلامة المائية.",diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.jsonindex ca7d285959..7b1785fcc7 100644--- a/app/appearance/langs/de.json+++ b/app/appearance/langs/de.json@@ -1995,8 +1995,8 @@"fileTree21": "Nach der Aktivierung wird beim Speichern von .sy-Dokumenten und Datenbank-.json-Dateien das Einzeilige JSON-Format verwendet, was die Dateigröße um etwa 30 % reduzieren und die Lese- und Schreibgeschwindigkeit um 50 % verbessern kann","fileTree22": "Großdatei-Warnung","fileTree23": "Benachrichtigen, wenn .sy-Dateien oder die Datenbank .json diese Größe überschreiten",- "fileTree24": "Neue Unterdokumente oben platzieren",- "fileTree25": "Wenn aktiviert, werden neu erstellte Unterdokumente oben in der Liste der Unterdokumente platziert (wirkt nur, wenn die benutzerdefinierte Sortierung aktiviert ist)",+ "fileTree24": "Neue Notizbücher und Dokumente oben platzieren",+ "fileTree25": "Wenn aktiviert, werden neu erstellte Notizbücher und Dokumente sowie das geöffnete Benutzerhandbuch am Anfang der jeweiligen Liste platziert (wirkt nur, wenn die benutzerdefinierte Sortierung aktiviert ist)","fileTree26": "Standard-Speicherort für neue Kurznotizen","fileTree27": "Zum Beispiel <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, wenn keine Vorlagenvariable verwendet wird, wird die Kurznotiz am Ende des Dokuments im angegebenen Pfad angehängt","export10": "Beispiel <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, wenn leer, verwenden Sie Wasserzeichentext oder den Pfad zur Wasserzeichen-Datei.",diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.jsonindex e72c98921a..c0daafc7ae 100644--- a/app/appearance/langs/en.json+++ b/app/appearance/langs/en.json@@ -1995,8 +1995,8 @@"fileTree21": "When enabled, the single-line JSON format will be used when saving .sy docs and database .json files, which can reduce the file size by about 30% and improve read and write efficiency by 50%","fileTree22": "Large File Warning","fileTree23": "Notify when .sy files or database .json exceed this size",- "fileTree24": "Place new subdocuments at the top",- "fileTree25": "When enabled, newly created subdocuments will be placed at the top of the subdocument list (only takes effect when custom sorting is enabled)",+ "fileTree24": "Place new notebooks and documents at the top",+ "fileTree25": "When enabled, newly created notebooks and documents, and the user guide when opened, will be placed at the top of their lists (only takes effect when custom sorting is enabled)","fileTree26": "Default shorthand save path","fileTree27": "For example, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, if no template variable is used the shorthand will be appended to the end of the document at the specified path","export10": "For example <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, if empty, use watermark text or watermark file path.",diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.jsonindex 5320d3b23e..9e7ad07fa6 100644--- a/app/appearance/langs/es.json+++ b/app/appearance/langs/es.json@@ -1995,8 +1995,8 @@"fileTree21": "Después de habilitarlo, se utilizará el formato JSON de una sola línea al guardar documentos .sy y archivos .json de bases de datos, lo que puede reducir el tamaño del archivo en aproximadamente un 30 % y mejorar la eficiencia de lectura y escritura en un 50 %.","fileTree22": "Aviso de archivo grande","fileTree23": "Notificar cuando los archivos .sy o la base de datos .json superen este tamaño",- "fileTree24": "Colocar nuevos subdocumentos en la parte superior",- "fileTree25": "Al habilitar, los subdocumentos nuevos se colocarán en la parte superior de la lista de subdocumentos (solo surte efecto cuando el orden personalizado esté habilitado)",+ "fileTree24": "Colocar los nuevos cuadernos de notas y documentos en la parte superior",+ "fileTree25": "Al habilitar, los cuadernos de notas y documentos nuevos, así como la guía del usuario al abrirla, se colocarán en la parte superior de sus listas (solo surte efecto cuando el orden personalizado esté habilitado)","fileTree26": "Ruta de guardado predeterminada para notas rápidas","fileTree27": "Por ejemplo, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, si no se usa una variable de plantilla, la nota rápida se añadirá al final del documento en la ruta especificada","export10": "Por ejemplo <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, si está vacío, utilice texto de marca de agua o ruta del archivo de marca de agua.",diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.jsonindex 7cb3e6b2fc..9736b0c599 100644--- a/app/appearance/langs/fr.json+++ b/app/appearance/langs/fr.json@@ -1995,8 +1995,8 @@"fileTree21": "Après activation, le format JSON sur une seule ligne sera utilisé lors de l'enregistrement des documents .sy et des fichiers .json de base de données, ce qui peut réduire la taille du fichier d'environ 30 % et améliorer l'efficacité de lecture et d'écriture de 50 %","fileTree22": "Alerte de fichier volumineux","fileTree23": "Notifier lorsque les fichiers .sy ou la base de données .json dépassent cette taille",- "fileTree24": "Placer les sous-documents nouvellement créés en haut",- "fileTree25": "Si activé, les nouveaux sous-documents seront placés en haut de la liste des sous-documents (ne prend effet que lorsque le tri personnalisé est activé)",+ "fileTree24": "Placer les nouveaux carnets de notes et documents en haut",+ "fileTree25": "Si activé, les nouveaux carnets de notes et documents ainsi que le guide utilisateur à son ouverture seront placés en haut de leurs listes (ne prend effet que lorsque le tri personnalisé est activé)","fileTree26": "Chemin d'enregistrement par défaut pour les notes rapides","fileTree27": "Par exemple, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, si aucune variable de modèle n'est utilisée, la note rapide sera ajoutée à la fin du document dans le chemin spécifié","export10": "Par exemple <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, s'il est vide, utilisez le texte du filigrane ou le chemin du fichier du filigrane.",diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.jsonindex 82b686e918..5753c2180d 100644--- a/app/appearance/langs/he.json+++ b/app/appearance/langs/he.json@@ -1995,8 +1995,8 @@"fileTree21": "לאחר הפעלת אפשרות זו, פורמט ה-JSON בשורה אחת ישמש בעת שמירת קבצי .sy ומסדי נתונים .json, מה שיכול להפחית את גודל הקובץ בכ-30% ולשפר את יעילות הקריאה והכתיבה ב-50%","fileTree22": "התראה על קובץ גדול","fileTree23": "הצג התראה כאשר קובץ .sy או מסד נתונים .json חורג מגודל זה",- "fileTree24": "מקם מסמך משנה חדש בחלק העליון",- "fileTree25": "כאשר מופעל, מסמכי המשנה החדשים יופיעו בראש רשימת מסמכי המשנה (פועל רק כאשר מיון מותאם אישית מופעל)",+ "fileTree24": "הצב מחברות ומסמכים חדשים בראש הרשימה",+ "fileTree25": "כאשר האפשרות מופעלת, מחברות ומסמכים חדשים וכן מדריך המשתמש בעת פתיחתו יוצבו בראש הרשימות שלהם (פועל רק כאשר מיון מותאם אישית מופעל)","fileTree26": "נתיב שמירה ברירת מחדל לרשומות מהירות","fileTree27": "לדוגמה, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, אם לא נעשה שימוש במשתנה תבנית, הרשומה המהירה תתווסף לסוף המסמך בנתיב שצוין","export10": "למשל <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, אם ריק, השתמש בטקסט סימן מים או בנתיב קובץ סימן מים.",diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.jsonindex 33bb18eacc..3dd6e5093d 100644--- a/app/appearance/langs/hi.json+++ b/app/appearance/langs/hi.json@@ -1995,8 +1995,8 @@"fileTree21": "सक्षम होने पर, .sy दस्तावेज़ और डेटाबेस .json फ़ाइलें सहेजते समय एकल-पंक्ति JSON प्रारूप का उपयोग किया जाएगा, जो फ़ाइल आकार को लगभग 30% कम कर सकता है और पढ़ने और लिखने की दक्षता में 50% सुधार कर सकता है","fileTree22": "बड़ी फ़ाइल चेतावनी","fileTree23": ".sy फ़ाइलें या डेटाबेस .json इस आकार से अधिक होने पर सूचित करें",- "fileTree24": "नए उप-दस्तावेज़ शीर्ष पर रखें",- "fileTree25": "सक्षम होने पर, नए बनाए गए उप-दस्तावेज़ उप-दस्तावेज़ सूची के शीर्ष पर रखे जाएंगे (केवल तभी प्रभावी जब कस्टम क्रमबद्धता सक्षम हो)",+ "fileTree24": "नई नोटबुक और दस्तावेज़ शीर्ष पर रखें",+ "fileTree25": "सक्षम होने पर, नई नोटबुक और दस्तावेज़ तथा उपयोगकर्ता मार्गदर्शिका खोले जाने पर अपनी-अपनी सूचियों के शीर्ष पर रखे जाएंगे (केवल तभी प्रभावी जब कस्टम क्रमबद्धता सक्षम हो)","fileTree26": "त्वरित नोट्स के लिए डिफ़ॉल्ट सहेजें पथ","fileTree27": "उदाहरण के लिए, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, यदि कोई टेम्पलेट चर का उपयोग नहीं किया जाता है, तो त्वरित नोट निर्दिष्ट पथ पर दस्तावेज़ के अंत में जोड़ा जाएगा","export10": "उदाहरण के लिए <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, यदि खाली है, तो वॉटरमार्क पाठ या वॉटरमार्क फ़ाइल पथ का उपयोग करें।",diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.jsonindex d06dceed2e..b49d166b38 100644--- a/app/appearance/langs/id.json+++ b/app/appearance/langs/id.json@@ -1995,8 +1995,8 @@"fileTree21": "Saat diaktifkan, format JSON satu baris akan digunakan saat menyimpan dokumen .sy dan file database .json, yang dapat mengurangi ukuran file sekitar 30% dan meningkatkan efisiensi baca dan tulis sebesar 50%","fileTree22": "Peringatan File Besar","fileTree23": "Beritahu ketika file .sy atau database .json melebihi ukuran ini",- "fileTree24": "Tempatkan sub-dokumen baru di bagian atas",- "fileTree25": "Saat diaktifkan, sub-dokumen yang baru dibuat akan ditempatkan di atas daftar sub-dokumen (hanya berlaku saat penyortiran kustom diaktifkan)",+ "fileTree24": "Tempatkan buku catatan dan dokumen baru di bagian atas",+ "fileTree25": "Saat diaktifkan, buku catatan dan dokumen baru serta panduan pengguna ketika dibuka akan ditempatkan di bagian atas daftar masing-masing (hanya berlaku saat penyortiran kustom diaktifkan)","fileTree26": "Lokasi penyimpanan default untuk catatan cepat","fileTree27": "Misalnya, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, jika tidak ada variabel template yang digunakan, catatan cepat akan ditambahkan ke akhir dokumen di jalur yang ditentukan","export10": "Misalnya <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, jika kosong, gunakan teks watermark atau jalur file watermark.",diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.jsonindex 2a4d60eb88..6477af8b04 100644--- a/app/appearance/langs/it.json+++ b/app/appearance/langs/it.json@@ -1995,8 +1995,8 @@"fileTree21": "Dopo l'abilitazione, il formato JSON a riga singola verrà utilizzato quando si salvano documenti .sy e file di database .json, il che può ridurre le dimensioni del file del 30% circa e migliorare l'efficienza di lettura e scrittura del 50%","fileTree22": "Avviso file di grandi dimensioni","fileTree23": "Notifica quando i file .sy e il database .json superano questa dimensione",- "fileTree24": "Posiziona il nuovo sottodocumento in cima",- "fileTree25": "Se abilitato, i nuovi sottodocumenti verranno posizionati in cima all'elenco dei sottodocumenti (funziona solo quando l'ordinamento personalizzato è abilitato)",+ "fileTree24": "Posiziona i nuovi taccuini e documenti in cima",+ "fileTree25": "Se abilitato, i nuovi taccuini e documenti e la guida utente quando viene aperta saranno posizionati in cima ai rispettivi elenchi (funziona solo quando l'ordinamento personalizzato è abilitato)","fileTree26": "Percorso di salvataggio predefinito per le note rapide","fileTree27": "Ad esempio, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, se non viene utilizzata alcuna variabile di modello, la nota rapida verrà aggiunta alla fine del documento nel percorso specificato","export10": "Ad esempio <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, se vuoto, utilizza il testo della filigrana o il percorso del file della filigrana.",diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.jsonindex 01b1ee9d8e..91fe6c5394 100644--- a/app/appearance/langs/ja.json+++ b/app/appearance/langs/ja.json@@ -1995,8 +1995,8 @@"fileTree21": "ドキュメントとデータベースファイルを保存する際に改行を行わない JSON フォーマットを使用します。これによりファイルサイズが約 30% 削減され、読み書きの効率が 50% 向上します","fileTree22": "大きなファイルの警告","fileTree23": ".sy ドキュメントやデータベース .json がこのサイズを超えると通知します",- "fileTree24": "新しい子ドキュメントを先頭に配置",- "fileTree25": "有効にすると、新しく作成された子ドキュメントは子ドキュメント一覧の先頭に配置されます(カスタム並び替えが有効な場合のみ動作します)",+ "fileTree24": "新しいノートブックとドキュメントを先頭に配置",+ "fileTree25": "有効にすると、新しく作成されたノートブックとドキュメント、および開いたユーザーガイドがそれぞれの一覧の先頭に配置されます(カスタム並び替えが有効な場合のみ動作します)","fileTree26": "クイックメモのデフォルト保存場所","fileTree27": "例: <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>、テンプレート変数を使用しない場合、クイックメモは指定されたパスのドキュメントの末尾に追加されます","export10": "例: <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code><br>空の場合は透かしテキストまたは透かし画像ファイルのパスを使用します",diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.jsonindex 17a926e56a..e416b64123 100644--- a/app/appearance/langs/ko.json+++ b/app/appearance/langs/ko.json@@ -1995,8 +1995,8 @@"fileTree21": "활성화하면 .sy 문서 및 데이터베이스 .json을 저장할 때 한 줄 JSON 형식이 사용되어 파일 크기를 약 30% 줄이고 읽기 및 쓰기 효율성을 50% 향상시킬 수 있습니다","fileTree22": "대용량 파일 경고","fileTree23": ".sy 파일 또는 데이터베이스 .json이 이 크기를 초과할 때 알림",- "fileTree24": "새 하위 문서를 맨 위에 배치",- "fileTree25": "활성화하면 새로 생성된 하위 문서가 하위 문서 목록의 맨 위에 배치됩니다(사용자 지정 정렬이 활성화된 경우에만 적용됨)",+ "fileTree24": "새 노트북과 문서를 맨 위에 배치",+ "fileTree25": "활성화하면 새로 생성된 노트북과 문서 및 열린 사용자 가이드가 각각의 목록 맨 위에 배치됩니다(사용자 지정 정렬이 활성화된 경우에만 적용됨)","fileTree26": "빠른 메모의 기본 저장 경로","fileTree27": "예: <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, 템플릿 변수를 사용하지 않으면 빠른 메모가 지정된 경로의 문서 끝에 추가됩니다","export10": "예: <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, 비어 있으면 워터마크 텍스트 또는 워터마크 파일 경로를 사용합니다.",diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.jsonindex 41f40d55c7..5d67ddd770 100644--- a/app/appearance/langs/nl.json+++ b/app/appearance/langs/nl.json@@ -1995,8 +1995,8 @@"fileTree21": "Bij inschakelen wordt enkelregelige JSON gebruikt bij opslaan van .sy-documenten en database-.json. Dit verkleint de bestandsgrootte met ~30% en verbetert lees-/schrijfefficiëntie met 50%","fileTree22": "Waarschuwing groot bestand","fileTree23": "Melden wanneer .sy-bestanden of database-.json deze grootte overschrijden",- "fileTree24": "Nieuwe subdocumenten bovenaan plaatsen",- "fileTree25": "Indien ingeschakeld worden nieuw aangemaakte subdocumenten bovenaan de subdocumentenlijst geplaatst (werkt alleen wanneer aangepaste sortering is ingeschakeld)",+ "fileTree24": "Nieuwe notitieboeken en documenten bovenaan plaatsen",+ "fileTree25": "Indien ingeschakeld worden nieuwe notitieboeken en documenten en de gebruikersgids bij het openen bovenaan hun lijsten geplaatst (werkt alleen wanneer aangepaste sortering is ingeschakeld)","fileTree26": "Standaard opslaglocatie voor snelle notities","fileTree27": "Bv. <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, als er geen sjabloonvariabele wordt gebruikt, wordt de snelle notitie toegevoegd aan het einde van het document op het opgegeven pad","export10": "Bijv. <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, indien leeg wordt watermerktekst of watermerkbestandspad gebruikt.",diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.jsonindex bd64f62e82..9e1e470c21 100644--- a/app/appearance/langs/pl.json+++ b/app/appearance/langs/pl.json@@ -1995,8 +1995,8 @@"fileTree21": "Po włączeniu, format JSON w pojedynczej linii będzie używany przy zapisywaniu .sy dokumentów i plików .json bazy danych, co może zmniejszyć rozmiar pliku o około 30% i poprawić wydajność odczytu i zapisu o 50%","fileTree22": "Powiadomienie o dużym pliku","fileTree23": "Powiadom, gdy plik .sy lub baza danych .json przekroczy ten rozmiar",- "fileTree24": "Umieść nowy poddokument na górze",- "fileTree25": "Po włączeniu nowe poddokumenty będą umieszczane na początku listy poddokumentów (działa tylko, gdy włączone jest niestandardowe sortowanie)",+ "fileTree24": "Umieszczaj nowe notesy i dokumenty na górze",+ "fileTree25": "Po włączeniu nowe notesy i dokumenty oraz podręcznik użytkownika po otwarciu będą umieszczane na początku odpowiednich list (działa tylko, gdy włączone jest niestandardowe sortowanie)","fileTree26": "Domyślna ścieżka zapisu dla szybkich notatek","fileTree27": "Na przykład, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, jeśli nie użyto zmiennej szablonu, szybka notatka zostanie dodana na końcu dokumentu w określonej ścieżce","export10": "Na przykład <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, jeśli jest puste, użyj tekstu znaków wodnych lub ścieżki pliku znaku wodnego.",diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.jsonindex 06f95af6f2..37f3d640c3 100644--- a/app/appearance/langs/pt-BR.json+++ b/app/appearance/langs/pt-BR.json@@ -1995,8 +1995,8 @@"fileTree21": "Quando ativado, o formato JSON de linha única será usado ao salvar documentos .sy e arquivos .json de banco de dados, o que pode reduzir o tamanho do arquivo em cerca de 30% e melhorar a eficiência de leitura/gravação em 50%","fileTree22": "Aviso de arquivo grande","fileTree23": "Notificar quando arquivos .sy e banco de dados .json excederem este tamanho",- "fileTree24": "Colocar novo subdocumento no topo",- "fileTree25": "Ao ativar, os novos subdocumentos serão colocados no topo da lista de subdocumentos (somente tem efeito quando a ordenação personalizada estiver ativada)",+ "fileTree24": "Colocar novos blocos de notas e documentos no topo",+ "fileTree25": "Ao ativar, novos blocos de notas e documentos e o guia do usuário ao ser aberto serão colocados no topo de suas respectivas listas (somente tem efeito quando a ordenação personalizada estiver ativada)","fileTree26": "Caminho de salvamento padrão para notas rápidas","fileTree27": "Por exemplo, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, se nenhuma variável de modelo for usada, a nota rápida será anexada ao final do documento no caminho especificado","export10": "Por exemplo <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, se vazio, use texto de marca d'água ou caminho do arquivo de marca d'água.",diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.jsonindex 06bb9ccc68..18b02ea124 100644--- a/app/appearance/langs/ru.json+++ b/app/appearance/langs/ru.json@@ -1995,8 +1995,8 @@"fileTree21": "После включения однострочный формат JSON будет использоваться при сохранении .sy документов и файлов баз данных .json, что может снизить размер файла примерно на 30% и улучшить эффективность чтения и записи на 50%","fileTree22": "Уведомление о большом файле","fileTree23": "Появится уведомление, если размер файла .sy или базы данных .json превышает этот предел",- "fileTree24": "Размещать новые дочерние документы вверху",- "fileTree25": "Если включено, новые дочерние документы будут помещаться в начале списка дочерних документов (действует только при включённой пользовательской сортировке)",+ "fileTree24": "Размещать новые блокноты и документы вверху",+ "fileTree25": "Если включено, новые блокноты и документы, а также руководство пользователя при открытии будут помещаться в начало соответствующих списков (действует только при включённой пользовательской сортировке)","fileTree26": "Путь сохранения по умолчанию для быстрых заметок","fileTree27": "Например, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, если переменная шаблона не используется, быстрая заметка будет добавлена в конец документа по указанному пути","export10": "Например <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, если пусто, использовать текст водяного знака или путь к файлу водяного знака.",diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.jsonindex a2c051e79a..8037df6918 100644--- a/app/appearance/langs/sk.json+++ b/app/appearance/langs/sk.json@@ -1995,8 +1995,8 @@"fileTree21": "JSON formát v jednom riadku (.sy súbory) šetrí miesto a čas","fileTree22": "Varovanie pri veľkom súbore","fileTree23": "Upozorniť, ak .sy alebo .json prekročí túto veľkosť",- "fileTree24": "Nové dokumenty navrch",- "fileTree25": "Nové poddokumenty sa zobrazia na začiatku zoznamu",+ "fileTree24": "Nové zápisníky a dokumenty navrch",+ "fileTree25": "Po zapnutí sa nové zápisníky a dokumenty aj príručka pri otvorení umiestnia na začiatok príslušných zoznamov (platí len pri vlastnom zoradení)","fileTree26": "Predvolené umiestnenie pre rýchle poznámky","fileTree27": "Napr. <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, ak sa nepoužije premenná šablóny, rýchla poznámka sa pridá na koniec dokumentu na zadanej ceste","export10": "Napríklad <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>, ak je prázdne, použije sa text vodoznaku alebo cesta k súboru vodoznaku.",diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.jsonindex 3d06d46b58..1ef3127784 100644--- a/app/appearance/langs/th.json+++ b/app/appearance/langs/th.json@@ -1995,8 +1995,8 @@"fileTree21": "เมื่อเปิดใช้งานจะใช้รูปแบบ JSON แบบบรรทัดเดียวเมื่อบันทึกไฟล์ .sy และ .json ของฐานข้อมูล ซึ่งสามารถลดขนาดไฟล์ได้ประมาณ 30% และเพิ่มประสิทธิภาพการอ่านเขียนได้ 50%","fileTree22": "คำเตือนไฟล์ขนาดใหญ่","fileTree23": "แจ้งเตือนเมื่อไฟล์ .sy หรือ .json ของฐานข้อมูลเกินขนาดนี้",- "fileTree24": "วางใหม่บน",- "fileTree25": "เมื่อเปิดใช้งาน เอกสารย่อยที่สร้างใหม่จะถูกวางไว้ด้านบนสุดของรายการ (มีผลเฉพาะเมื่อเปิดใช้งานการเรียงลำดับแบบกำหนดเอง)",+ "fileTree24": "วางสมุดบันทึกและเอกสารใหม่ไว้ด้านบน",+ "fileTree25": "เมื่อเปิดใช้งาน สมุดบันทึกและเอกสารใหม่ รวมถึงคู่มือเมื่อเปิด จะถูกวางไว้ด้านบนสุดของรายการที่เกี่ยวข้อง (มีผลเฉพาะเมื่อเปิดใช้งานการเรียงลำดับแบบกำหนดเอง)","fileTree26": "ที่ตั้งบันทึกเริ่มต้นของบันทึกย่อ","fileTree27": "เช่น <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, หากไม่ใช่ตัวแปรแม่แบบ บันทึกย่อจะถูกเพิ่มที่ส่วนท้ายของเอกสารในเส้นทางที่ระบุ","export10": "เช่น <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code> หากเว้นว่างจะใช้ข้อความลายน้ำหรือเส้นทางไฟล์ลายน้ำ",diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.jsonindex d844b5f8a6..deb2374995 100644--- a/app/appearance/langs/tr.json+++ b/app/appearance/langs/tr.json@@ -1995,8 +1995,8 @@"fileTree21": "Etkinleştirildiğinde .sy ve .json dosyaları tek satır JSON biçiminde kaydedilir, bu dosya boyutunu yaklaşık %30 azaltır ve %50 daha verimli okuma/yazma sağlar","fileTree22": "Büyük dosya uyarısı","fileTree23": ".sy veya .json dosyaları bu boyutu aşarsa uyar",- "fileTree24": "Yeni alt belgeleri en üste yerleştir",- "fileTree25": "Etkinleştirildiğinde yeni alt belgeler listenin en üstüne eklenir (sadece özel sıralama etkinse geçerli)",+ "fileTree24": "Yeni not defterlerini ve belgeleri en üste yerleştir",+ "fileTree25": "Etkinleştirildiğinde yeni not defterleri ve belgeler ile açılan kullanım kılavuzu ilgili listelerin en üstüne yerleştirilir (sadece özel sıralama etkinse geçerli)","fileTree26": "Hızlı notlar için varsayılan kayıt yolu","fileTree27": "Örneğin, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, eğer şablon değişkeni kullanılmazsa, hızlı not belirtilen yoldaki belgenin sonuna eklenecektir","export10": "Örnek: <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>. Boşsa filigran metni veya dosya yolu kullanılır",diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.jsonindex 8c78d8795f..c4dfe3ec5b 100644--- a/app/appearance/langs/uk.json+++ b/app/appearance/langs/uk.json@@ -1995,8 +1995,8 @@"fileTree21": "Якщо увімкнено, при збереженні .sy документів і .json файлів баз даних використовуватиметься однорядковий JSON, що може зменшити розмір файлу приблизно на 30% і підвищити ефективність читання/запису на 50%","fileTree22": "Попередження про великі файли","fileTree23": "Сповіщати, коли .sy файли або .json файли баз даних перевищують цей розмір",- "fileTree24": "Розміщувати нові піддокументи зверху",- "fileTree25": "Якщо увімкнено, новостворені піддокументи буде розміщено на початку списку піддокументів (працює лише при користувацькому сортуванні)",+ "fileTree24": "Розміщувати нові блокноти й документи зверху",+ "fileTree25": "Якщо увімкнено, нові блокноти й документи, а також посібник користувача під час відкриття буде розміщено на початку відповідних списків (працює лише при користувацькому сортуванні)","fileTree26": "Типовий шлях збереження для швидких нотаток","fileTree27": "Наприклад, <code class=\"fn__code\">/shorthands/{{now | date \"20060102150405\"}}</code>, якщо змінна шаблону не використовується, швидка нотатка буде додана в кінець документа за вказаним шляхом","export10": "Наприклад <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code>; якщо порожньо, використовується текст водяного знака або шлях до файла водяного знака.",diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.jsonindex f5e36d378f..a47789c4ff 100644--- a/app/appearance/langs/zh-CN.json+++ b/app/appearance/langs/zh-CN.json@@ -1995,8 +1995,8 @@"fileTree21": "启用后保存 .sy 文档和数据库 .json 时将使用单行 JSON 格式,大约能减少 30% 文件大小并提升 50% 读写效率","fileTree22": "超大文件提醒","fileTree23": ".sy 文档和数据库 .json 超过该大小时弹出通知提醒",- "fileTree24": "新建子文档放置在顶部",- "fileTree25": "启用后新建的子文档将放置在子文档列表的顶部(仅在自定义排序启用时生效)",+ "fileTree24": "新建笔记本和文档放置在顶部",+ "fileTree25": "启用后新建的笔记本和文档以及打开的用户指南将放置在对应列表的顶部(仅在自定义排序启用时生效)","fileTree26": "新建闪念速记的默认存放路径","fileTree27": "例如 <code class='fn__code'>/闪念速记/{{now | date \"20060102150405\"}}</code>,不使用模板变量时闪念速记将添加到该路径指定文档内容的末尾","export10": "例如 <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code> ,为空时使用水印文本或水印文件路径。",diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.jsonindex cca3911e92..f0b92b1929 100644--- a/app/appearance/langs/zh-TW.json+++ b/app/appearance/langs/zh-TW.json@@ -1995,8 +1995,8 @@"fileTree21": "啟用後儲存 .sy 檔案和資料庫 .json 時將使用單行 JSON 格式,大約能減少 30% 檔案大小並提升 50% 讀寫效率","fileTree22": "超大檔案提醒","fileTree23": ".sy 檔案和資料庫 .json 超過該大小時彈出通知提醒",- "fileTree24": "新建子文件放置在頂部",- "fileTree25": "啟用後新建的子文件將放置在子文件列表的頂部(僅在自訂排序啟用時生效)",+ "fileTree24": "新建筆記本和文件放置在頂部",+ "fileTree25": "啟用後新建的筆記本和文件以及開啟的用戶指南將放置在對應列表的頂部(僅在自訂排序啟用時生效)","fileTree26": "新建閃念速記的默認存放路徑","fileTree27": "例如 <code class=\"fn__code\">/閃念速記/{{now | date \"20060102150405\"}}</code>,不使用模板變量時閃念速記將添加到該路徑指定文件內容的末尾","export10": "例如 <code class='fn__code'><span style=\"color: #fff;background-color: black;padding: 4px;border-radius: 5px;float:right;\">SiYuan</span></code> ,為空時使用水印文字或浮水印檔案路徑。",diff --git a/kernel/model/mount.go b/kernel/model/mount.goindex dba3aff7d8..fea0e05049 100644--- a/kernel/model/mount.go+++ b/kernel/model/mount.go@@ -77,6 +77,7 @@ func createBox(name string, initializeBoxDoc bool) (id string, err error) {for i, b := range boxes {c := b.GetConf()c.Sort = i + 1+ b.Sort = c.Sortif err := b.SaveConf(c); err != nil {logging.LogErrorf("save box conf [%s] failed: %s", b.ID, err)}@@ -92,6 +93,7 @@ func createBox(name string, initializeBoxDoc bool) (id string, err error) {box := &Box{ID: id, Name: name}boxConf := box.GetConf()boxConf.Name = name+ boxConf.Sort = newBoxSort(boxes, nil != Conf.FileTree.CreateDocAtTop && *Conf.FileTree.CreateDocAtTop)if err := box.SaveConf(boxConf); err != nil {logging.LogErrorf("save box conf [%s] failed: %s", id, err)}@@ -110,6 +112,26 @@ func createBox(name string, initializeBoxDoc bool) (id string, err error) {return}+func newBoxSort(boxes []*Box, atTop bool) int {+ if 1 > len(boxes) {+ return 0+ }++ minSort, maxSort := boxes[0].Sort, boxes[0].Sort+ for _, box := range boxes[1:] {+ if box.Sort < minSort {+ minSort = box.Sort+ }+ if maxSort < box.Sort {+ maxSort = box.Sort+ }+ }+ if atTop {+ return minSort - 1+ }+ return maxSort + 1+}+func RenameBox(boxID, name string) (err error) {box := Conf.Box(boxID)if nil == box {@@ -407,10 +429,7 @@ func mountBox(boxID string) (alreadyMount bool, err error) {}boxes, _ := ListNotebooks()- var sort int- if len(boxes) > 0 {- sort = boxes[0].Sort - 1- }+ sort := newBoxSort(boxes, nil != Conf.FileTree.CreateDocAtTop && *Conf.FileTree.CreateDocAtTop)p := filepath.Join(util.WorkingDir, "guide", boxID)if err = filelock.Copy(p, localPath); err != nil {diff --git a/kernel/model/mount_test.go b/kernel/model/mount_test.gonew file mode 100644index 0000000000..c7fa496401--- /dev/null+++ b/kernel/model/mount_test.go@@ -0,0 +1,42 @@+// SiYuan - From thought to insight, with agents+// Copyright (c) 2020-present, b3log.org+//+// This program is free software: you can redistribute it and/or modify+// it under the terms of the GNU Affero General Public License as published by+// the Free Software Foundation, either version 3 of the License, or+// (at your option) any later version.+//+// This program is distributed in the hope that it will be useful,+// but WITHOUT ANY WARRANTY; without even the implied warranty of+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+// GNU Affero General Public License for more details.+//+// You should have received a copy of the GNU Affero General Public License+// along with this program. If not, see <https://www.gnu.org/licenses/>.++package model++import "testing"++func TestNewBoxSort(t *testing.T) {+ tests := []struct {+ name string+ boxes []*Box+ atTop bool+ expect int+ }{+ {name: "empty", expect: 0},+ {name: "prepend", boxes: []*Box{{Sort: 20}, {Sort: -5}, {Sort: 8}}, atTop: true, expect: -6},+ {name: "append", boxes: []*Box{{Sort: 20}, {Sort: -5}, {Sort: 8}}, expect: 21},+ {name: "duplicate prepend", boxes: []*Box{{Sort: 3}, {Sort: 3}}, atTop: true, expect: 2},+ {name: "duplicate append", boxes: []*Box{{Sort: 3}, {Sort: 3}}, expect: 4},+ }++ for _, test := range tests {+ t.Run(test.name, func(t *testing.T) {+ if actual := newBoxSort(test.boxes, test.atTop); test.expect != actual {+ t.Fatalf("sort = %d, want %d", actual, test.expect)+ }+ })+ }+}