mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 06:05:29 +01:00
This commit is contained in:
parent
7154879ddc
commit
806ca9f213
3 changed files with 9 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ import {fetchPost} from "../util/fetch";
|
|||
import {isMobile, isWindow} from "../util/functions";
|
||||
/// #if !MOBILE
|
||||
import {Custom} from "../layout/dock/Custom";
|
||||
import {getAllModels} from "../layout/getAll";
|
||||
import {getAllEditor, getAllModels} from "../layout/getAll";
|
||||
import {Tab} from "../layout/Tab";
|
||||
import {resizeTopBar, setPanelFocus} from "../layout/util";
|
||||
import {getDockByType} from "../layout/tabUtil";
|
||||
|
|
@ -121,6 +121,9 @@ export class Plugin {
|
|||
uninstall(this.app, this.name, false);
|
||||
loadPlugins(this.app, [this.name], false).then(() => {
|
||||
afterLoadPlugin(this);
|
||||
getAllEditor().forEach(editor => {
|
||||
editor.protyle.toolbar.update(editor.protyle);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -238,6 +238,9 @@ export const reloadPlugin = async (app: App, data: {
|
|||
app.plugins.forEach(item => {
|
||||
if (upsertCodePlugins.includes(item.name)) {
|
||||
afterLoadPlugin(item);
|
||||
getAllEditor().forEach(editor => {
|
||||
editor.protyle.toolbar.update(editor.protyle);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ export const uninstall = (app: App, name: string, isUninstall: boolean) => {
|
|||
// rm dock
|
||||
const docksKeys = Object.keys(plugin.docks);
|
||||
docksKeys.forEach(key => {
|
||||
window.siyuan.storage[Constants.LOCAL_PLUGIN_DOCKS][plugin.name][key].show =
|
||||
!!document.querySelector(`.dock__item[data-type="${key}"]`)?.classList.contains("dock__item--active");
|
||||
if (Object.keys(window.siyuan.layout.leftDock.data).includes(key)) {
|
||||
window.siyuan.layout.leftDock.remove(key);
|
||||
} else if (Object.keys(window.siyuan.layout.rightDock.data).includes(key)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue