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/16688

Vanessa3a334d3402ee
diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts
index 5734ed897b..32034ce574 100644
--- a/app/src/config/bazaar.ts
+++ b/app/src/config/bazaar.ts
@@ -449,7 +449,13 @@ export const bazaar = {
</span>
<span class="fn__space${bazaarType === "plugins" ? "" : " fn__none"}"></span>
<span class="fn__space${bazaarType === "plugins" ? "" : " fn__none"}"></span>
- <input ${(item.disallowInstall && !item.enabled || item.incompatible) ? "disabled" : ""} aria-label="${(item.disallowInstall && !item.enabled) ? window.siyuan.languages.bazaarNeedVersion.replace("${x}", item.minAppVersion) : ""}" class="b3-tooltips b3-tooltips__nw b3-switch fn__flex-center${bazaarType === "plugins" ? "" : " fn__none"}" ${item.enabled ? "checked" : ""} data-type="plugin-enable" type="checkbox">
+ <input ${((item.disallowInstall && !item.enabled) || item.incompatible) ? "disabled" : ""}
+aria-label="${(item.disallowInstall && !item.enabled) ? window.siyuan.languages.bazaarNeedVersion.replace("${x}", item.minAppVersion) : ""}"
+data-position="north" class="ariaLabel b3-switch fn__flex-center${bazaarType === "plugins" ? "" : " fn__none"}"
+${item.enabled ? "checked" : ""}
+data-type="plugin-enable"
+data-disabletip="${item.disallowInstall ? window.siyuan.languages.bazaarNeedVersion.replace("${x}", item.minAppVersion) : ""}"
+type="checkbox">
</div>
</div>`;
});
@@ -902,6 +908,11 @@ export const bazaar = {
} else {
uninstall(app, dataObj.name, true);
target.parentElement.querySelector('[data-type="setting"]').classList.add("fn__none");
+ const disableTip = target.getAttribute("data-disabletip");
+ if (disableTip) {
+ target.setAttribute("disabled", "disabled");
+ target.setAttribute("aria-label", disableTip);
+ }
}
});
}