mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 02:21:38 +08:00
This commit is contained in:
parent
2d2420794c
commit
dcc1e32a30
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "نظام الملفات المحلي",
|
||||
"relativeFontSize": "نسبة إلى حجم خط المحرر",
|
||||
"localFileSystem": "نظام الملفات المحلي",
|
||||
"deviceNotSupport": "الجهاز الحالي غير مدعوم",
|
||||
"second": "ثانية",
|
||||
"syncInterval": "الفاصل الزمني للمزامنة",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "Lokales Dateisystem",
|
||||
"relativeFontSize": "relativ zur Schriftgröße des Editors",
|
||||
"localFileSystem": "Lokales Dateisystem",
|
||||
"deviceNotSupport": "Das aktuelle Gerät wird nicht unterstützt",
|
||||
"second": "Sekunde",
|
||||
"syncInterval": "Synchronisierungsintervall",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "Local file system",
|
||||
"relativeFontSize": "relative to the editor font size",
|
||||
"localFileSystem": "Local file system",
|
||||
"deviceNotSupport": "The current device is not supported",
|
||||
"second": "second",
|
||||
"syncInterval": "sync interval",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "Sistema de archivos local",
|
||||
"relativeFontSize": "en relación con el tamaño de fuente del editor",
|
||||
"localFileSystem": "Sistema de archivos local",
|
||||
"deviceNotSupport": "El dispositivo actual no es compatible",
|
||||
"second": "segundo",
|
||||
"syncInterval": "intervalo de sincronización",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "Système de fichiers local",
|
||||
"relativeFontSize": "par rapport à la taille de la police de l'éditeur",
|
||||
"localFileSystem": "Système de fichiers local",
|
||||
"deviceNotSupport": "L'appareil actuel n'est pas pris en charge",
|
||||
"second": "seconde",
|
||||
"syncInterval": "intervalle de synchronisation",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "מערכת קבצים מקומית",
|
||||
"relativeFontSize": "יחסית לגודל הגופן של העורך",
|
||||
"localFileSystem": "מערכת קבצים מקומית",
|
||||
"deviceNotSupport": "המכשיר הנוכחי אינו נתמך",
|
||||
"second": "שנייה",
|
||||
"syncInterval": "מרווח סנכרון",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "File system locale",
|
||||
"relativeFontSize": "rispetto alla dimensione del carattere dell'editor",
|
||||
"localFileSystem": "File system locale",
|
||||
"deviceNotSupport": "Il dispositivo corrente non è supportato",
|
||||
"second": "secondo",
|
||||
"syncInterval": "intervallo di sincronizzazione",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "ローカルファイルシステム",
|
||||
"relativeFontSize": "エディターのフォントサイズに対して",
|
||||
"localFileSystem": "ローカルファイルシステム",
|
||||
"deviceNotSupport": "現在のデバイスはサポートされていません",
|
||||
"second": "秒",
|
||||
"syncInterval": "同期間隔",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "Lokalny system plików",
|
||||
"relativeFontSize": "względem rozmiaru czcionki edytora",
|
||||
"localFileSystem": "Lokalny system plików",
|
||||
"deviceNotSupport": "Bieżące urządzenie nie jest obsługiwane",
|
||||
"second": "sekunda",
|
||||
"syncInterval": "interwał synchronizacji",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "Локальная файловая система",
|
||||
"relativeFontSize": "относительно размера шрифта редактора",
|
||||
"localFileSystem": "Локальная файловая система",
|
||||
"deviceNotSupport": "Текущее устройство не поддерживается",
|
||||
"second": "секунда",
|
||||
"syncInterval": "интервал синхронизации",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "本地檔案系統",
|
||||
"relativeFontSize": "相對於編輯器字號",
|
||||
"localFileSystem": "本地檔案系統",
|
||||
"deviceNotSupport": "當前設備不支援",
|
||||
"second": "秒",
|
||||
"syncInterval": "同步間隔",
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"localFlieSystem": "本地文件系统",
|
||||
"relativeFontSize": "相对于编辑器字号",
|
||||
"localFileSystem": "本地文件系统",
|
||||
"deviceNotSupport": "当前设备不支持",
|
||||
"second": "秒",
|
||||
"syncInterval": "同步间隔",
|
||||
|
@ -424,7 +424,7 @@ export const repos = {
|
||||
<option value="0" ${window.siyuan.config.sync.provider === 0 ? "selected" : ""}>SiYuan</option>
|
||||
<option value="2" ${window.siyuan.config.sync.provider === 2 ? "selected" : ""}>S3</option>
|
||||
<option value="3" ${window.siyuan.config.sync.provider === 3 ? "selected" : ""}>WebDAV</option>
|
||||
<option value="4" ${window.siyuan.config.sync.provider === 4 ? "selected" : ""}>${window.siyuan.languages.localFlieSystem}</option>
|
||||
<option value="4" ${window.siyuan.config.sync.provider === 4 ? "selected" : ""}>${window.siyuan.languages.localFileSystem}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="syncProviderPanel" class="b3-label">
|
||||
|
@ -139,25 +139,23 @@ export const appearanceMenu = (protyle: IProtyle, nodeElements?: Element[]) => {
|
||||
<button data-type="style4" class="protyle-font__style" style="text-shadow: 1px 1px var(--b3-theme-surface-lighter), 2px 2px var(--b3-theme-surface-lighter), 3px 3px var(--b3-theme-surface-lighter), 4px 4px var(--b3-theme-surface-lighter)">${window.siyuan.languages.shadow}</button>
|
||||
</div>
|
||||
<div class="fn__hr${disableFont ? " fn__none" : ""}"></div>
|
||||
<div class="${disableFont ? " fn__none" : ""}">${window.siyuan.languages.fontSize}</div>
|
||||
<div class="fn__hr--small${disableFont ? " fn__none" : ""}"></div>
|
||||
<div class="fn__flex${disableFont ? " fn__none" : ""}">
|
||||
<div class="fn__space--small"></div>
|
||||
<select class="b3-select fn__block">
|
||||
<option ${fontSize === "12px" ? "selected" : ""} value="12px">12px</option>
|
||||
<option ${fontSize === "13px" ? "selected" : ""} value="13px">13px</option>
|
||||
<option ${fontSize === "14px" ? "selected" : ""} value="14px">14px</option>
|
||||
<option ${fontSize === "15px" ? "selected" : ""} value="15px">15px</option>
|
||||
<option ${fontSize === "16px" ? "selected" : ""} value="16px">16px</option>
|
||||
<option ${fontSize === "19px" ? "selected" : ""} value="19px">19px</option>
|
||||
<option ${fontSize === "22px" ? "selected" : ""} value="22px">22px</option>
|
||||
<option ${fontSize === "24px" ? "selected" : ""} value="24px">24px</option>
|
||||
<option ${fontSize === "29px" ? "selected" : ""} value="29px">29px</option>
|
||||
<option ${fontSize === "32px" ? "selected" : ""} value="32px">32px</option>
|
||||
<option ${fontSize === "40px" ? "selected" : ""} value="40px">40px</option>
|
||||
<option ${fontSize === "48px" ? "selected" : ""} value="48px">48px</option>
|
||||
</select>
|
||||
<div class="fn__space--small"></div>
|
||||
${window.siyuan.languages.fontSize}
|
||||
<span class="fn__flex-1"></span>
|
||||
<label class="fn__flex">
|
||||
相对于编辑器字号
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" ${fontSize.endsWith("em") ? "checked" : ""} type="checkbox">
|
||||
</label>
|
||||
</div>
|
||||
<div class="${disableFont ? " fn__none" : ""}">
|
||||
<div class="fn__hr"></div>
|
||||
<div class="b3-tooltips b3-tooltips__n fn__flex${fontSize.endsWith("em") ? " fn__none" : ""}" aria-label="${fontSize}">
|
||||
<input class="b3-slider fn__block" id="fontSizePX" max="72" min="9" step="1" type="range" value="${parseInt(fontSize)}">
|
||||
</div>
|
||||
<div class="b3-tooltips b3-tooltips__n fn__flex${fontSize.endsWith("em") ? "" : " fn__none"}" aria-label="${parseInt(fontSize) * 100}%">
|
||||
<input class="b3-slider fn__block" id="fontSizeEM" max="4.5" min="0.56" step="0.01" type="range" value="${parseInt(fontSize)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="fn__hr--b"></div>
|
||||
<div class="fn__flex">
|
||||
@ -188,8 +186,38 @@ export const appearanceMenu = (protyle: IProtyle, nodeElements?: Element[]) => {
|
||||
target = target.parentElement;
|
||||
}
|
||||
});
|
||||
element.querySelector("select").addEventListener("change", function (event: Event) {
|
||||
fontEvent(protyle, nodeElements, "fontSize", (event.target as HTMLSelectElement).value);
|
||||
const switchElement = element.querySelector(".b3-switch") as HTMLInputElement;
|
||||
const fontSizePXElement = element.querySelector("#fontSizePX") as HTMLInputElement;
|
||||
const fontSizeEMElement = element.querySelector("#fontSizeEM") as HTMLInputElement;
|
||||
switchElement.addEventListener("change", function () {
|
||||
if (switchElement.checked) {
|
||||
// px -> em
|
||||
const em = parseFloat((parseInt(fontSizePXElement.value) / 16).toFixed(2));
|
||||
fontSizeEMElement.parentElement.setAttribute("aria-label", (em * 100).toString() + "%");
|
||||
fontSizeEMElement.value = em.toString();
|
||||
|
||||
fontSizePXElement.parentElement.classList.add("fn__none");
|
||||
fontSizeEMElement.parentElement.classList.remove("fn__none");
|
||||
} else {
|
||||
const px = Math.round(parseInt(fontSizeEMElement.value) * 16);
|
||||
fontSizePXElement.parentElement.setAttribute("aria-label", px + "px");
|
||||
fontSizePXElement.value = px.toString();
|
||||
|
||||
fontSizePXElement.parentElement.classList.remove("fn__none");
|
||||
fontSizeEMElement.parentElement.classList.add("fn__none");
|
||||
}
|
||||
});
|
||||
fontSizePXElement.addEventListener("change", function () {
|
||||
fontEvent(protyle, nodeElements, "fontSize", fontSizePXElement.value + "px");
|
||||
});
|
||||
fontSizeEMElement.addEventListener("change", function () {
|
||||
fontEvent(protyle, nodeElements, "fontSize", fontSizeEMElement.value + "em");
|
||||
});
|
||||
fontSizePXElement.addEventListener("input", function () {
|
||||
fontSizePXElement.parentElement.setAttribute("aria-label", fontSizePXElement.value + "px");
|
||||
});
|
||||
fontSizeEMElement.addEventListener("input", function () {
|
||||
fontSizeEMElement.parentElement.setAttribute("aria-label", (parseFloat(fontSizeEMElement.value) * 100).toFixed(0) + "%")
|
||||
});
|
||||
return element;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user