mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
c6319c3a0e
commit
ec622364af
1 changed files with 7 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ export const bazaar = {
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__flex-1">
|
<div class="fn__flex-1">
|
||||||
<div class="config-bazaar__panel" data-type="downloaded" data-init="true">
|
<div class="config-bazaar__panel" data-type="downloaded" data-init="true">
|
||||||
|
<div data-type="downloaded-update"></div>
|
||||||
<div class="fn__flex config-bazaar__title">
|
<div class="fn__flex config-bazaar__title">
|
||||||
<button data-type="myPlugin" class="b3-button">${window.siyuan.languages.plugin}</button>
|
<button data-type="myPlugin" class="b3-button">${window.siyuan.languages.plugin}</button>
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
|
|
@ -292,6 +293,11 @@ export const bazaar = {
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
},
|
},
|
||||||
|
_getUpdate() {
|
||||||
|
fetchPost("/api/bazaar/getUpdatedPackage", {frontend: getFrontend()}, (response) => {
|
||||||
|
this.element.querySelector('[data-type="downloaded-update"]').innerHTML = `<div class="fn__flex"></div>`
|
||||||
|
})
|
||||||
|
},
|
||||||
_genMyHTML(bazaarType: TBazaarType, app: App) {
|
_genMyHTML(bazaarType: TBazaarType, app: App) {
|
||||||
const contentElement = bazaar.element.querySelector("#configBazaarDownloaded");
|
const contentElement = bazaar.element.querySelector("#configBazaarDownloaded");
|
||||||
if (contentElement.getAttribute("data-loading") === "true" ||
|
if (contentElement.getAttribute("data-loading") === "true" ||
|
||||||
|
|
@ -535,6 +541,7 @@ export const bazaar = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._genMyHTML("plugins", app);
|
this._genMyHTML("plugins", app);
|
||||||
|
this._getUpdate();
|
||||||
bazaar.element.firstElementChild.addEventListener("click", (event) => {
|
bazaar.element.firstElementChild.addEventListener("click", (event) => {
|
||||||
let target = event.target as HTMLElement;
|
let target = event.target as HTMLElement;
|
||||||
const dataElement = hasClosestByAttribute(target, "data-obj", null);
|
const dataElement = hasClosestByAttribute(target, "data-obj", null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue