mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
This commit is contained in:
parent
0580fc9f51
commit
3653445abc
1 changed files with 13 additions and 2 deletions
|
|
@ -25,7 +25,8 @@ import {getAllTabs} from "./layout/getAll";
|
|||
import {getLocalStorage} from "./protyle/util/compatibility";
|
||||
import {getSearch} from "./util/functions";
|
||||
import {hideAllElements} from "./protyle/ui/hideElements";
|
||||
import {loadPlugins} from "./plugin/loader";
|
||||
import {afterLoadPlugin, loadPlugins} from "./plugin/loader";
|
||||
import {uninstall} from "./plugin/uninstall";
|
||||
import "./assets/scss/base.scss";
|
||||
|
||||
export class App {
|
||||
|
|
@ -59,6 +60,16 @@ export class App {
|
|||
});
|
||||
if (data) {
|
||||
switch (data.cmd) {
|
||||
case "reloadPlugin":
|
||||
this.plugins.forEach((plugin) => {
|
||||
uninstall(this, plugin.name);
|
||||
});
|
||||
loadPlugins(this).then(() => {
|
||||
this.plugins.forEach(item => {
|
||||
afterLoadPlugin(item);
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "syncMergeResult":
|
||||
reloadSync(this, data.data);
|
||||
break;
|
||||
|
|
@ -151,7 +162,7 @@ export class App {
|
|||
window.siyuan.config = response.data.conf;
|
||||
await loadPlugins(this);
|
||||
getLocalStorage(() => {
|
||||
fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages:IObject) => {
|
||||
fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => {
|
||||
window.siyuan.languages = lauguages;
|
||||
window.siyuan.menus = new Menus(this);
|
||||
bootSync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue