Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/10230

Vanessa802c58df461d
diff --git a/app/src/plugin/uninstall.ts b/app/src/plugin/uninstall.ts
index 6eb45c1d03..fcc7c7ecd4 100644
--- a/app/src/plugin/uninstall.ts
+++ b/app/src/plugin/uninstall.ts
@@ -1,7 +1,9 @@
import {App} from "../index";
import {Plugin} from "../plugin";
+/// #if !MOBILE
import {getAllModels} from "../layout/getAll";
import {resizeTopBar} from "../layout/util";
+/// #endif
export const uninstall = (app: App, name: string, isUninstall = false) => {
app.plugins.find((plugin: Plugin, index) => {
@@ -16,19 +18,21 @@ export const uninstall = (app: App, name: string, isUninstall = false) => {
console.error(`plugin ${plugin.name} onunload error:`, e);
}
// rm tab
+ /// #if !MOBILE
const modelsKeys = Object.keys(plugin.models);
getAllModels().custom.forEach(custom => {
if (modelsKeys.includes(custom.type)) {
custom.parent.parent.removeTab(custom.parent.id);
}
});
+ /// #endif
// rm topBar
plugin.topBarIcons.forEach(item => {
item.remove();
});
+ /// #if !MOBILE
resizeTopBar();
// rm statusBar
- /// #if !MOBILE
plugin.statusBarIcons.forEach(item => {
item.remove();
});