update plugin_scan message and styling
Alessandro committed
Mar 18, 2026 at 17:08 UTC
661ec6b5484db03d368ed1a286a9b60420332cd3
3 files changed
+20
-25
plugins/_plugin_installer/webui/pluginInstallStore.js
+2
-7
@@ -14,13 +14,8 @@ const PER_PAGE = 20;
14
const SECURITY_WARNING = {
15
title: "Security Warning",
16
message: `
17
- <p><strong>Plugins from third parties can be a great risk, keep in mind that:</strong></p>
18
- <ul style="margin: 0.75em 0; padding-left: 1.5em;">
19
- <li>You can be hacked the moment you install it</li>
20
- <li>We can not prevent it or help you</li>
21
- <li>It is your responsibility</li>
22
- </ul>
23
- <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>
17
+ <p><strong>Third-party plugins may contain malicious code.</strong> <br> We can't guarantee their safety — install at your own risk.</p>
18
+ <p style="margin-top: 0.75em;">We recommend scanning all plugins with A0 first.</p>
19
`,
20
type: "warning",
21
confirmText: "Install Anyway",
plugins/_plugin_scan/extensions/webui/confirm_dialog_after_render/add-plugin-hub-scan-action.js
+9
-14
@@ -1,6 +1,6 @@
1
import { store as pluginScanStore } from "../../../webui/plugin-scan-store.js";
2
3
-const NOTE_CLASS = "confirm-dialog-extension-note";
3
+const INSTALL_BUTTON_CLASS = "confirm-dialog-install-button";
4
const BUTTON_CLASS = "confirm-dialog-plugin-scan-button";
5
const DIALOG_CLOSE_DELAY_MS = 220;
6
@@ -17,24 +17,19 @@ export default async function addPluginHubScanAction(context) {
17
const extensionContext = context?.extensionContext;
18
if (!isPluginHubInstallWarning(extensionContext)) return;
19
20
- const bodyElement = context?.bodyElement;
20
const footerElement = context?.footerElement;
22
- const cancelButton = context?.cancelButton;
23
- if (!bodyElement || !footerElement || !cancelButton) return;
24
-
25
- if (!bodyElement.querySelector(`.${NOTE_CLASS}`)) {
26
- const note = document.createElement("p");
27
- note.className = NOTE_CLASS;
28
- note.textContent = "A0 Plugin Scanner can identify most threats. It is always recommended to scan all plugins and updates with A0 itself.";
29
- bodyElement.appendChild(note);
30
- }
21
+ const confirmButton = context?.confirmButton;
22
+ if (!footerElement || !confirmButton) return;
23
24
if (footerElement.querySelector(`.${BUTTON_CLASS}`)) return;
25
26
+ confirmButton.classList.remove("confirm");
27
+ confirmButton.classList.add(INSTALL_BUTTON_CLASS);
28
+
29
const scanButton = document.createElement("button");
30
scanButton.type = "button";
36
- scanButton.className = `button ${BUTTON_CLASS}`;
37
- scanButton.textContent = "Scan with A0";
31
+ scanButton.className = `button confirm ${BUTTON_CLASS}`;
32
+ scanButton.textContent = "Scan with Agent Zero";
33
scanButton.addEventListener("click", (event) => {
34
event.preventDefault();
35
event.stopPropagation();
@@ -44,5 +39,5 @@ export default async function addPluginHubScanAction(context) {
39
}, DIALOG_CLOSE_DELAY_MS);
40
});
41
47
- footerElement.insertBefore(scanButton, cancelButton);
42
+ footerElement.appendChild(scanButton);
43
}
webui/css/modals.css
+9
-4
@@ -589,10 +589,6 @@ input[type="range"]::-moz-range-thumb {
589
margin: 0;
590
}
591
592
-.confirm-dialog-body .confirm-dialog-extension-note {
593
- margin-top: 0.75em;
594
-}
595
-
592
.confirm-dialog-footer {
593
display: flex;
594
justify-content: flex-end;
@@ -600,3 +596,12 @@ input[type="range"]::-moz-range-thumb {
596
padding: 1em 1.25em;
597
border-top: 1px solid var(--color-border);
598
}
599
+
600
+.confirm-dialog-footer .confirm-dialog-install-button {
601
+ padding-inline: 1.1rem;
602
+}
603
+
604
+.confirm-dialog-footer .confirm-dialog-plugin-scan-button {
605
+ padding-inline: 1.65rem;
606
+ font-size: 1rem;
607
+}