This commit is contained in:
parent
aa56c16830
commit
4312e46d27
3 changed files with 4 additions and 6 deletions
|
@ -26,7 +26,6 @@ import {initBar} from "../layout/topBar";
|
|||
import {setProxy} from "../config/util/setProxy";
|
||||
import {openChangelog} from "./openChangelog";
|
||||
import {getIdFromSYProtocol, isSYProtocol} from "../util/pathName";
|
||||
import {App} from "../index";
|
||||
|
||||
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {
|
||||
if (key1 === "general") {
|
||||
|
@ -85,7 +84,7 @@ const hasKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "edito
|
|||
return match;
|
||||
};
|
||||
|
||||
export const onGetConfig = (isStart: boolean, app:App) => {
|
||||
export const onGetConfig = (isStart: boolean) => {
|
||||
const matchKeymap1 = matchKeymap(Constants.SIYUAN_KEYMAP.general, "general");
|
||||
const matchKeymap2 = matchKeymap(Constants.SIYUAN_KEYMAP.editor.general, "editor", "general");
|
||||
const matchKeymap3 = matchKeymap(Constants.SIYUAN_KEYMAP.editor.insert, "editor", "insert");
|
||||
|
@ -141,7 +140,7 @@ export const onGetConfig = (isStart: boolean, app:App) => {
|
|||
resetLayout();
|
||||
}
|
||||
});
|
||||
initBar(app);
|
||||
initBar();
|
||||
setProxy();
|
||||
initStatus();
|
||||
initWindow();
|
||||
|
|
|
@ -171,7 +171,7 @@ export class App {
|
|||
fetchPost("/api/setting/getCloudUser", {}, userResponse => {
|
||||
window.siyuan.user = userResponse.data;
|
||||
loadPlugins(siyuanApp);
|
||||
onGetConfig(response.data.start, siyuanApp);
|
||||
onGetConfig(response.data.start);
|
||||
account.onSetaccount();
|
||||
resizeDrag();
|
||||
setTitle(window.siyuan.languages.siyuanNote);
|
||||
|
|
|
@ -9,7 +9,6 @@ import {MenuItem} from "../menus/Menu";
|
|||
import {setMode} from "../util/assets";
|
||||
import {openSetting} from "../config";
|
||||
import {openSearch} from "../search/spread";
|
||||
import {App} from "../index";
|
||||
|
||||
export const updateEditModeElement = () => {
|
||||
const target = document.querySelector("#barReadonly");
|
||||
|
@ -24,7 +23,7 @@ export const updateEditModeElement = () => {
|
|||
}
|
||||
};
|
||||
|
||||
export const initBar = (app: App) => {
|
||||
export const initBar = () => {
|
||||
const toolbarElement = document.getElementById("toolbar");
|
||||
toolbarElement.innerHTML = `
|
||||
<div id="barWorkspace" class="toolbar__item">
|
||||
|
|
Loading…
Add table
Reference in a new issue