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

Vanessa7ac9dd519e25
diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts
index 82bba14e4c..5734ed897b 100644
--- a/app/src/config/bazaar.ts
+++ b/app/src/config/bazaar.ts
@@ -449,7 +449,7 @@ export const bazaar = {
</span>
<span class="fn__space${bazaarType === "plugins" ? "" : " fn__none"}"></span>
<span class="fn__space${bazaarType === "plugins" ? "" : " fn__none"}"></span>
- <input class="b3-switch fn__flex-center${bazaarType === "plugins" ? "" : " fn__none"}" ${item.enabled ? "checked" : ""} data-type="plugin-enable" type="checkbox" ${item.incompatible ? " disabled" : ""}>
+ <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">
</div>
</div>`;
});
@@ -880,7 +880,7 @@ export const bazaar = {
event.stopPropagation();
break;
} else if (type === "plugin-enable") {
- if (!target.getAttribute("disabled")) {
+ if (!target.hasAttribute("disabled")) {
target.setAttribute("disabled", "disabled");
const enabled = (target as HTMLInputElement).checked;
fetchPost("/api/petal/setPetalEnabled", {