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

This commit is contained in:
Vanessa 2026-01-17 18:06:22 +08:00
commit c08aec57fb
25 changed files with 228 additions and 131 deletions

View file

@ -1285,7 +1285,7 @@
"about": "حول",
"about1": "‫حقوق الطبع والنشر (c) 2020 الحاضر • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>سياسة الخصوصية</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>اتفاقية المستخدم</a>",
"about2": "الاستخدام على المتصفح",
"about3": "يرجى استخدام متصفح Chrome والبقاء على نفس الشبكة مع الكمبيوتر، المنفذ هو <code class='fn__code'>${port}</code> (بالإضافة إلى المنفذ العشوائي، سيقوم مساحة العمل الأولى التي تم تشغيلها تلقائيًا بالاستماع إلى <code class='fn__code'>6806</code> كمنفذ ثابت، بحيث يكون من السهل على امتدادات المتصفح أو البرامج الخارجية الأخرى استدعاء واجهة النواة)، والعناوين التي يمكن الاتصال بها هي كما يلي: ",
"about3": "يرجى استخدام متصفح Chrome والبقاء على نفس الشبكة مع الحاسوب، المنفذ <code class='fn__code'>${port}</code> (مساحة العمل التي تم تشغيلها أولاً، بالإضافة إلى المنفذ العشوائي، ستستمع تلقائيًا أيضًا إلى <code class='fn__code'>6806</code> كمنفذ ثابت، لتسهيل امتداد القص في المتصفح أو برامج خارجية أخرى لاستدعاء واجهة النواة)، عناوين الشبكة المحتملة للمنفذ العشوائي:",
"about4": "فتح المتصفح",
"about5": "رمز الإذن بالوصول",
"about6": "بعد التكوين, سيتم استخدامه ككلمة مرور مصادقة الوصول, اتركه فارغًا لإغلاق المصادقة",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">هناك قيود على واجهة Nutstore</a>، يرجى استخدام خدمات WebDAV الأخرى‬",
"195": "وقت النظام غير صحيح، يرجى معايرة وقت النظام والمحاولة مرة أخرى",
"196": "‫لا تقم بتعيين مساحة العمل تحت مسار قرص مزامنة من طرف ثالث، وإلا فإن البيانات سوف تتلف (iCloud/OneDrive/ropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun، إلخ)",
"197": "",
"197": "يرجى فتح المفكرة [%s] ثم المحاولة مرة أخرى",
"198": "هذا ليس أرشيف بيانات صالح. إذا تم تصدير الأرشيف من [شجرة المستندات]، الرجاء استيراده من [شجرة المستندات]",
"199": "‫هذا ليس أرشيف .sy.zip الصالح. إذا تم تصدير الأرشيف من [الإعدادات]، الرجاء استيراده من [الإعدادات]",
"200": "وقت استجابة البحث العالمي بطيء ، يوصى بإضافة فلتر النوع أو الكلمات الرئيسية لتضييق نطاق البحث",

View file

@ -1285,7 +1285,7 @@
"about": "Über",
"about1": "Urheberrecht (c) 2020-heute • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Datenschutzrichtlinie</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Nutzervereinbarung</a>",
"about2": "Verwendung im Browser",
"about3": "Bitte verwenden Sie den Chrome-Browser und halten Sie ihn im selben Netzwerk wie den Computer, Port <code class='fn__code'>${port}</code> (Neben dem zufälligen Port wird das zuerst gestartete Arbeitsbereichsdokument außerdem automatisch <code class='fn__code'>6806</code> als festen Port abhören, um zu ermöglichen, dass der Browser Erweiterungen oder andere externe Programme auf die Kernel-Schnittstelle aufruft), die möglicherweise verbundenen Adressen sind wie folgt:",
"about3": "Bitte verwenden Sie den Chrome-Browser und bleiben Sie im selben Netzwerk wie der Computer, Port <code class='fn__code'>${port}</code> (der zuerst gestartete Arbeitsbereich wird neben dem zufälligen Port auch automatisch auf <code class='fn__code'>6806</code> als festen Port lauschen, um der Browser-Clipper-Erweiterung oder anderen externen Programmen das Aufrufen der Kernel-Schnittstelle zu erleichtern), mögliche erreichbare Netzwerkadressen zufälliger Ports:",
"about4": "Browser öffnen",
"about5": "Zugriffsautorisierungscode",
"about6": "Nach der Konfiguration wird es als Zugangsauthentifizierungspasswort verwendet, lassen Sie es leer, um die Authentifizierung zu schließen",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Es gibt Einschränkungen auf der Nutstore-Schnittstelle</a>, bitte verwenden Sie andere WebDAV-Dienste",
"195": "Die Systemzeit ist falsch, bitte kalibrieren Sie die Systemzeit und versuchen Sie es erneut",
"196": "Setzen Sie das Arbeitsbereich nicht unter dem Pfad eines Drittanbieter-Synchronisationslaufwerks, da sonst die Daten beschädigt werden (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun usw.)",
"197": "",
"197": "Bitte öffnen Sie das Notizbuch [%s] und versuchen Sie es erneut",
"198": "Dies ist kein gültiges Datenarchiv. Wenn das Archiv aus [Dokumentenbaum] exportiert wurde, importieren Sie es bitte aus [Dokumentenbaum]",
"199": "Dies ist kein gültiges .sy.zip Archiv. Wenn das Archiv aus [Einstellungen] exportiert wurde, importieren Sie es bitte aus [Einstellungen]",
"200": "Die Reaktionszeit der globalen Suche ist langsam, es wird empfohlen, Typfilter oder Schlüsselwörter hinzuzufügen, um den Suchbereich einzugrenzen",

View file

@ -1285,7 +1285,7 @@
"about": "About",
"about1": "Copyright (c) 2020-present • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Privacy Policy</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>User Agreement</a>",
"about2": "Use on browser",
"about3": "Please use the Chrome browser and keep it in the same network as the computer, port <code class='fn__code'>${port}</code>(In addition to the random port, the first started workspace will also automatically listen to <code class='fn__code'>6806</code> as a fixed port, so that it is convenient for the browser to clip extensions or other external programs to call the kernel interface), the addresses that may be connected are as follows: ",
"about3": "Please use the Chrome browser and stay on the same network as the computer, port <code class='fn__code'>${port}</code> (the first started workspace, in addition to the random port, will also automatically listen on <code class='fn__code'>6806</code> as a fixed port to facilitate the browser clipping extension or other external programs calling the kernel interface), possible reachable random port network addresses:",
"about4": "Open browser",
"about5": "Access authorization code",
"about6": "After configuration, it will be used as the access authentication password, leave it blank to close the authentication",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">There are restrictions on the Nutstore interface</a>, please use other WebDAV services",
"195": "The system time is incorrect, please calibrate the system time and try again",
"196": "Do not set the workspace under the path of a third-party sync disk, otherwise the data will be damaged (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)",
"197": "",
"197": "Please open notebook [%s] and try again",
"198": "This is not a valid Data archive. If the archive was exported from [Doc tree], please import it from [Doc tree]",
"199": "This is not a valid .sy.zip archive. If the archive was exported from [Settings], please import it from [Settings]",
"200": "Global search response time is slow, it is recommended to add type filtering or keywords to narrow the search scope",

View file

@ -1285,7 +1285,7 @@
"about": "Acerca de",
"about1": "Copyright (c) 2020-presente • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Política de privacidad</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Acuerdo de usuario</a>",
"about2": "Uso en el navegador",
"about3": "Por favor, utilice el navegador Chrome y manténgalo en la misma red que el ordenador, puerto <code class='fn__code'>${port}</code>(Además del puerto aleatorio, el primer espacio de trabajo iniciado también escuchará automáticamente <code class='fn__code'>6806</code> como un puerto fijo, por lo que es conveniente que el navegador recorte extensiones u otros programas externos para llamar a la interfaz del kernel), las direcciones que se pueden conectar son las siguientes: ",
"about3": "Utilice el navegador Chrome y manténgase en la misma red que el equipo, puerto <code class='fn__code'>${port}</code> (el primer espacio de trabajo iniciado, además del puerto aleatorio, también escuchará automáticamente el puerto <code class='fn__code'>6806</code> como puerto fijo, para facilitar que la extensión de recortes del navegador u otros programas externos llamen a la interfaz del núcleo), direcciones de red de puertos aleatorios que pueden ser accesibles:",
"about4": "Abrir el navegador",
"about5": "Código de autorización de acceso",
"about6": "Después de la configuración, se utilizará como contraseña de autenticación de acceso, déjelo en blanco para cerrar la autenticación",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Existen restricciones en la interfaz de Nutstore</a>, utilice otros servicios WebDAV",
"195": "La hora del sistema es incorrecta, calibre la hora del sistema y vuelva a intentarlo",
"196": "No configure el espacio de trabajo bajo la ruta de un disco de sincronización de terceros, de lo contrario, los datos se dañarán (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)",
"197": "",
"197": "Por favor, abra el cuaderno [%s] y vuelva a intentarlo",
"198": "Este no es un archivo data.zip válido. Si el archivo se exportó de [Documentos], importalo de [Documentos]",
"199": "Este no es un archivo .sy.zip válido. Si el archivo se exportó desde [Configuración], impórtelo desde [Configuración]",
"200": "El tiempo de respuesta de b\u00fasqueda global es lento, se recomienda agregar filtros de tipo o palabras clave para reducir el alcance de b\u00fasqueda",

View file

@ -1285,7 +1285,7 @@
"about": "À propos de",
"about1": "Copyright (c) 2020-présent • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Politique de confidentialité</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Accord de l'utilisateur</a>",
"about2": "Utiliser sur le navigateur",
"about3": "Veuillez utiliser le navigateur Chrome et le garder sur le même réseau que l'ordinateur, port <code class='fn__code'>${port}</code>(En plus du port aléatoire, le premier espace de travail démarré écoutera également automatiquement <code class='fn__code'>6806</code> en tant que port fixe, de sorte qu'il est pratique pour le navigateur de couper des extensions ou d'autres programmes externes pour appeler l'interface du noyau), les adresses pouvant être connectées sont les suivantes: ",
"about3": "Veuillez utiliser le navigateur Chrome et rester sur le même réseau que l'ordinateur, port <code class='fn__code'>${port}</code> (le premier espace de travail démarré, en plus du port aléatoire, écoutera automatiquement également le port <code class='fn__code'>6806</code> en tant que port fixe, afin de permettre à l'extension de capture du navigateur ou à d'autres programmes externes d'appeler l'interface du noyau), adresses réseau de ports aléatoires pouvant être joignables :",
"about4": "Ouvrir le navigateur",
"about5": "Accès code d'autorisation",
"about6": "Configuré comme mot de passe d'authentification d'accès, laisser vide pour désactiver l'authentification.",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Il existe des restrictions sur l'interface Nutstore</a>, veuillez utiliser d'autres services WebDAV",
"195": "L'heure du système est incorrecte, veuillez calibrer l'heure du système et réessayer",
"196": "Ne définissez pas l'espace de travail sous le chemin d'un disque de synchronisation tiers, sinon les données seront endommagées (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)",
"197": "",
"197": "Veuillez ouvrir le carnet [%s] puis réessayez",
"198": "Ceci n'est pas une archive data.zip valide. Si l'archive a été exportée depuis [Doc tree], veuillez l'importer depuis [Doc tree]",
"199": "Ceci n'est pas une archive .sy.zip valide. Si l'archive a été exportée depuis [Paramètres], veuillez l'importer depuis [Paramètres]",
"200": "Le temps de réponse de la recherche globale est lent, il est recommandé d'ajouter un filtrage de type ou des mots-clés pour restreindre la portée de la recherche",

View file

@ -1285,7 +1285,7 @@
"about": "אודות",
"about1": "זכויות יוצרים (c) 2020-נוכחי • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>מדיניות פרטיות</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>הסכם משתמש</a>",
"about2": "שימוש בדפדפן",
"about3": "אנא השתמש בדפדפן Chrome ושמור עליו באותה הרשת כמו המחשב, פורט <code class='fn__code'>${port}</code>(מלבד הפורט האקראי, החלל העבודה הראשון שפותח גם ישמע אוטומטית על <code class='fn__code'>6806</code> בפורט קבוע, כך זה נוח לדפדפן לתפוס הרחבות או תוכניות חיצוניות אחרות לקרוא לממשק הליבה), הכתובות שיכולות להתחבר הם כדלקמן: ",
"about3": "נא השתמשו בדפדפן Chrome והיו באותה הרשת עם המחשב, פורט <code class='fn__code'>${port}</code> (מרחב העבודה שהושק ראשון, בנוסף לפורט אקראי, גם יאזין אוטומטית ל־<code class='fn__code'>6806</code> כפורט קבוע, כדי לאפשר לתוסף החיתוך של הדפדפן או לתוכניות חיצוניות אחרות לקרוא לממשק הליבה), כתובות רשת של פורטים אקראיים שניתן להתחבר אליהן:",
"about4": "פתח דפדפן",
"about5": "קוד אישור גישה",
"about6": "לאחר ההגדרה, זה ישמש כסיסמת הזדהות, השאר ריק כדי לסגור את האימות",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">יש הגבלות על ממשק Nutstore</a>, אנא השתמש בשירותי WebDAV אחרים",
"195": "שעת המערכת שגויה, אנא כיול את שעת המערכת ונסה שוב",
"196": "אל תקבע את חלל העבודה תחת נתיב דיסק סנכרון צד שלישי, אחרת הנתונים יפגמו (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun וכו')",
"197": "",
"197": "אנא פתח את המחברת [%s] ונסה שוב",
"198": "זה אינו מאגר נתונים תקף. אם המאגר ייצא מ[עץ המסמכים], אנא ייבא אותו מ[עץ המסמכים]",
"199": "זה אינו ארכוב .sy.zip תקף. אם הארכוב ייצא מ[הגדרות], אנא ייבא אותו מ[הגדרות]",
"200": "זמן התגובה של החיפוש הגלובלי איטי, מומלץ להוסיף סינון לפי סוג או מילות מפתח כדי לצמצם את טווח החיפוש",

View file

@ -1285,7 +1285,7 @@
"about": "Informazioni",
"about1": "Copyright (c) 2020-present • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Privacy Policy</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>User Agreement</a>",
"about2": "Usa su browser",
"about3": "Per favore, usa il browser Chrome e assicurati che sia nella stessa rete del computer. Porta <code class='fn__code'>${port}</code> (Oltre alla porta casuale, il primo spazio di lavoro avviato ascolterà automaticamente su <code class='fn__code'>6806</code> come porta fissa, per facilitare l'estensione del browser o altri programmi esterni per chiamare l'interfaccia del kernel). Gli indirizzi a cui potresti connetterti sono i seguenti:",
"about3": "Si prega di utilizzare il browser Chrome e mantenersi sulla stessa rete del computer, porta <code class='fn__code'>${port}</code> (il primo spazio di lavoro avviato, oltre alla porta casuale, ascolterà automaticamente anche la porta <code class='fn__code'>6806</code> come porta fissa, per facilitare l'estensione di clipping del browser o altri programmi esterni a chiamare l'interfaccia del kernel), possibili indirizzi di rete con porte casuali raggiungibili:",
"about4": "Apri browser",
"about5": "Codice di autorizzazione di accesso",
"about6": "Dopo la configurazione, verrà utilizzato come password di autenticazione per l'accesso. Lascia vuoto per chiudere l'autenticazione",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Ci sono restrizioni sull'interfaccia di Nutstore</a>, si prega di utilizzare altri servizi WebDAV",
"195": "L'ora del sistema è errata, si prega di calibrare l'ora del sistema e riprovare",
"196": "Non impostare il workspace sotto il percorso di un disco di sincronizzazione di terze parti, altrimenti i dati verranno danneggiati (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, ecc.)",
"197": "",
"197": "Apri il taccuino [%s] e riprova",
"198": "Questo non è un archivio dati valido. Se l'archivio è stato esportato da [Albero documenti], si prega di importarlo da [Albero documenti]",
"199": "Questo non è un archivio .sy.zip valido. Se l'archivio è stato esportato da [Impostazioni], si prega di importarlo da [Impostazioni]",
"200": "Il tempo di risposta della ricerca globale è lento, si consiglia di aggiungere filtri per tipo o parole chiave per restringere l'ambito della ricerca",

View file

@ -1285,7 +1285,7 @@
"about": "情報",
"about1": "Copyright (c) 2020-present • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>プライバシーポリシー</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>利用規約</a>",
"about2": "ブラウザで使用",
"about3": "Chrome ブラウザを使用してコンピュータと同じネットワークに接続してください。ポートは <code class='fn__code'>${port}</code> です (ランダムなポートに加えて最初に起動したワークスペースは 6806 という固定ポートでも自動的にリッスンが行われ、これによりブラウザが拡張機能や他の外部プログラムからカーネルインターフェースが呼び出されます)。接続可能なアドレスは次の通りです: ",
"about3": "Chrome ブラウザを使用し、PC と同じネットワーク内にいるようにしてください。ポート <code class='fn__code'>${port}</code>(最初に起動したワークスペースはランダムポートに加えて、ブラウザのクリップ拡張やその他の外部プログラムがカーネルのインターフェースを呼び出せるように固定ポートとして <code class='fn__code'>6806</code> も自動的にリッスンします)、接続可能なランダムポートのネットワークアドレス:",
"about4": "ブラウザで開く",
"about5": "アクセス認証コード",
"about6": "設定したコードがアクセス認証パスワードとして使用されます",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Nutstore インターフェースには制限があります。</a>他の WebDAV サービスを使用してください",
"195": "システム時刻が正しくありません。システム時刻を調整してから再試行してください",
"196": "サードパーティの同期ディスクにワークスペースのパスを設定しないでください。設定するとデータが破損します (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun など)",
"197": "",
"197": "ノートブック [%s] を開いてから再試行してください",
"198": "有効なデータアーカイブではありません。アーカイブが [ドキュメントツリー] からエクスポートされた場合は [ドキュメントツリー] からインポートしてください",
"199": "有効な .sy.zip アーカイブではありません。アーカイブが [設定] からエクスポートされた場合は [設定] からインポートしてください",
"200": "グローバル検索の応答時間が長いため、種類でフィルタするかキーワードで検索範囲を絞ることをお勧めします",

View file

@ -1285,7 +1285,7 @@
"about": "정보",
"about1": "Copyright (c) 2020-present • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>개인정보 보호정책</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>사용자 계약</a>",
"about2": "브라우저에서 사용",
"about3": "Chrome 브라우저를 사용하고 컴퓨터와 동일한 네트워크, 포트 <code class='fn__code'>${port}</code>(임의 포트 외에도 첫 번째 시작된 작업 공간은 브라우저가 확장 프로그램이나 기타 외부 프로그램을 클립하여 커널 인터페이스를 호출하기 편리하도록 <code class='fn__code'>6806</code>을 고정 포트로 자동 수신 대기함)를 유지하세요. 연결 가능한 주소는 다음과 같습니다: ",
"about3": "Chrome 브라우저를 사용하고 컴퓨터와 동일한 네트워크에 연결되어 있어야 합니다, 포트 <code class='fn__code'>${port}</code> (첫 번째로 시작된 작업공간은 랜덤 포트 외에 브라우저 클리핑 확장이나 다른 외부 프로그램이 커널 인터페이스를 호출할 수 있도록 고정 포트로 <code class='fn__code'>6806</code>도 자동으로 리슨합니다), 연결 가능할 수 있는 랜덤 포트 네트워크 주소:",
"about4": "브라우저 열기",
"about5": "액세스 인증 코드",
"about6": "구성 후 액세스 인증 비밀번호로 사용됩니다. 인증을 닫으려면 비워 두세요",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Nutstore 인터페이스에 제한이 있습니다</a>. 다른 WebDAV 서비스를 사용하세요",
"195": "시스템 시간이 올바르지 않습니다. 시스템 시간을 보정한 후 다시 시도하세요",
"196": "타사 동기화 디스크 경로 아래에 작업 공간을 설정하지 마세요. 그렇지 않으면 데이터가 손상됩니다(iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun 등)",
"197": "",
"197": "노트북 [%s]을(를) 연 뒤 다시 시도해 주세요",
"198": "유효한 데이터 아카이브가 아닙니다. 아카이브를 [문서 트리]에서 내보낸 경우 [문서 트리]에서 가져오세요",
"199": "유효한 .sy.zip 아카이브가 아닙니다. 아카이브를 [설정]에서 내보낸 경우 [설정]에서 가져오세요",
"200": "전역 검색 응답 시간이 느립니다. 유형 필터링이나 키워드를 추가하여 검색 범위를 좁히는 것이 좋습니다",

View file

@ -1285,7 +1285,7 @@
"about": "O programie",
"about1": "Copyright (c) 2020-tera • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Polityka prywatności</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Umowa użytkownika</a>",
"about2": "Użyj w przeglądarce",
"about3": "Proszę używać przeglądarki Chrome i utrzymać ją w tej samej sieci, co komputer, port <code class='fn__code'>${port}</code>(Oprócz losowego portu, pierwszy uruchomiony obszar roboczy będzie także automatycznie nasłuchiwał na <code class='fn__code'>6806</code> jako stały port, aby ułatwić przeglądarki współprace z rozszerzeniami oraz innymi zewnętrznymi programami do wywoływania interfejsu jądra), możliwe połączenia to:",
"about3": "Użyj przeglądarki Chrome i pozostaw w tej samej sieci co komputer, port <code class='fn__code'>${port}</code> (pierwsze uruchomione środowisko robocze, oprócz losowego portu, będzie także automatycznie nasłuchiwać <code class='fn__code'>6806</code> jako portu stałego, aby rozszerzenie do zapisywania z przeglądarki lub inne zewnętrzne programy mogły wywoływać interfejs jądra), możliwe dostępne adresy sieciowe losowych portów:",
"about4": "Otwórz przeglądarkę",
"about5": "Kod autoryzacji dostępu",
"about6": "Po skonfigurowaniu, będzie używany jako hasło do autoryzacji dostępu, zostaw puste, aby wyłączyć autoryzację",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Zamienniki interfejsu Nutstore są ograniczone</a>, proszę używać innych usług WebDAV",
"195": "Czas systemowy jest nieprawidłowy, proszę skalibrować czas systemowy i spróbować ponownie",
"196": "Nie ustawiaj obszaru roboczego pod ścieżką zewnętrznego dysku synchronizującego, w przeciwnym razie dane ulegną uszkodzeniu (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun itp.)",
"197": "",
"197": "Proszę otworzyć notatnik [%s] i spróbować ponownie",
"198": "To nie jest ważny archiwum. Jeśli archiwum zostało wyeksportowane z [Drzewa dokumentów], proszę zaimportować je iz [Drzewa dokumentów]",
"199": "To nie jest ważny archiwum .sy.zip. Jeśli archiwum zostało wyeksportowane z [Ustawień], proszę zaimportować je z [Ustawień]",
"200": "Czas reakcji wyszukiwania globalnego jest wolny, zaleca się dodanie filtrów typów lub słów kluczowych w celu zawężenia zakresu wyszukiwania",

View file

@ -1285,7 +1285,7 @@
"about": "Sobre",
"about1": "Copyright (c) 2020-presente • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Política de Privacidade</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Contrato do Usuário</a>",
"about2": "Usar no navegador",
"about3": "Por favor, use o navegador Chrome e mantenha-o na mesma rede que o computador, porta <code class='fn__code'>${port}</code>(Além da porta aleatória, o primeiro espaço de trabalho iniciado também escutará automaticamente <code class='fn__code'>6806</code> como uma porta fixa, para que seja conveniente para o navegador recortar extensões ou outros programas externos chamarem a interface do kernel), os endereços que podem ser conectados são os seguintes: ",
"about3": "Por favor, use o navegador Chrome e mantenha-se na mesma rede que o computador, porta <code class='fn__code'>${port}</code> (o primeiro espaço de trabalho iniciado, além da porta aleatória, também passará a escutar automaticamente a porta <code class='fn__code'>6806</code> como porta fixa, para facilitar que a extensão de recorte do navegador ou outros programas externos chamem a interface do kernel), endereços de rede de portas aleatórias possíveis:",
"about4": "Abrir navegador",
"about5": "Código de autorização de acesso",
"about6": "Após configurar, será usado como senha de autenticação de acesso, deixe em branco para fechar a autenticação",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Há restrições na interface do Nutstore</a>, por favor use outros serviços WebDAV",
"195": "O horário do sistema está incorreto, por favor calibre o horário do sistema e tente novamente",
"196": "Não defina o espaço de trabalho sob o caminho de um disco de sincronização de terceiros, caso contrário os dados serão danificados (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)",
"197": "",
"197": "Por favor, abra o caderno [%s] e tente novamente",
"198": "Este não é um arquivo de dados válido. Se o arquivo foi exportado de [Árvore de Documentos], por favor importe de [Árvore de Documentos]",
"199": "Este não é um arquivo .sy.zip válido. Se o arquivo foi exportado de [Configurações], por favor importe de [Configurações]",
"200": "O tempo de resposta da busca global está lento, recomenda-se adicionar filtros de tipo ou palavras-chave para reduzir o escopo da busca",

View file

@ -1285,7 +1285,7 @@
"about": "О программе",
"about1": "Авторские права (c) 2020-настоящее время • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Политика конфиденциальности</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Соглашение пользователя</a>",
"about2": "Используйте в обозревателе",
"about3": "Пожалуйста, используйте обозреватель Chrome и держите его в одной сети с компьютером, порт <code class='fn__code'>${port}</code>(Кроме случайного порта, первое запущенное рабочее пространство также автоматически слушает <code class='fn__code'>6806</code> как фиксированный порт, что упрощает использование обозревателя для вспомогательных расширений или других внешних программ для вызова интерфейса ядра), адреса, к которым можно подключиться, следующие: ",
"about3": "Пожалуйста, используйте браузер Chrome и убедитесь, что вы в одной сети с компьютером, порт <code class='fn__code'>${port}</code> (в первом запущенном рабочем пространстве, помимо случайного порта, также автоматически будет прослушиваться порт <code class='fn__code'>6806</code> как фиксированный, чтобы расширение для вырезок в браузере или другие внешние программы могли обращаться к интерфейсу ядра), возможные доступные сетевые адреса случайных портов:",
"about4": "Открыть обозреватель",
"about5": "Код доступа авторизации",
"about6": "После настройки будет использоваться как пароль для аутентификации доступа, оставьте пустым, чтобы закрыть аутентификацию",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Есть ограничения интерфейса Nutstore</a>, пожалуйста, используйте другие службы WebDAV",
"195": "Системное время неверно, пожалуйста, откалибруйте системное время и попробуйте снова",
"196": "Не устанавливайте рабочее пространство в подкаталог синхронизации третьих лиц, иначе данные будут повреждены (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun и т.д.)",
"197": "",
"197": "Пожалуйста, откройте блокнот [%s] и попробуйте снова",
"198": "Это не действительный архив данных. Если архив был экспортирован из [Дерево документов], пожалуйста, импортируйте его из [Дерево документов]",
"199": "Это не действительный архив .sy.zip. Если архив был экспортирован из [Настройки], пожалуйста, импортируйте его из [Настройки]",
"200": "Время отклика глобального поиска медленное, рекомендуется добавить фильтрацию по типу или ключевым словам для сужения области поиска",

View file

@ -1285,7 +1285,7 @@
"about": "Hakkında",
"about1": "Telif hakkı (c) 2020-günümüz • Yunnan Liandi Technology Co., Ltd. • <a target='_blank' href='https://b3log.org/siyuan/en/privacy.html'>Gizlilik Politikası</a> • <a target='_blank' href='https://b3log.org/siyuan/en/eula.html'>Kullanıcı Sözleşmesi</a>",
"about2": "Tarayıcıda kullan",
"about3": "Lütfen Chrome tarayıcısını kullan ve bilgisayar ile aynı ağda kal. Port <code class='fn__code'>${port}</code> (Rastgele portun yanı sıra, ilk başlatılan çalışma alanı ayrıca sabit <code class='fn__code'>6806</code> portunu da dinler; böylece tarayıcı eklentileri veya dış uygulamalar çekirdek arayüzüne kolayca erişebilir). Olası bağlantı adresleri şunlardır:",
"about3": "Lütfen Chrome tarayıcısını kullanın ve bilgisayarınızla aynı ağda olun, port <code class='fn__code'>${port}</code> (ilk başlatılan çalışma alanı, rastgele porta ek olarak tarayıcı kırpma uzantısının veya diğer dış uygulamaların çekirdek arayüzünü çağırabilmesi için sabit port olarak <code class='fn__code'>6806</code>'ı da otomatik olarak dinleyecektir), bağlantı kurulabilecek rastgele port ağ adresleri:",
"about4": "Tarayıcıyı aç",
"about5": "Erişim yetkilendirme kodu",
"about6": "Yapılandırmadan sonra erişim kimlik doğrulama parolası olarak kullanılacaktır, boş bırakırsan kimlik doğrulama kapatılır",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">Nutstore arayüzünde kısıtlamalar vardır</a>, lütfen başka bir WebDAV hizmeti kullan",
"195": "Sistem saati hatalı, lütfen düzeltip tekrar dene",
"196": "Çalışma alanını üçüncü taraf senkron disk (iCloud/OneDrive/Dropbox/Google Drive/Nutstore/Baidu/Tencent vb.) altına koyma, aksi halde veri bozulur",
"197": "",
"197": "Lütfen [%s] defterini açtıktan sonra tekrar deneyin",
"198": "Bu geçerli bir Veri arşivi değil. [Belge ağacı]ndan dışa aktardıysan aynı yerden içe aktar",
"199": "Bu geçerli bir .sy.zip arşivi değil. [Ayarlar]dan dışa aktardıysan aynı yerden içe aktar",
"200": "Genel arama yanıt süresi yavaş, arama kapsamını daraltmak için tür filtresi veya anahtar kelime eklemen önerilir",

View file

@ -1285,7 +1285,7 @@
"about": "關於",
"about1": "版權所有 (c) 2020-現在 • 雲南鏈滴科技有限公司 • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>隱私政策</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>用戶協議</a>",
"about2": "在瀏覽器上使用",
"about3": "請使用 Chrome 瀏覽器並保持和電腦在同一個網路內,埠 <code class='fn__code'>${port}</code>(第一個啟動的工作空間除了隨機埠外也會自動聽 <code class='fn__code'>6806</code> 作為固定埠,以方便瀏覽器剪藏擴展或者其他外部程序調用Kernel接口可能連通的網絡地址:",
"about3": "請使用 Chrome 瀏覽器並保持與電腦在同一網路內,埠 <code class='fn__code'>${port}</code>(第一個啟動的工作空間除了隨機埠外也會自動聽 <code class='fn__code'>6806</code> 作為固定埠,以方便瀏覽器剪藏擴充或其他外部程式呼叫內核介面),可能連通的隨機埠網路地址:",
"about4": "打開瀏覽器",
"about5": "存取授權碼",
"about6": "配置後作為存取鑒權密碼,留空則關閉鑒權",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">堅果雲接口存在限制</a>,請使用其他 WebDAV 服務",
"195": "系統時間不正確,請校準系統時間後再試",
"196": "請勿將工作空間設置在第三方同步硬碟路徑下否則資料會被損壞iCloud/OneDrive/Dropbox/Google Drive/堅果雲/百度網盤/騰訊微雲等)",
"197": "",
"197": "請打開筆記本 [%s] 後再試",
"198": "這不是一個有效的 Data 壓縮檔。如果該資料檔是從 [文檔樹] 導出的,請從 [文檔樹] 導入",
"199": "這不是一個有效的 .sy.zip 壓縮檔。如果該資料檔是從 [設置] 中導出的,請從 [設置] 中導入",
"200": "全域搜索響應時間較慢,建議增加類型過濾或者增加關鍵字以縮小搜索範圍",

View file

