mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -170,7 +170,9 @@ export const kernelError = () => {
|
||||
export const exitSiYuan = () => {
|
||||
hideAllElements(["util"]);
|
||||
/// #if MOBILE
|
||||
saveScroll(window.siyuan.mobile.editor.protyle);
|
||||
if (window.siyuan.mobile.editor) {
|
||||
saveScroll(window.siyuan.mobile.editor.protyle);
|
||||
}
|
||||
/// #endif
|
||||
fetchPost("/api/system/exit", {force: false}, (response) => {
|
||||
if (response.code === 1) { // 同步执行失败
|
||||
|
||||
@@ -20,7 +20,7 @@ import {syncGuide} from "../../sync/syncGuide";
|
||||
import {Inbox} from "../../layout/dock/Inbox";
|
||||
import {App} from "../../index";
|
||||
|
||||
export const initFramework = (app: App, isStart:boolean) => {
|
||||
export const initFramework = (app: App, isStart: boolean) => {
|
||||
setInlineStyle();
|
||||
renderSnippet();
|
||||
initKeyboardToolbar();
|
||||
|
||||
@@ -61,10 +61,12 @@ export const hideAllElements = (types: string[]) => {
|
||||
if (types.includes("util")) {
|
||||
/// #if MOBILE
|
||||
const editor = getCurrentEditor();
|
||||
editor.protyle.toolbar.subElement.classList.add("fn__none");
|
||||
if (editor.protyle.toolbar.subElementCloseCB) {
|
||||
editor.protyle.toolbar.subElementCloseCB();
|
||||
editor.protyle.toolbar.subElementCloseCB = undefined;
|
||||
if (editor) {
|
||||
editor.protyle.toolbar.subElement.classList.add("fn__none");
|
||||
if (editor.protyle.toolbar.subElementCloseCB) {
|
||||
editor.protyle.toolbar.subElementCloseCB();
|
||||
editor.protyle.toolbar.subElementCloseCB = undefined;
|
||||
}
|
||||
}
|
||||
/// #else
|
||||
getAllEditor().forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user