Vanessa 2022-10-14 17:09:26 +08:00
parent 6afa1fc1ec
commit aac6ddc1f9
8 changed files with 1 additions and 47 deletions

View file

@ -218,8 +218,6 @@
"changeIcon": "Change icon",
"includeSubFile": "\nInclude x subfiles",
"untitled": "Untitled",
"goForward": "Go forward",
"goBack": "Go back",
"lockScreen": "Lock Screen",
"cloudIntro1": "End-to-end encrypted data synchronization",
"cloudIntro2": "The encryption and decryption process is completely performed on the local device",

View file

@ -218,8 +218,6 @@
"changeIcon": "Cambiar el icono",
"includeSubFile": "\nIncluir x subfichas",
"untitled": "Sin título",
"goForward": "Ir hacia adelante",
"goBack": "Ir hacia atrás",
"lockScreen": "Pantalla de bloqueo",
"cloudIntro1": "Sincronización de datos cifrada de extremo a extremo",
"cloudIntro2": "El proceso de cifrado y descifrado se realiza completamente en el dispositivo local",

View file

@ -218,8 +218,6 @@
"changeIcon": "Changer l'icône",
"includeSubFile": "\nInclure x sous-fichiers",
"untitled": "Sans titre",
"goForward": "Suivant",
"goBack": "Retour",
"lockScreen": "Verrouiller Écran",
"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",

View file

@ -218,8 +218,6 @@
"changeIcon": "修改圖示",
"includeSubFile": "\n包含 x 個子文檔",
"untitled": "新文檔",
"goForward": "前進",
"goBack": "後退",
"lockScreen": "鎖定畫面",
"cloudIntro1": "端到端加密資料同步",
"cloudIntro2": "加密和解密過程完全在本地設備上進行",

View file

@ -218,8 +218,6 @@
"changeIcon": "修改图标",
"includeSubFile": "\n包含 x 个子文档",
"untitled": "新文档",
"goForward": "前进",
"goBack": "后退",
"lockScreen": "锁屏",
"cloudIntro1": "端到端加密数据同步",
"cloudIntro2": "加密和解密过程完全在本地设备上进行",

View file

@ -21,7 +21,6 @@ body {
&.body--win32 {
-webkit-font-smoothing: auto;
border: 1px solid var(--b3-border-color);
.toolbar {
padding-left: 0;

View file

@ -181,16 +181,12 @@ const focusStack = async (stack: IBackStack) => {
};
export const goBack = async () => {
if (document.querySelector("#barBack").classList.contains("toolbar__item--disabled")) {
return;
}
if (window.siyuan.backStack.length === 0) {
if (forwardStack.length > 0) {
await focusStack(forwardStack[forwardStack.length - 1]);
}
return;
}
document.querySelector("#barForward").classList.remove("toolbar__item--disabled");
if (!previousIsBack) {
forwardStack.push(window.siyuan.backStack.pop());
@ -205,24 +201,16 @@ export const goBack = async () => {
stack = window.siyuan.backStack.pop();
}
}
if (window.siyuan.backStack.length === 0) {
document.querySelector("#barBack").classList.add("toolbar__item--disabled");
}
previousIsBack = true;
};
export const goForward = async () => {
if (document.querySelector("#barForward").classList.contains("toolbar__item--disabled")) {
return;
}
if (forwardStack.length === 0) {
if (window.siyuan.backStack.length > 0) {
await focusStack(window.siyuan.backStack[window.siyuan.backStack.length - 1]);
}
return;
}
document.querySelector("#barBack").classList.remove("toolbar__item--disabled");
if (previousIsBack) {
window.siyuan.backStack.push(forwardStack.pop());
}
@ -237,10 +225,6 @@ export const goForward = async () => {
stack = forwardStack.pop();
}
}
if (forwardStack.length === 0) {
document.querySelector("#barForward").classList.add("toolbar__item--disabled");
}
previousIsBack = false;
};
@ -273,7 +257,6 @@ export const pushBack = (protyle: IProtyle, range?: Range, blockElement?: Elemen
window.siyuan.backStack.push(forwardStack.pop());
}
forwardStack = [];
document.querySelector("#barForward").classList.add("toolbar__item--disabled");
}
window.siyuan.backStack.push({
position,
@ -286,9 +269,5 @@ export const pushBack = (protyle: IProtyle, range?: Range, blockElement?: Elemen
}
previousIsBack = false;
}
if (window.siyuan.backStack.length > 1) {
document.querySelector("#barBack").classList.remove("toolbar__item--disabled");
}
}
};

View file

@ -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" : ""}">
<svg><use xlink:href="#iconCalendar"></use></svg>
</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 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>
@ -194,11 +188,7 @@ const initBar = () => {
document.querySelector(".toolbar").addEventListener("click", (event: MouseEvent) => {
let target = event.target as HTMLElement;
while (!target.classList.contains("toolbar")) {
if (target.id === "barBack") {
goBack();
event.stopPropagation();
break;
} else if (target.id === "barSync") {
if (target.id === "barSync") {
syncGuide(target);
event.stopPropagation();
break;
@ -235,10 +225,6 @@ const initBar = () => {
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 8});
event.stopPropagation();
break;
} else if (target.id === "barForward") {
goForward();
event.stopPropagation();
break;
} else if (target.id === "barHistory") {
openHistory();
event.stopPropagation();