Vanessa 2025-12-27 14:26:50 +08:00
parent 1e13177aae
commit 7ac9dd519e

View file

@ -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", {