@ -1285,7 +1285,7 @@
"about": "关于",
"about1": "版权所有 (c) 2020-现在 • 云南链滴科技有限公司 • <a target='_blank' href='https://b3log.org/siyuan/privacy.html'>隐私政策</a> • <a target='_blank' href='https://b3log.org/siyuan/eula.html'>用户协议</a>",
"about2": "在浏览器上使用",
"about3": "请使用 Chrome 浏览器并保持和电脑在同一个网络内,端口 <code class='fn__code'>${port}</code>(第一个启动的工作空间除了随机端口外也会自动监听 <code class='fn__code'>6806</code> 作为固定端口,以方便浏览器剪藏扩展或者其他外部程序调用内核接口),可能连通的网络地址:",
"about3": "请使用 Chrome 浏览器并保持和电脑在同一个网络内,端口 <code class='fn__code'>${port}</code>(第一个启动的工作空间除了随机端口外也会自动监听 <code class='fn__code'>6806</code> 作为固定端口,以方便浏览器剪藏扩展或者其他外部程序调用内核接口),可能连通的随机端口网络地址:",
"about4": "打开浏览器",
"about5": "访问授权码",
"about6": "配置后作为访问鉴权密码,留空则关闭鉴权",
@ -1644,7 +1644,7 @@
"194": "<a href=\"https://help.jianguoyun.com/?p=2064\" target=\"_blank\">坚果云接口存在限制</a>,请使用其他 WebDAV 服务",
"195": "系统时间不正确,请校准系统时间后再试",
"196": "请勿将工作空间设置在第三方同步盘路径下否则数据会被损坏iCloud/OneDrive/Dropbox/Google Drive/坚果云/百度网盘/腾讯微云等)",
"197": "",
"197": "请打开笔记本 [%s] 后再试",
"198": "这不是一个有效的 Data 压缩包。如果该数据包是从 [文档树] 导出的,请从 [文档树] 导入",
"199": "这不是一个有效的 .sy.zip 压缩包。如果该数据包是从 [设置] 中导出的,请从 [设置] 中导入",
"200": "全局搜索响应时间较慢,建议增加类型过滤或者增加关键字以缩小搜索范围",

View file

@ -89,25 +89,20 @@ export const about = {
${window.siyuan.languages.about2}
<div class="b3-label__text">${window.siyuan.languages.about3.replace("${port}", location.port)}</div>
${(() => {
const ipv4Codes: string[] = [];
const ipv6Codes: string[] = [];
for (const ip of window.siyuan.config.localIPs) {
if (!ip.trim()) {
const serverAddrs: string[] = [];
for (const serverAddr of window.siyuan.config.serverAddrs) {
if (!serverAddr.trim()) {
break;
}
if (ip.startsWith("[") && ip.endsWith("]")) {
ipv6Codes.push(`<code class="fn__code">${ip}</code>`);
} else {
ipv4Codes.push(`<code class="fn__code">${ip}</code>`);
}
serverAddrs.push(`<code class="fn__code">${serverAddr}</code>`);
}
return `<div class="b3-label__text${ipv4Codes.length ? "" : " fn__none"}">${ipv4Codes.join(" ")}</div>
<div class="b3-label__text${ipv6Codes.length ? "" : " fn__none"}">${ipv6Codes.join(" ")}</div>`;
return `<div class="b3-label__text">${serverAddrs.join(" ")}</div>`;
})()}
<div class="b3-label__text">${window.siyuan.languages.about18}</div>
</div>
<div class="fn__space"></div>
<button data-type="open" data-url="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:${location.port}" class="b3-button b3-button--outline fn__size200 fn__flex-center">
<button data-type="open" data-url="${window.siyuan.config.system.networkServe ? window.siyuan.config.serverAddrs[0] : "http://127.0.0.1:"+ location.port}" class="b3-button b3-button--outline fn__size200 fn__flex-center">
<svg><use xlink:href="#iconLink"></use></svg>${window.siyuan.languages.about4}
</button>
</div>
@ -275,13 +270,16 @@ ${checkUpdateHTML}
});
});
about.element.querySelector("#vacuumDataIndex").addEventListener("click", () => {
fetchPost("/api/system/vacuumDataIndex", {}, () => {});
fetchPost("/api/system/vacuumDataIndex", {}, () => {
});
});
about.element.querySelector("#rebuildDataIndex").addEventListener("click", () => {
fetchPost("/api/system/rebuildDataIndex", {}, () => {});
fetchPost("/api/system/rebuildDataIndex", {}, () => {
});
});
about.element.querySelector("#clearTempFiles").addEventListener("click", () => {
fetchPost("/api/system/clearTempFiles", {}, () => {});
fetchPost("/api/system/clearTempFiles", {}, () => {
});
});
about.element.querySelector("#exportLog").addEventListener("click", () => {
fetchPost("/api/system/exportLog", {}, (response) => {

View file

@ -229,17 +229,13 @@ ${window.siyuan.languages.publishServiceAuthAccounts}
if (port === 0) {
publishAddresses.innerText = window.siyuan.languages.publishServiceNotStarted;
} else {
publishAddresses.innerHTML = `<ul class="b3-list fn__flex-1" style="padding: 2px 0;">${
window.siyuan.config.localIPs
.filter(ip => !(ip.startsWith("[") && ip.endsWith("]")))
.map(ip => `<li><code class="fn__code">${ip}:${port}</code></li>`)
.join("")
}${
window.siyuan.config.localIPs
.filter(ip => (ip.startsWith("[") && ip.endsWith("]")))
.map(ip => `<li><code class="fn__code">${ip}:${port}</code></li>`)
.join("")
}</ul>`;
publishAddresses.innerHTML = `<div class="b3-label__text">${
window.siyuan.config.serverAddrs
.map(serverAddr => {
serverAddr = serverAddr.substring(0, serverAddr.lastIndexOf(":"));
return `<code class="fn__code">${serverAddr}:${port}</code>`
}).join(" ")
}</div>`;
}
},
};

View file

@ -33,6 +33,10 @@ export const initMessage = () => {
// type: info/error; timeout: 0 手动关闭;-1 永不关闭
export const showMessage = (message: string, timeout = 6000, type = "info", messageId?: string) => {
if (!message) {
return;
}
const messagesElement = document.getElementById("message").firstElementChild;
if (!messagesElement) {
let tempMessages = document.getElementById("tempMessage");

View file

@ -12,11 +12,6 @@ import {setKey} from "../../sync/syncGuide";
import {isBrowser} from "../../util/functions";
export const initAbout = () => {
if (!window.siyuan.config.localIPs || window.siyuan.config.localIPs.length === 0 ||
(window.siyuan.config.localIPs.length === 1 && window.siyuan.config.localIPs[0] === "")) {
window.siyuan.config.localIPs = ["127.0.0.1"];
}
openModel({
title: window.siyuan.languages.about,
icon: "iconInfo",
@ -32,26 +27,20 @@ export const initAbout = () => {
<div class="b3-label">
${window.siyuan.languages.about2}
<div class="fn__hr"></div>
<a target="_blank" href="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:${location.port}" class="b3-button b3-button--outline fn__block">
<a target="_blank" href="${window.siyuan.config.system.networkServe ? window.siyuan.config.serverAddrs[0] : "http://127.0.0.1:" + location.port}" class="b3-button b3-button--outline fn__block">
<svg><use xlink:href="#iconLink"></use></svg>${window.siyuan.languages.about4}
</a>
<div class="b3-label__text">${window.siyuan.languages.about3.replace("${port}", location.port)}</div>
<div class="fn__hr"></div>
${(() => {
const ipv4Codes: string[] = [];
const ipv6Codes: string[] = [];
for (const ip of window.siyuan.config.localIPs) {
if (!ip.trim()) {
const serverAddrs: string[] = [];
for (const serverAddr of window.siyuan.config.serverAddrs) {
if (!serverAddr.trim()) {
break;
}
if (ip.startsWith("[") && ip.endsWith("]")) {
ipv6Codes.push(`<code class="fn__code">${ip}</code>`);
} else {
ipv4Codes.push(`<code class="fn__code">${ip}</code>`);
}
serverAddrs.push(`<code class="fn__code">${serverAddr}</code>`);
}
return `<div class="b3-label__text${ipv4Codes.length ? "" : " fn__none"}">${ipv4Codes.join(" ")}</div>
<div class="b3-label__text${ipv6Codes.length ? "" : " fn__none"}">${ipv6Codes.join(" ")}</div>`;
return `<div class="b3-label__text">${serverAddrs.join(" ")}</div>`;
})()}
<div class="fn__hr"></div>
<div class="b3-label__text">${window.siyuan.languages.about18}</div>
@ -320,17 +309,20 @@ export const initAbout = () => {
event.stopPropagation();
break;
} else if (target.id === "vacuumDataIndex") {
fetchPost("/api/system/vacuumDataIndex", {}, () => {});
fetchPost("/api/system/vacuumDataIndex", {}, () => {
});
event.preventDefault();
event.stopPropagation();
break;
} else if (target.id === "rebuildDataIndex") {
fetchPost("/api/system/rebuildDataIndex", {}, () => {});
fetchPost("/api/system/rebuildDataIndex", {}, () => {
});
event.preventDefault();
event.stopPropagation();
break;
} else if (target.id === "clearTempFiles") {
fetchPost("/api/system/clearTempFiles", {}, () => {});
fetchPost("/api/system/clearTempFiles", {}, () => {
});
event.preventDefault();
event.stopPropagation();
break;

View file

@ -52,9 +52,9 @@ declare namespace Config {
*/
langs: ILang[];
/**
* A list of the IP addresses of the devices on which the kernel resides
* A list of the kernel server addresses
*/
localIPs: string[];
serverAddrs: string[];
/**
* Log level
*/

View file

@ -665,6 +665,10 @@ func getBlockInfo(c *gin.Context) {
ret.Code = -1
ret.Msg = model.Conf.Language(275)
return
} else if errors.Is(err, model.ErrBoxUnindexed) {
ret.Code = -1
ret.Msg = ""
return
}
block, _ := model.GetBlock(id, tree)

View file

@ -64,7 +64,7 @@ type AppConf struct {
User *conf.User `json:"-"` // 社区用户内存结构,不持久化。不要直接使用,使用 GetUser() 和 SetUser() 方法
Account *conf.Account `json:"account"` // 帐号配置
ReadOnly bool `json:"readonly"` // 是否是以只读模式运行
LocalIPs []string `json:"localIPs"` // 本地 IP 列表
ServerAddrs []string `json:"serverAddrs"` // 本地服务器地址列表
AccessAuthCode string `json:"accessAuthCode"` // 访问授权码
System *conf.System `json:"system"` // 系统配置
Keymap *conf.Keymap `json:"keymap"` // 快捷键配置
@ -582,8 +582,6 @@ func InitConf() {
Conf.AccessAuthCode = strings.TrimSpace(Conf.AccessAuthCode)
Conf.AccessAuthCode = util.RemoveInvalid(Conf.AccessAuthCode)
Conf.LocalIPs = util.GetLocalIPs()
if 1 == Conf.DataIndexState {
// 上次未正常完成数据索引
go func() {
@ -1045,13 +1043,13 @@ func GetMaskedConf() (ret *AppConf, err error) {
return
}
// REF: https://github.com/siyuan-note/siyuan/issues/11364
// HideConfSecret 隐藏设置中的秘密信息
// REF: https://github.com/siyuan-note/siyuan/issues/11364
func HideConfSecret(c *AppConf) {
c.AI = &conf.AI{}
c.Api = &conf.API{}
c.Flashcard = &conf.Flashcard{}
c.LocalIPs = []string{}
c.ServerAddrs = []string{}
c.Publish = &conf.Publish{}
c.Repo = &conf.Repo{}
c.Sync = &conf.Sync{}

View file

@ -17,12 +17,17 @@
package model
import (
"bufio"
"bytes"
"errors"
"fmt"
"io/fs"
"os"
"path"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
"github.com/88250/lute"
@ -179,6 +184,7 @@ var (
ErrBlockNotFound = errors.New("block not found")
ErrTreeNotFound = errors.New("tree not found")
ErrIndexing = errors.New("indexing")
ErrBoxUnindexed = errors.New("notebook unindexed")
)
func LoadTreeByBlockIDWithReindex(id string) (ret *parse.Tree, err error) {
@ -195,14 +201,13 @@ func LoadTreeByBlockIDWithReindex(id string) (ret *parse.Tree, err error) {
}
// 尝试从文件系统加载并建立索引
indexTreeInFilesystem(id)
err = indexTreeInFilesystem(id)
bt = treenode.GetBlockTree(id)
if nil == bt {
if "dev" == util.Mode {
logging.LogWarnf("block tree not found [id=%s], stack: [%s]", id, logging.ShortStack())
}
return nil, ErrTreeNotFound
return
}
}
@ -246,64 +251,53 @@ func loadTreeByBlockTree(bt *treenode.BlockTree) (ret *parse.Tree, err error) {
var searchTreeLimiter = rate.NewLimiter(rate.Every(3*time.Second), 1)
func indexTreeInFilesystem(rootID string) {
func indexTreeInFilesystem(blockID string) error {
if !searchTreeLimiter.Allow() {
return
return ErrIndexing
}
msdID := util.PushMsg(Conf.language(45), 7000)
defer util.PushClearMsg(msdID)
logging.LogWarnf("searching tree on filesystem [rootID=%s]", rootID)
var treePath string
filelock.Walk(util.DataDir, func(path string, d fs.DirEntry, err error) error {
if d.IsDir() {
if strings.HasPrefix(d.Name(), ".") {
return filepath.SkipDir
}
return nil
}
logging.LogWarnf("searching tree on filesystem [id=%s]", blockID)
if !strings.HasSuffix(d.Name(), ".sy") {
return nil
}
baseName := filepath.Base(path)
if rootID+".sy" != baseName {
return nil
}
treePath = path
return filepath.SkipAll
})
if "" == treePath {
logging.LogErrorf("tree not found on filesystem [rootID=%s]", rootID)
return
unindexedTreePath := findUnindexedTreePathInAllBoxes(blockID)
if "" == unindexedTreePath {
logging.LogInfof("tree not found on filesystem [id=%s]", blockID)
return ErrTreeNotFound
}
boxID := strings.TrimPrefix(treePath, util.DataDir)
boxID := strings.TrimPrefix(unindexedTreePath, util.DataDir)
boxID = boxID[1:]
boxID = boxID[:strings.Index(boxID, string(os.PathSeparator))]
treePath = strings.TrimPrefix(treePath, util.DataDir)
treePath = strings.TrimPrefix(treePath, string(os.PathSeparator))
treePath = strings.TrimPrefix(treePath, boxID)
treePath = filepath.ToSlash(treePath)
unindexedTreePath = strings.TrimPrefix(unindexedTreePath, util.DataDir)
unindexedTreePath = strings.TrimPrefix(unindexedTreePath, string(os.PathSeparator))
unindexedTreePath = strings.TrimPrefix(unindexedTreePath, boxID)
unindexedTreePath = filepath.ToSlash(unindexedTreePath)
if nil == Conf.Box(boxID) {
for _, b := range Conf.GetClosedBoxes() {
if b.ID == boxID {
logging.LogInfof("box [%s] is closed", boxID)
util.PushErrMsg(fmt.Sprintf(Conf.language(197), b.Name), 7000)
return ErrBoxUnindexed
}
}
logging.LogInfof("box [%s] not found", boxID)
// 如果笔记本不存在或者已经关闭,则不处理 https://github.com/siyuan-note/siyuan/issues/11149
return
// 如果笔记本不存在则不处理 https://github.com/siyuan-note/siyuan/issues/11149
return ErrTreeNotFound
}
tree, err := filesys.LoadTree(boxID, treePath, util.NewLute())
tree, err := filesys.LoadTree(boxID, unindexedTreePath, util.NewLute())
if err != nil {
logging.LogErrorf("load tree [%s] failed: %s", treePath, err)
return
logging.LogErrorf("load tree [%s] failed: %s", unindexedTreePath, err)
return err
}
treenode.UpsertBlockTree(tree)
sql.IndexTreeQueue(tree)
logging.LogInfof("reindexed tree by filesystem [rootID=%s]", rootID)
logging.LogInfof("reindexed tree by filesystem [blockID=%s]", blockID)
return nil
}
func loadParentTree(tree *parse.Tree) (ret *parse.Tree) {
@ -318,3 +312,111 @@ func loadParentTree(tree *parse.Tree) (ret *parse.Tree) {
ret, _ = filesys.LoadTree(tree.Box, parentPath, luteEngine)
return
}
func findUnindexedTreePathInAllBoxes(id string) (ret string) {
boxes := Conf.GetBoxes()
for _, box := range boxes {
root := filepath.Join(util.DataDir, box.ID)
paths := findAllOccurrences(root, id)
var rootIDs []string
rootIDPaths := map[string]string{}
for _, p := range paths {
rootID := util.GetTreeID(p)
rootIDs = append(rootIDs, rootID)
rootIDPaths[rootID] = p
}
result := treenode.ExistBlockTrees(rootIDs)
for rootID, exist := range result {
if !exist {
return rootIDPaths[rootID]
}
}
}
return
}
func findAllOccurrences(root string, target string) []string {
if root == "" || target == "" {
return nil
}
searchBytes := []byte(target)
jobs := make(chan string, 256) // 任务通道
results := make(chan string, 256) // 结果通道
// 用于等待所有 Worker 完成
var wg sync.WaitGroup
// 用于等待结果收集器完成
var collectWg sync.WaitGroup
// 1. 启动结果收集协程
var matchedPaths []string
collectWg.Add(1)
go func() {
defer collectWg.Done()
for path := range results {
matchedPaths = append(matchedPaths, path)
}
}()
// 2. 启动并发 Worker Pool (基于 CPU 核心数)
numWorkers := runtime.NumCPU()
for i := 0; i < numWorkers; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for path := range jobs {
if containsTarget(path, searchBytes) {
results <- path
}
}
}()
}
// 3. 遍历文件夹并分发任务
_ = filepath.WalkDir(root, func(path string, d os.DirEntry, err error) error {
if err == nil && d.Type().IsRegular() {
jobs <- path
}
return nil
})
// 4. 关闭通道并等待结束
close(jobs) // 停止分发任务
wg.Wait() // 等待所有 Worker 处理完
close(results) // 停止收集结果
collectWg.Wait() // 等待切片组装完成
return matchedPaths
}
// containsTarget 针对大文件优化的字节流匹配函数
func containsTarget(path string, target []byte) bool {
f, err := os.Open(path)
if err != nil {
return false
}
defer f.Close()
// 1MB 缓冲区
reader := bufio.NewReaderSize(f, 1024*1024)
for {
// 使用 ReadSlice 实现零拷贝读取
line, err := reader.ReadSlice('\n')
if len(line) > 0 && bytes.Contains(line, target) {
return true
}
if err != nil {
if err == bufio.ErrBufferFull {
// 处理超过 1MB 的超长行,直接跳过当前行剩余部分
for err == bufio.ErrBufferFull {
_, err = reader.ReadSlice('\n')
}
continue
}
break // EOF 或其他错误
}
}
return false
}

View file

@ -198,6 +198,9 @@ func Serve(fastMode bool, cookieKey string) {
}
util.ServerPort = port
model.Conf.ServerAddrs = util.GetServerAddrs()
model.Conf.Save()
util.ServerURL, err = url.Parse("http://127.0.0.1:" + port)
if err != nil {
logging.LogErrorf("parse server url failed: %s", err)

View file

@ -64,18 +64,18 @@ func ShortPathForBootingDisplay(p string) string {
var LocalIPs []string
func GetLocalIPs() (ret []string) {
if ContainerAndroid == Container || ContainerHarmony == Container {
func GetServerAddrs() (ret []string) {
if ContainerAndroid != Container && ContainerHarmony != Container {
// Android 上用不了 net.InterfaceAddrs() https://github.com/golang/go/issues/40569所以前面使用启动内核传入的参数 localIPs
LocalIPs = append(LocalIPs, LocalHost)
LocalIPs = gulu.Str.RemoveDuplicatedElem(LocalIPs)
return LocalIPs
ret = GetPrivateIPv4s()
}
ret = []string{}
ret = append(ret, GetPrivateIPv4s()...)
ret = append(ret, LocalHost)
ret = gulu.Str.RemoveDuplicatedElem(ret)
for i, _ := range ret {
ret[i] = "http://" + ret[i] + ":" + ServerPort
}
return
}