Vanessa 2025-11-23 18:47:47 +08:00
parent 3cc93f2425
commit 22565b9006
12 changed files with 84 additions and 216 deletions

View file

@ -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();
});
}));
});
});
}

View file

@ -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;