mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
4dc2f984cf
commit
1f1db0c37e
6 changed files with 18 additions and 9 deletions
|
|
@ -649,16 +649,20 @@ export const bazaar = {
|
|||
bazaar._onBazaar(response, bazaarType, ["themes", "icons"].includes(bazaarType));
|
||||
bazaar._genMyHTML(bazaarType, app);
|
||||
if (bazaarType === "plugins") {
|
||||
confirmDialog(window.siyuan.languages.confirm, window.siyuan.languages.enablePluginTip, () => {
|
||||
fetchPost("/api/petal/setPetalEnabled", {
|
||||
packageName: dataObj.name,
|
||||
enabled: true,
|
||||
frontend: getFrontend()
|
||||
}, (response) => {
|
||||
loadPlugin(app, response.data);
|
||||
bazaar._genMyHTML(bazaarType, app);
|
||||
if (window.siyuan.config.bazaar.petalDisabled) {
|
||||
confirmDialog(window.siyuan.languages.confirm, window.siyuan.languages.enablePluginTip2);
|
||||
} else {
|
||||
confirmDialog(window.siyuan.languages.confirm, window.siyuan.languages.enablePluginTip, () => {
|
||||
fetchPost("/api/petal/setPetalEnabled", {
|
||||
packageName: dataObj.name,
|
||||
enabled: true,
|
||||
frontend: getFrontend()
|
||||
}, (response) => {
|
||||
loadPlugin(app, response.data);
|
||||
bazaar._genMyHTML(bazaarType, app);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue