mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
bb49855133
commit
6930d48446
4 changed files with 9 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import {showMessage} from "../dialog/message";
|
||||||
import {fetchPost} from "../util/fetch";
|
import {fetchPost} from "../util/fetch";
|
||||||
import {confirmDialog} from "../dialog/confirmDialog";
|
import {confirmDialog} from "../dialog/confirmDialog";
|
||||||
import {highlightRender} from "../protyle/render/highlightRender";
|
import {highlightRender} from "../protyle/render/highlightRender";
|
||||||
import {exportLayout} from "../layout/util";
|
import {exportLayout, saveLayout} from "../layout/util";
|
||||||
import {Constants} from "../constants";
|
import {Constants} from "../constants";
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
import {shell} from "electron";
|
import {shell} from "electron";
|
||||||
|
|
@ -813,6 +813,7 @@ export const bazaar = {
|
||||||
afterLoadPlugin(item);
|
afterLoadPlugin(item);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
saveLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -485,6 +485,7 @@ export const JSONToLayout = (app: App, isStart: boolean) => {
|
||||||
app.plugins.forEach(item => {
|
app.plugins.forEach(item => {
|
||||||
afterLoadPlugin(item);
|
afterLoadPlugin(item);
|
||||||
});
|
});
|
||||||
|
saveLayout();
|
||||||
resizeTopBar();
|
resizeTopBar();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import {MenuItem} from "./Menu";
|
import {MenuItem} from "./Menu";
|
||||||
|
import {saveLayout} from "../layout/util";
|
||||||
|
|
||||||
const moveMenuItem = (label: string, target: Element) => {
|
const moveMenuItem = (label: string, target: Element) => {
|
||||||
return new MenuItem({
|
return new MenuItem({
|
||||||
|
|
@ -12,6 +13,7 @@ const moveMenuItem = (label: string, target: Element) => {
|
||||||
} else if (label.indexOf("moveToBottom") > -1) {
|
} else if (label.indexOf("moveToBottom") > -1) {
|
||||||
window.siyuan.layout.bottomDock.add(label.endsWith("Left") ? 0 : 1, target);
|
window.siyuan.layout.bottomDock.add(label.endsWith("Left") ? 0 : 1, target);
|
||||||
}
|
}
|
||||||
|
saveLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ export const loadPlugin = async (app: App, item: IPluginData) => {
|
||||||
styleElement.textContent = item.css;
|
styleElement.textContent = item.css;
|
||||||
document.head.append(styleElement);
|
document.head.append(styleElement);
|
||||||
afterLoadPlugin(plugin);
|
afterLoadPlugin(plugin);
|
||||||
|
saveLayout();
|
||||||
return plugin;
|
return plugin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -229,7 +230,6 @@ export const afterLoadPlugin = (plugin: Plugin) => {
|
||||||
}], dock.config.position === "RightBottom" ? 1 : 0, dock.config.index);
|
}], dock.config.position === "RightBottom" ? 1 : 0, dock.config.index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
saveLayout();
|
|
||||||
/// #endif
|
/// #endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -242,4 +242,7 @@ export const reloadPlugin = (app: App) => {
|
||||||
afterLoadPlugin(item);
|
afterLoadPlugin(item);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
/// #if !MOBILE
|
||||||
|
saveLayout();
|
||||||
|
/// #endif
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue