This commit is contained in:
Vanessa 2022-10-30 09:52:18 +08:00
parent 18415517bb
commit fc08e01de2
5 changed files with 7 additions and 8 deletions

View File

@ -217,7 +217,7 @@ export const appearance = {
openColorPicker(); openColorPicker();
}); });
appearance.element.querySelector("#resetLayout").addEventListener("click", () => { appearance.element.querySelector("#resetLayout").addEventListener("click", () => {
resetLayout() resetLayout();
}); });
/// #if !BROWSER /// #if !BROWSER
appearance.element.querySelector("#appearanceOpenIcon").addEventListener("click", () => { appearance.element.querySelector("#appearanceOpenIcon").addEventListener("click", () => {

View File

@ -165,7 +165,7 @@ export const exportLayout = (reload: boolean, cb?: () => void) => {
} else if (cb) { } else if (cb) {
cb(); cb();
} }
}) });
}); });
}; };

View File

@ -137,12 +137,12 @@ export const setLocalStorage = () => {
fetchPost("/api/system/getLocalStorage", undefined, (response) => { fetchPost("/api/system/getLocalStorage", undefined, (response) => {
Object.keys(response.data).forEach(item => { Object.keys(response.data).forEach(item => {
window.localStorage.setItem(item, response.data[item]); window.localStorage.setItem(item, response.data[item]);
}) });
}); });
} };
export const exportLocalStorage = (cb: () => void) => { export const exportLocalStorage = (cb: () => void) => {
fetchPost("/api/system/setLocalStorage", {val: JSON.stringify(localStorage)}, (response) => { fetchPost("/api/system/setLocalStorage", {val: JSON.stringify(localStorage)}, () => {
cb(); cb();
}); });
} };

View File

@ -152,7 +152,7 @@ export const addGA = () => {
} }
}); });
} }
} };
export const setInlineStyle = (set = true) => { export const setInlineStyle = (set = true) => {
const height = Math.floor(window.siyuan.config.editor.fontSize * 1.625); const height = Math.floor(window.siyuan.config.editor.fontSize * 1.625);

View File

@ -30,7 +30,6 @@ import {showMessage} from "../dialog/message";
import {replaceLocalPath} from "../editor/rename"; import {replaceLocalPath} from "../editor/rename";
import {editor} from "../config/editor"; import {editor} from "../config/editor";
import {goBack, goForward} from "./backForward"; import {goBack, goForward} from "./backForward";
import {addScript} from "../protyle/util/addScript";
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => { const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {
if (key1 === "general") { if (key1 === "general") {