mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1338,6 +1338,9 @@
|
||||
"about14": "\u202B مصادفة الرمز المميز عند استدعاء واجهة برمجة التطبيقات (API)\u202C<br>\u202Bرأس طلب HTTP هو \u202A<code class='fn__code'>Authorization: token ${token}</code>\u202C\u202C",
|
||||
"about17": "عند الضبط على <code class='fn__code'>اتصال مباشر</code> لن يتم تفعيل الوكيل",
|
||||
"about18": "عند استخدام عنوان غير محلي (<code class='fn__code'>127.0.0.1</code>/<code class='fn__code'>[::1]</code>)، يرجى تعيين رمز الإذن بالوصول أولاً",
|
||||
"desktopMode": "وضع سطح المكتب",
|
||||
"desktopModeTip": "تفعيل لاستخدام تخطيط سطح المكتب",
|
||||
"mobileModeTip": "تعطيل لاستخدام تخطيط الهاتف المحمول",
|
||||
"checkUpdate": "تحقق من التحديثات",
|
||||
"currentVer": "النسخة الحالية",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\"> تنزيل أحدث إصدار</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Der Token muss bei der API-Anrufung authentifiziert werden<br>HTTP-Anforderungsheader <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Proxy nicht aktivieren, wenn auf <code class='fn__code'>Direkte Verbindung</code> gesetzt",
|
||||
"about18": "Beim Verwenden einer Nicht-Loopback-Adresse (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) bitte zuerst den Zugriffsautorisierungscode setzen",
|
||||
"desktopMode": "Desktop-Modus",
|
||||
"desktopModeTip": "Aktiviert das Desktop-Layout",
|
||||
"mobileModeTip": "Deaktiviert das mobile Layout",
|
||||
"checkUpdate": "Aktualisierung überprüfen",
|
||||
"currentVer": "Aktuelle Version",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Laden Sie die neueste Version herunter</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "The token needs to be authenticated when calling the API<br>HTTP request header <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Do not enable proxy when set to <code class='fn__code'>Direct connection</code>",
|
||||
"about18": "When using a non-loopback address (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) please set the Access authorization code first",
|
||||
"desktopMode": "Desktop Mode",
|
||||
"desktopModeTip": "Use desktop interface layout when enabled",
|
||||
"mobileModeTip": "Use mobile interface layout when disabled",
|
||||
"checkUpdate": "Check update",
|
||||
"currentVer": "Current version",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Download the latest version</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "El token debe ser autentificado al llamar a la API<br>Encabezado de solicitud HTTP <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "No habilite el proxy cuando esté configurado como <code class='fn__code'>Conexión directa</code>",
|
||||
"about18": "Cuando se utiliza una dirección sin bucle invertido (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code> ) Primero configure el Código de autorización de acceso",
|
||||
"desktopMode": "Modo escritorio",
|
||||
"desktopModeTip": "Activar para usar diseño de escritorio",
|
||||
"mobileModeTip": "Desactivar para usar diseño móvil",
|
||||
"checkUpdate": "Comprobar actualización",
|
||||
"currentVer": "Versión actual",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/download.html\", target=\"_blank\">Descargar la última versión</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Le token doit être authentifié lors de l'appel de l'API<br>En-tête de requête HTTP <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "N'activez pas le proxy lorsqu'il est défini sur <code class='fn__code'>Connexion directe</code>.",
|
||||
"about18": "Lors de l'utilisation d'une adresse sans bouclage (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code> ) Veuillez d'abord définir le Accès code d'autorisation",
|
||||
"desktopMode": "Mode bureau",
|
||||
"desktopModeTip": "Activer pour utiliser la mise en page bureau",
|
||||
"mobileModeTip": "Désactiver pour utiliser la mise en page mobile",
|
||||
"checkUpdate": "Vérifier la mise à jour",
|
||||
"currentVer": "Version actuelle",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Télécharger la dernière version</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "האשרה צריכה להיות מאומתת כאשר מתקשרים ל-API<br>כותרת הבקשה HTTP <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "אל תאפשר פרוקסי כאשר זה מוגדר ל<code class='fn__code'>חיבור ישיר</code>",
|
||||
"about18": "בעת שימוש בכתובת שאינה לולאת חזרה (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) אנא הגדר קודם את קוד האישור לגישה",
|
||||
"desktopMode": "מצב שולחן עבודה",
|
||||
"desktopModeTip": "הפעל כדי להשתמש בפריסת שולחן עבודה",
|
||||
"mobileModeTip": "השבת כדי להשתמש בפריסה ניידת",
|
||||
"checkUpdate": "בדוק עדכון",
|
||||
"currentVer": "גרסה נוכחית",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">הורד את הגרסה האחרונה</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Il token deve essere autenticato quando si chiama l'API<br>Intestazione della richiesta HTTP <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Non abilitare il proxy quando è impostato su <code class='fn__code'>Connessione diretta</code>",
|
||||
"about18": "Quando si utilizza un indirizzo non di loopback (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>), si prega di impostare prima il codice di autorizzazione di accesso",
|
||||
"desktopMode": "Modalità desktop",
|
||||
"desktopModeTip": "Attiva per utilizzare il layout desktop",
|
||||
"mobileModeTip": "Disattiva per utilizzare il layout mobile",
|
||||
"checkUpdate": "Controlla aggiornamenti",
|
||||
"currentVer": "Versione corrente",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Scarica l'ultima versione</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "API を呼び出す際にトークンを認証する必要があります<br>HTTP リクエストヘッダー <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "<code class='fn__code'>直接接続</code>に設定されている場合はプロキシを有効にしないでください",
|
||||
"about18": "ループバックアドレス (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) 以外のアドレスを使用する場合は最初にアクセス認証コードを設定してください",
|
||||
"desktopMode": "デスクトップモード",
|
||||
"desktopModeTip": "有効にするとデスクトップレイアウトを使用",
|
||||
"mobileModeTip": "無効にするとモバイルレイアウトを使用",
|
||||
"checkUpdate": "アップデートを確認",
|
||||
"currentVer": "現在のバージョン",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">最新バージョンをダウンロード</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "API를 호출할 때 토큰을 인증해야 합니다<br>HTTP 요청 헤더 <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "<code class='fn__code'>직접 연결</code>로 설정하면 프록시를 활성화하지 않습니다",
|
||||
"about18": "비 루프백 주소(<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>)를 사용할 때는 먼저 액세스 인증 코드를 설정하세요",
|
||||
"desktopMode": "데스크톱 모드",
|
||||
"desktopModeTip": "활성화 시 데스크톱 레이아웃 사용",
|
||||
"mobileModeTip": "비활성화 시 모바일 레이아웃 사용",
|
||||
"checkUpdate": "업데이트 확인",
|
||||
"currentVer": "현재 버전",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">최신 버전 다운로드</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Token potrzebny do autoryzacji podczas wywoływania API<br>Nagłówek żądania HTTP <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Nie włączaj proxy, gdy ustawione na <code class='fn__code'>Bezpośrednie połączenie</code>",
|
||||
"about18": "Używając adresu spoza pętli zwrotnej (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) proszę najpierw ustawić kod autoryzacji dostępu",
|
||||
"desktopMode": "Tryb pulpitu",
|
||||
"desktopModeTip": "Włącz, aby używać układu pulpitu",
|
||||
"mobileModeTip": "Wyłącz, aby używać układu mobilnego",
|
||||
"checkUpdate": "Sprawdź aktualizacje",
|
||||
"currentVer": "Bieżąca wersja",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Pobierz najnowszą wersję</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "O token precisa ser autenticado ao chamar a API<br>Cabeçalho da requisição HTTP <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Não ativar proxy quando definido como <code class='fn__code'>Conexão direta</code>",
|
||||
"about18": "Ao usar um endereço não-loopback (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) por favor defina o Código de autorização de acesso primeiro",
|
||||
"desktopMode": "Modo Desktop",
|
||||
"desktopModeTip": "Ativar para usar layout de desktop",
|
||||
"mobileModeTip": "Desativar para usar layout móvel",
|
||||
"checkUpdate": "Verificar atualização",
|
||||
"currentVer": "Versão atual",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Baixar a versão mais recente</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Токен необходимо аутентифицировать при вызове API<br>HTTP заголовок запроса <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Не включайте прокси, когда установлено <code class='fn__code'>Прямое подключение</code>",
|
||||
"about18": "При использовании адреса, отличного от адреса обратной связи (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>), пожалуйста, сначала настройте код доступа авторизации",
|
||||
"desktopMode": "Режим рабочего стола",
|
||||
"desktopModeTip": "Включить для использования макета рабочего стола",
|
||||
"mobileModeTip": "Отключить для использования мобильного макета",
|
||||
"checkUpdate": "Проверить обновления",
|
||||
"currentVer": "Текущая версия",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Скачать последнюю версию</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Token vyžadovaný pre volania API cez HTTP hlavičku Authorization",
|
||||
"about17": "Nepovoliť proxy pri priamom pripojení",
|
||||
"about18": "Pri sieťovom prístupe nastavte autorizačný kód!",
|
||||
"desktopMode": "Režim pracovnej plochy",
|
||||
"desktopModeTip": "Povoliť pre použitie rozloženia pracovnej plochy",
|
||||
"mobileModeTip": "Zakázať pre použitie mobilného rozloženia",
|
||||
"checkUpdate": "Skontrolovať aktualizáciu",
|
||||
"currentVer": "Aktuálna verzia",
|
||||
"downloadLatestVer": "Stiahnuť najnovšiu verziu",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "API çağrılarında kimlik doğrulaması gerekir<br>HTTP başlığı: <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "<code class='fn__code'>Doğrudan bağlantı</code> seçiliyse proxy etkinleştirme",
|
||||
"about18": "Loopback dışı adres (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) kullanıyorsan önce erişim yetkilendirme kodunu ayarla",
|
||||
"desktopMode": "Masaüstü Modu",
|
||||
"desktopModeTip": "Masaüstü arayüz düzenini kullanmak için etkinleştir",
|
||||
"mobileModeTip": "Mobil arayüz düzenini kullanmak için devre dışı bırak",
|
||||
"checkUpdate": "Güncellemeyi kontrol et",
|
||||
"currentVer": "Geçerli sürüm",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\" target=\"_blank\">En son sürümü indir</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "Токен потрібен для автентифікації при виклику API<br>HTTP-заголовок запиту <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "Не вмикайте проксі, якщо встановлено <code class='fn__code'>Пряме з’єднання</code>",
|
||||
"about18": "При використанні не-loopback-адреси (<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>) спочатку встановіть код авторизації доступу",
|
||||
"desktopMode": "Режим робочого столу",
|
||||
"desktopModeTip": "Увімкніть для використання макета робочого столу",
|
||||
"mobileModeTip": "Вимкніть для використання мобільного макета",
|
||||
"checkUpdate": "Перевірити оновлення",
|
||||
"currentVer": "Поточна версія",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/en/download.html\", target=\"_blank\">Завантажити останню версію</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "調用 API 時需要通過該 token 進行鑒權<br>HTTP 請求標頭 <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "設置為 <code class='fn__code'>直接連接</code> 時不啟用代理",
|
||||
"about18": "使用非環回地址(<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>)時請先設置訪問授權碼",
|
||||
"desktopMode": "桌面模式",
|
||||
"desktopModeTip": "啟用後使用桌面端界面佈局",
|
||||
"mobileModeTip": "禁用後使用移動端界面佈局",
|
||||
"checkUpdate": "檢查更新",
|
||||
"currentVer": "當前版本",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/download.html\", target=\"_blank\">下載最新版</a>",
|
||||
|
||||
@@ -1338,6 +1338,9 @@
|
||||
"about14": "调用 API 时需要通过该 token 进行鉴权<br>HTTP 请求标头 <code class=\"fn__code\">Authorization: token ${token}</code>",
|
||||
"about17": "设置为 <code class='fn__code'>直接连接</code> 时不启用代理",
|
||||
"about18": "使用非环回地址(<code class=\"fn__code\">127.0.0.1</code>/<code class=\"fn__code\">[::1]</code>)时请先设置 访问授权码",
|
||||
"desktopMode": "桌面模式",
|
||||
"desktopModeTip": "启用后使用桌面端界面布局",
|
||||
"mobileModeTip": "禁用后使用移动端界面布局",
|
||||
"checkUpdate": "检查更新",
|
||||
"currentVer": "当前版本",
|
||||
"downloadLatestVer": "<a href=\"https://b3log.org/siyuan/download.html\", target=\"_blank\">下载最新版</a>",
|
||||
|
||||
@@ -179,7 +179,17 @@ export const appearance = {
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="closeButtonBehavior" type="checkbox"${window.siyuan.config.appearance.closeButtonBehavior === 0 ? "" : " checked"}>
|
||||
</label>`;
|
||||
</label>
|
||||
<div class="b3-label">
|
||||
<label class="fn__flex">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.desktopMode}
|
||||
<div class="b3-label__text">${window.siyuan.languages.mobileModeTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<input class="b3-switch fn__flex-center" id="desktopMode" type="checkbox" checked>
|
||||
</label>
|
||||
</div>`;
|
||||
},
|
||||
_send: () => {
|
||||
const themeLight = (appearance.element.querySelector("#themeLight") as HTMLSelectElement).value;
|
||||
@@ -213,6 +223,12 @@ export const appearance = {
|
||||
},
|
||||
bindEvent: () => {
|
||||
setStatusBar(appearance.element.querySelector("#statusBarSetting"));
|
||||
appearance.element.querySelector("#desktopMode")?.addEventListener("change", (event) => {
|
||||
event.stopImmediatePropagation();
|
||||
const checked = (event.target as HTMLInputElement).checked;
|
||||
document.cookie = "siyuan-desktop-mode=" + (checked ? "true" : "false") + ";path=/;max-age=31536000";
|
||||
window.location.href = "/";
|
||||
});
|
||||
appearance.element.querySelector("#codeSnippet").addEventListener("click", () => {
|
||||
openSnippets();
|
||||
});
|
||||
|
||||
@@ -65,7 +65,8 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
|
||||
getLang(["language", "language1", "appearance", "appearance1", "appearance2", "appearance3", "appearance4",
|
||||
"appearance5", "appearance6", "appearance8", "appearance9", "appearance10", "appearance11", "appearance16",
|
||||
"appearance17", "appearance18", "resetLayout", "reset", "icon", "themeLight", "themeDark", "close", "themeOS", "theme",
|
||||
"theme2", "theme11", "theme12", "customEmoji", "customEmojiTip", "refresh"]),
|
||||
"theme2", "theme11", "theme12", "customEmoji", "customEmojiTip", "refresh",
|
||||
"desktopMode", "desktopModeTip", "mobileModeTip"]),
|
||||
|
||||
// 集市
|
||||
getLang(["bazaar", "theme", "template", "icon", "widget"]),
|
||||
|
||||
@@ -58,9 +58,25 @@ export const initAppearance = () => {
|
||||
<svg><use xlink:href="#iconSettings"></use></svg>${window.siyuan.languages.config}
|
||||
</button>
|
||||
<div class="b3-label__text">${window.siyuan.languages.appearance18}</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
<label class="fn__flex">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.desktopMode}
|
||||
<div class="b3-label__text">${window.siyuan.languages.desktopModeTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<input class="b3-switch fn__flex-center" id="desktopMode" type="checkbox">
|
||||
</label>
|
||||
</div>`,
|
||||
bindEvent(modelMainElement: HTMLElement) {
|
||||
setStatusBar(modelMainElement.querySelector('[data-action="hideStatusBarSetting"]'));
|
||||
const desktopModeElement = modelMainElement.querySelector("#desktopMode") as HTMLInputElement;
|
||||
desktopModeElement.addEventListener("change", (event) => {
|
||||
event.stopImmediatePropagation();
|
||||
document.cookie = "siyuan-desktop-mode=" + (desktopModeElement.checked ? "true" : "false") + ";path=/;max-age=31536000";
|
||||
window.location.href = "/";
|
||||
});
|
||||
modelMainElement.querySelectorAll("select, .b3-switch").forEach(item => {
|
||||
item.addEventListener("change", () => {
|
||||
const modeElementValue = parseInt((modelMainElement.querySelector("#mode") as HTMLSelectElement).value);
|
||||
|
||||
@@ -423,6 +423,23 @@ func serveAppearance(ginServer *gin.Engine) {
|
||||
queryParams.Set("r", gulu.Rand.String(7))
|
||||
location.RawQuery = queryParams.Encode()
|
||||
|
||||
siyuanDesktopMode, desktopCookieErr := c.Request.Cookie("siyuan-desktop-mode")
|
||||
if nil == desktopCookieErr {
|
||||
if "true" == siyuanDesktopMode.Value {
|
||||
if strings.Contains(userAgentHeader, "Electron") {
|
||||
location.Path = "/stage/build/app/"
|
||||
} else {
|
||||
location.Path = "/stage/build/desktop/"
|
||||
}
|
||||
c.Redirect(302, location.String())
|
||||
return
|
||||
} else if "false" == siyuanDesktopMode.Value {
|
||||
location.Path = "/stage/build/mobile/"
|
||||
c.Redirect(302, location.String())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(userAgentHeader, "Electron") {
|
||||
location.Path = "/stage/build/app/"
|
||||
} else if strings.Contains(userAgentHeader, "Pad") ||
|
||||
|
||||
Reference in New Issue
Block a user