mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-11 22:51:20 +08:00
🚨
This commit is contained in:
parent
18415517bb
commit
fc08e01de2
@ -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", () => {
|
||||||
|
@ -165,7 +165,7 @@ export const exportLayout = (reload: boolean, cb?: () => void) => {
|
|||||||
} else if (cb) {
|
} else if (cb) {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
@ -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);
|
||||||
|
@ -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") {
|
||||||
|
Loading…
Reference in New Issue
Block a user