mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
1a7edf3b3c
commit
3c80f47f7e
2 changed files with 12 additions and 3 deletions
|
|
@ -727,9 +727,17 @@ export const bazaar = {
|
|||
}, (response) => {
|
||||
target.removeAttribute("disabled");
|
||||
if (enabled) {
|
||||
loadPlugin(app, response.data);
|
||||
loadPlugin(app, response.data).then((plugin: Plugin) => {
|
||||
// @ts-ignore
|
||||
if (plugin.setting || plugin.__proto__.hasOwnProperty("openSetting")) {
|
||||
target.parentElement.querySelector('[data-type="setting"]').classList.remove("fn__none");
|
||||
} else {
|
||||
target.parentElement.querySelector('[data-type="setting"]').classList.add("fn__none");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uninstall(app, dataObj.name);
|
||||
target.parentElement.querySelector('[data-type="setting"]').classList.add("fn__none");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ export const loadPlugin = async (app: App, item: IPluginData) => {
|
|||
errorExit: false
|
||||
});
|
||||
/// #endif
|
||||
return plugin;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue