Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/8390

Vanessaec622364affd
diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts
index c895ba2875..1139119919 100644
--- a/app/src/config/bazaar.ts
+++ b/app/src/config/bazaar.ts
@@ -83,6 +83,7 @@ export const bazaar = {
</div>
<div class="fn__flex-1">
<div class="config-bazaar__panel" data-type="downloaded" data-init="true">
+ <div data-type="downloaded-update"></div>
<div class="fn__flex config-bazaar__title">
<button data-type="myPlugin" class="b3-button">${window.siyuan.languages.plugin}</button>
<div class="fn__space"></div>
@@ -292,6 +293,11 @@ export const bazaar = {
</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) {
const contentElement = bazaar.element.querySelector("#configBazaarDownloaded");
if (contentElement.getAttribute("data-loading") === "true" ||
@@ -535,6 +541,7 @@ export const bazaar = {
return;
}
this._genMyHTML("plugins", app);
+ this._getUpdate();
bazaar.element.firstElementChild.addEventListener("click", (event) => {
let target = event.target as HTMLElement;
const dataElement = hasClosestByAttribute(target, "data-obj", null);