diff --git a/app/src/layout/topBar.ts b/app/src/layout/topBar.ts index 3e279e2f6..626eef370 100644 --- a/app/src/layout/topBar.ts +++ b/app/src/layout/topBar.ts @@ -19,6 +19,7 @@ import {fetchPost} from "../util/fetch"; import {needSubscribe} from "../util/needSubscribe"; import * as dayjs from "dayjs"; import {commandPanel} from "../plugin/commandPanel"; +import {exportLayout} from "./util"; export const initBar = (app: App) => { const toolbarElement = document.getElementById("toolbar"); @@ -115,7 +116,12 @@ export const initBar = (app: App) => { event.stopPropagation(); break; } else if (targetId === "barExit") { - exitSiYuan(); + exportLayout({ + reload: false, + onlyData: false, + errorExit: true, + cb: exitSiYuan + }); event.stopPropagation(); break; } else if (targetId === "barMode") {