mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
6afa1fc1ec
commit
aac6ddc1f9
8 changed files with 1 additions and 47 deletions
|
|
@ -218,8 +218,6 @@
|
||||||
"changeIcon": "Change icon",
|
"changeIcon": "Change icon",
|
||||||
"includeSubFile": "\nInclude x subfiles",
|
"includeSubFile": "\nInclude x subfiles",
|
||||||
"untitled": "Untitled",
|
"untitled": "Untitled",
|
||||||
"goForward": "Go forward",
|
|
||||||
"goBack": "Go back",
|
|
||||||
"lockScreen": "Lock Screen",
|
"lockScreen": "Lock Screen",
|
||||||
"cloudIntro1": "End-to-end encrypted data synchronization",
|
"cloudIntro1": "End-to-end encrypted data synchronization",
|
||||||
"cloudIntro2": "The encryption and decryption process is completely performed on the local device",
|
"cloudIntro2": "The encryption and decryption process is completely performed on the local device",
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,6 @@
|
||||||
"changeIcon": "Cambiar el icono",
|
"changeIcon": "Cambiar el icono",
|
||||||
"includeSubFile": "\nIncluir x subfichas",
|
"includeSubFile": "\nIncluir x subfichas",
|
||||||
"untitled": "Sin título",
|
"untitled": "Sin título",
|
||||||
"goForward": "Ir hacia adelante",
|
|
||||||
"goBack": "Ir hacia atrás",
|
|
||||||
"lockScreen": "Pantalla de bloqueo",
|
"lockScreen": "Pantalla de bloqueo",
|
||||||
"cloudIntro1": "Sincronización de datos cifrada de extremo a extremo",
|
"cloudIntro1": "Sincronización de datos cifrada de extremo a extremo",
|
||||||
"cloudIntro2": "El proceso de cifrado y descifrado se realiza completamente en el dispositivo local",
|
"cloudIntro2": "El proceso de cifrado y descifrado se realiza completamente en el dispositivo local",
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,6 @@
|
||||||
"changeIcon": "Changer l'icône",
|
"changeIcon": "Changer l'icône",
|
||||||
"includeSubFile": "\nInclure x sous-fichiers",
|
"includeSubFile": "\nInclure x sous-fichiers",
|
||||||
"untitled": "Sans titre",
|
"untitled": "Sans titre",
|
||||||
"goForward": "Suivant",
|
|
||||||
"goBack": "Retour",
|
|
||||||
"lockScreen": "Verrouiller Écran",
|
"lockScreen": "Verrouiller Écran",
|
||||||
"cloudIntro1": "Synchronisation des données cryptées de bout en bout",
|
"cloudIntro1": "Synchronisation des données cryptées de bout en bout",
|
||||||
"cloudIntro2": "Le processus de cryptage et de décryptage est entièrement réalisé sur le dispositif local",
|
"cloudIntro2": "Le processus de cryptage et de décryptage est entièrement réalisé sur le dispositif local",
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,6 @@
|
||||||
"changeIcon": "修改圖示",
|
"changeIcon": "修改圖示",
|
||||||
"includeSubFile": "\n包含 x 個子文檔",
|
"includeSubFile": "\n包含 x 個子文檔",
|
||||||
"untitled": "新文檔",
|
"untitled": "新文檔",
|
||||||
"goForward": "前進",
|
|
||||||
"goBack": "後退",
|
|
||||||
"lockScreen": "鎖定畫面",
|
"lockScreen": "鎖定畫面",
|
||||||
"cloudIntro1": "端到端加密資料同步",
|
"cloudIntro1": "端到端加密資料同步",
|
||||||
"cloudIntro2": "加密和解密過程完全在本地設備上進行",
|
"cloudIntro2": "加密和解密過程完全在本地設備上進行",
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,6 @@
|
||||||
"changeIcon": "修改图标",
|
"changeIcon": "修改图标",
|
||||||
"includeSubFile": "\n包含 x 个子文档",
|
"includeSubFile": "\n包含 x 个子文档",
|
||||||
"untitled": "新文档",
|
"untitled": "新文档",
|
||||||
"goForward": "前进",
|
|
||||||
"goBack": "后退",
|
|
||||||
"lockScreen": "锁屏",
|
"lockScreen": "锁屏",
|
||||||
"cloudIntro1": "端到端加密数据同步",
|
"cloudIntro1": "端到端加密数据同步",
|
||||||
"cloudIntro2": "加密和解密过程完全在本地设备上进行",
|
"cloudIntro2": "加密和解密过程完全在本地设备上进行",
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ body {
|
||||||
|
|
||||||
&.body--win32 {
|
&.body--win32 {
|
||||||
-webkit-font-smoothing: auto;
|
-webkit-font-smoothing: auto;
|
||||||
border: 1px solid var(--b3-border-color);
|
|
||||||
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
|
||||||
|
|
@ -181,16 +181,12 @@ const focusStack = async (stack: IBackStack) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const goBack = async () => {
|
export const goBack = async () => {
|
||||||
if (document.querySelector("#barBack").classList.contains("toolbar__item--disabled")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (window.siyuan.backStack.length === 0) {
|
if (window.siyuan.backStack.length === 0) {
|
||||||
if (forwardStack.length > 0) {
|
if (forwardStack.length > 0) {
|
||||||
await focusStack(forwardStack[forwardStack.length - 1]);
|
await focusStack(forwardStack[forwardStack.length - 1]);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.querySelector("#barForward").classList.remove("toolbar__item--disabled");
|
|
||||||
|
|
||||||
if (!previousIsBack) {
|
if (!previousIsBack) {
|
||||||
forwardStack.push(window.siyuan.backStack.pop());
|
forwardStack.push(window.siyuan.backStack.pop());
|
||||||
|
|
@ -205,24 +201,16 @@ export const goBack = async () => {
|
||||||
stack = window.siyuan.backStack.pop();
|
stack = window.siyuan.backStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.siyuan.backStack.length === 0) {
|
|
||||||
document.querySelector("#barBack").classList.add("toolbar__item--disabled");
|
|
||||||
}
|
|
||||||
previousIsBack = true;
|
previousIsBack = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const goForward = async () => {
|
export const goForward = async () => {
|
||||||
if (document.querySelector("#barForward").classList.contains("toolbar__item--disabled")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (forwardStack.length === 0) {
|
if (forwardStack.length === 0) {
|
||||||
if (window.siyuan.backStack.length > 0) {
|
if (window.siyuan.backStack.length > 0) {
|
||||||
await focusStack(window.siyuan.backStack[window.siyuan.backStack.length - 1]);
|
await focusStack(window.siyuan.backStack[window.siyuan.backStack.length - 1]);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.querySelector("#barBack").classList.remove("toolbar__item--disabled");
|
|
||||||
if (previousIsBack) {
|
if (previousIsBack) {
|
||||||
window.siyuan.backStack.push(forwardStack.pop());
|
window.siyuan.backStack.push(forwardStack.pop());
|
||||||
}
|
}
|
||||||
|
|
@ -237,10 +225,6 @@ export const goForward = async () => {
|
||||||
stack = forwardStack.pop();
|
stack = forwardStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forwardStack.length === 0) {
|
|
||||||
document.querySelector("#barForward").classList.add("toolbar__item--disabled");
|
|
||||||
}
|
|
||||||
previousIsBack = false;
|
previousIsBack = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -273,7 +257,6 @@ export const pushBack = (protyle: IProtyle, range?: Range, blockElement?: Elemen
|
||||||
window.siyuan.backStack.push(forwardStack.pop());
|
window.siyuan.backStack.push(forwardStack.pop());
|
||||||
}
|
}
|
||||||
forwardStack = [];
|
forwardStack = [];
|
||||||
document.querySelector("#barForward").classList.add("toolbar__item--disabled");
|
|
||||||
}
|
}
|
||||||
window.siyuan.backStack.push({
|
window.siyuan.backStack.push({
|
||||||
position,
|
position,
|
||||||
|
|
@ -286,9 +269,5 @@ export const pushBack = (protyle: IProtyle, range?: Range, blockElement?: Elemen
|
||||||
}
|
}
|
||||||
previousIsBack = false;
|
previousIsBack = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.siyuan.backStack.length > 1) {
|
|
||||||
document.querySelector("#barBack").classList.remove("toolbar__item--disabled");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -171,12 +171,6 @@ const initBar = () => {
|
||||||
<div id="barDailyNote" data-menu="true" aria-label="${window.siyuan.languages.dailyNote} ${updateHotkeyTip(window.siyuan.config.keymap.general.dailyNote.custom)}" class="toolbar__item b3-tooltips b3-tooltips__se${window.siyuan.config.readonly ? " fn__none" : ""}">
|
<div id="barDailyNote" data-menu="true" aria-label="${window.siyuan.languages.dailyNote} ${updateHotkeyTip(window.siyuan.config.keymap.general.dailyNote.custom)}" class="toolbar__item b3-tooltips b3-tooltips__se${window.siyuan.config.readonly ? " fn__none" : ""}">
|
||||||
<svg><use xlink:href="#iconCalendar"></use></svg>
|
<svg><use xlink:href="#iconCalendar"></use></svg>
|
||||||
</div>
|
</div>
|
||||||
<button id="barBack" data-menu="true" class="toolbar__item toolbar__item--disabled b3-tooltips b3-tooltips__se" aria-label="${window.siyuan.languages.goBack} ${updateHotkeyTip(window.siyuan.config.keymap.general.goBack.custom)}">
|
|
||||||
<svg><use xlink:href="#iconLeft"></use></svg>
|
|
||||||
</button>
|
|
||||||
<button id="barForward" data-menu="true" class="toolbar__item toolbar__item--disabled b3-tooltips b3-tooltips__se" aria-label="${window.siyuan.languages.goForward} ${updateHotkeyTip(window.siyuan.config.keymap.general.goForward.custom)}">
|
|
||||||
<svg><use xlink:href="#iconRight"></use></svg>
|
|
||||||
</button>
|
|
||||||
<div class="fn__flex-1 fn__ellipsis" id="drag"><span class="fn__none">开发版,使用前请进行备份 Development version, please backup before use</span></div>
|
<div class="fn__flex-1 fn__ellipsis" id="drag"><span class="fn__none">开发版,使用前请进行备份 Development version, please backup before use</span></div>
|
||||||
<div id="barSearch" class="toolbar__item b3-tooltips b3-tooltips__se" aria-label="${window.siyuan.languages.globalSearch} ${updateHotkeyTip(window.siyuan.config.keymap.general.globalSearch.custom)}">
|
<div id="barSearch" class="toolbar__item b3-tooltips b3-tooltips__se" aria-label="${window.siyuan.languages.globalSearch} ${updateHotkeyTip(window.siyuan.config.keymap.general.globalSearch.custom)}">
|
||||||
<svg><use xlink:href="#iconSearch"></use></svg>
|
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||||
|
|
@ -194,11 +188,7 @@ const initBar = () => {
|
||||||
document.querySelector(".toolbar").addEventListener("click", (event: MouseEvent) => {
|
document.querySelector(".toolbar").addEventListener("click", (event: MouseEvent) => {
|
||||||
let target = event.target as HTMLElement;
|
let target = event.target as HTMLElement;
|
||||||
while (!target.classList.contains("toolbar")) {
|
while (!target.classList.contains("toolbar")) {
|
||||||
if (target.id === "barBack") {
|
if (target.id === "barSync") {
|
||||||
goBack();
|
|
||||||
event.stopPropagation();
|
|
||||||
break;
|
|
||||||
} else if (target.id === "barSync") {
|
|
||||||
syncGuide(target);
|
syncGuide(target);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
|
|
@ -235,10 +225,6 @@ const initBar = () => {
|
||||||
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 8});
|
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 8});
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
} else if (target.id === "barForward") {
|
|
||||||
goForward();
|
|
||||||
event.stopPropagation();
|
|
||||||
break;
|
|
||||||
} else if (target.id === "barHistory") {
|
} else if (target.id === "barHistory") {
|
||||||
openHistory();
|
openHistory();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue