mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
This commit is contained in:
parent
3cc93f2425
commit
22565b9006
12 changed files with 84 additions and 216 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import {fetchPost} from "../../util/fetch";
|
||||
import {genLangOptions, genOptions} from "../../util/genOptions";
|
||||
import {openModel} from "../menu/model";
|
||||
import {reloadOtherWindow} from "../../dialog/processSystem";
|
||||
|
||||
export const initAppearance = () => {
|
||||
openModel({
|
||||
|
|
@ -55,10 +54,7 @@ export const initAppearance = () => {
|
|||
themeDark: (modelMainElement.querySelector("#themeDark") as HTMLSelectElement).value,
|
||||
themeLight: (modelMainElement.querySelector("#themeLight") as HTMLSelectElement).value,
|
||||
lang: (modelMainElement.querySelector("#lang") as HTMLSelectElement).value,
|
||||
}), () => {
|
||||
reloadOtherWindow();
|
||||
window.location.reload();
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,17 @@ import {reloadPlugin} from "../../plugin/loader";
|
|||
import {reloadEmoji} from "../../emoji";
|
||||
import {setLocalShorthandCount} from "../../util/noRelyPCFunction";
|
||||
import {updateControlAlt} from "../../protyle/util/hotKey";
|
||||
import {renderSnippet} from "../../config/util/snippets";
|
||||
|
||||
export const onMessage = (app: App, data: IWebSocketData) => {
|
||||
if (data) {
|
||||
switch (data.cmd) {
|
||||
case "setAppearance":
|
||||
window.location.reload();
|
||||
break;
|
||||
case "setSnippet":
|
||||
renderSnippet();
|
||||
break;
|
||||
case "setDefRefCount":
|
||||
setDefRefCount(data.data);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue