Agent Zero AI framework
update plugin_scan message and styling
Alessandro661ec6b5484d
diff --git a/plugins/_plugin_installer/webui/pluginInstallStore.js b/plugins/_plugin_installer/webui/pluginInstallStore.jsindex 18ce84971..058e31b8d 100644--- a/plugins/_plugin_installer/webui/pluginInstallStore.js+++ b/plugins/_plugin_installer/webui/pluginInstallStore.js@@ -14,13 +14,8 @@ const PER_PAGE = 20;const SECURITY_WARNING = {title: "Security Warning",message: `- <p><strong>Plugins from third parties can be a great risk, keep in mind that:</strong></p>- <ul style="margin: 0.75em 0; padding-left: 1.5em;">- <li>You can be hacked the moment you install it</li>- <li>We can not prevent it or help you</li>- <li>It is your responsibility</li>- </ul>- <p style="margin-top: 0.75em;">We can never fully guarantee that plugins are safe because there are many ways to obfuscate malicious code.</p>+ <p><strong>Third-party plugins may contain malicious code.</strong> <br> We can't guarantee their safety — install at your own risk.</p>+ <p style="margin-top: 0.75em;">We recommend scanning all plugins with A0 first.</p>`,type: "warning",confirmText: "Install Anyway",diff --git a/plugins/_plugin_scan/extensions/webui/confirm_dialog_after_render/add-plugin-hub-scan-action.js b/plugins/_plugin_scan/extensions/webui/confirm_dialog_after_render/add-plugin-hub-scan-action.jsindex e8ff64e90..f4717951e 100644--- a/plugins/_plugin_scan/extensions/webui/confirm_dialog_after_render/add-plugin-hub-scan-action.js+++ b/plugins/_plugin_scan/extensions/webui/confirm_dialog_after_render/add-plugin-hub-scan-action.js@@ -1,6 +1,6 @@import { store as pluginScanStore } from "../../../webui/plugin-scan-store.js";-const NOTE_CLASS = "confirm-dialog-extension-note";+const INSTALL_BUTTON_CLASS = "confirm-dialog-install-button";const BUTTON_CLASS = "confirm-dialog-plugin-scan-button";const DIALOG_CLOSE_DELAY_MS = 220;@@ -17,24 +17,19 @@ export default async function addPluginHubScanAction(context) {const extensionContext = context?.extensionContext;if (!isPluginHubInstallWarning(extensionContext)) return;- const bodyElement = context?.bodyElement;const footerElement = context?.footerElement;- const cancelButton = context?.cancelButton;- if (!bodyElement || !footerElement || !cancelButton) return;-- if (!bodyElement.querySelector(`.${NOTE_CLASS}`)) {- const note = document.createElement("p");- note.className = NOTE_CLASS;- note.textContent = "A0 Plugin Scanner can identify most threats. It is always recommended to scan all plugins and updates with A0 itself.";- bodyElement.appendChild(note);- }+ const confirmButton = context?.confirmButton;+ if (!footerElement || !confirmButton) return;if (footerElement.querySelector(`.${BUTTON_CLASS}`)) return;+ confirmButton.classList.remove("confirm");+ confirmButton.classList.add(INSTALL_BUTTON_CLASS);+const scanButton = document.createElement("button");scanButton.type = "button";- scanButton.className = `button ${BUTTON_CLASS}`;- scanButton.textContent = "Scan with A0";+ scanButton.className = `button confirm ${BUTTON_CLASS}`;+ scanButton.textContent = "Scan with Agent Zero";scanButton.addEventListener("click", (event) => {event.preventDefault();event.stopPropagation();@@ -44,5 +39,5 @@ export default async function addPluginHubScanAction(context) {}, DIALOG_CLOSE_DELAY_MS);});- footerElement.insertBefore(scanButton, cancelButton);+ footerElement.appendChild(scanButton);}diff --git a/webui/css/modals.css b/webui/css/modals.cssindex 465c430cc..399da184b 100644--- a/webui/css/modals.css+++ b/webui/css/modals.css@@ -589,10 +589,6 @@ input[type="range"]::-moz-range-thumb {margin: 0;}-.confirm-dialog-body .confirm-dialog-extension-note {- margin-top: 0.75em;-}-.confirm-dialog-footer {display: flex;justify-content: flex-end;@@ -600,3 +596,12 @@ input[type="range"]::-moz-range-thumb {padding: 1em 1.25em;border-top: 1px solid var(--color-border);}++.confirm-dialog-footer .confirm-dialog-install-button {+ padding-inline: 1.1rem;+}++.confirm-dialog-footer .confirm-dialog-plugin-scan-button {+ padding-inline: 1.65rem;+ font-size: 1rem;+}