This commit is contained in:
parent
41e49713bd
commit
0bccdb6f29
1 changed files with 6 additions and 0 deletions
|
@ -187,6 +187,9 @@ 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]);
|
||||
|
@ -216,6 +219,9 @@ export const goBack = async () => {
|
|||
};
|
||||
|
||||
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]);
|
||||
|
|
Loading…
Add table
Reference in a new issue