Skip to content

Commit

Permalink
🎨 fix #9840
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Dec 8, 2023
1 parent e8d2355 commit 828df98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/src/layout/topBar.ts
Expand Up @@ -117,7 +117,6 @@ export const initBar = (app: App) => {
event.stopPropagation();
break;
} else if (targetId === "barExit") {
showMessage(window.siyuan.languages["_kernel"][95]);
exportLayout({
reload: false,
onlyData: false,
Expand Down
17 changes: 16 additions & 1 deletion app/src/menus/workspace.ts
Expand Up @@ -7,7 +7,7 @@ import {getOpenNotebookCount, originalPath, pathPosix, showFileInFolder} from ".
import {fetchNewDailyNote, mountHelp, newDailyNote} from "../util/mount";
import {fetchPost} from "../util/fetch";
import {Constants} from "../constants";
import {isInAndroid, isInIOS, setStorageVal, writeText} from "../protyle/util/compatibility";
import {isInAndroid, isInIOS, isIPad, setStorageVal, writeText} from "../protyle/util/compatibility";
import {openCard} from "../card/openCard";
import {openSetting} from "../config";
import {getAllDocks} from "../layout/getAll";
Expand Down Expand Up @@ -422,6 +422,21 @@ export const workspaceMenu = (app: App, rect: DOMRect) => {
}
}).element);
/// #endif
if (isIPad() || isInAndroid() || !isBrowser()) {
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.safeQuit,
icon: "iconQuit",
click: () => {
exportLayout({
reload: false,
onlyData: false,
errorExit: true,
cb: exitSiYuan
});
}
}).element);
}
window.siyuan.menus.menu.popup({x: rect.left, y: rect.bottom});
});
};
Expand Down

0 comments on commit 828df98

Please sign in to comment.