Skip to content

Agent Zero AI framework

remove redundant x-destroy attributes in plugin-related HTML files

Alessandroabdb354d2638
diff --git a/plugins/_plugin_installer/webui/install-detail.html b/plugins/_plugin_installer/webui/install-detail.html
index 7c136af1d..ffd8d9066 100644
--- a/plugins/_plugin_installer/webui/install-detail.html
+++ b/plugins/_plugin_installer/webui/install-detail.html
@@ -8,8 +8,7 @@
<body>
<div x-data>
<template x-if="$store.pluginInstallStore?.selectedPlugin">
- <div class="pi-detail-container"
- x-destroy="$store.pluginInstallStore.refreshPluginList()">
+ <div class="pi-detail-container">
<div class="pi-hero">
<div class="pi-hero-thumb">
<template x-if="$store.pluginInstallStore.getDetailThumbnailUrl()">
diff --git a/plugins/_plugin_installer/webui/main.html b/plugins/_plugin_installer/webui/main.html
index 0b88c8f90..c352e8d1c 100644
--- a/plugins/_plugin_installer/webui/main.html
+++ b/plugins/_plugin_installer/webui/main.html
@@ -10,8 +10,7 @@
<body>
<div x-data>
<template x-if="$store.pluginInstallStore">
- <div x-create="$store.pluginInstallStore.setTab('store')"
- x-destroy="$store.pluginInstallStore.refreshPluginList()">
+ <div x-create="$store.pluginInstallStore.setTab('store')">
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
diff --git a/plugins/_plugin_installer/webui/pluginInstallStore.js b/plugins/_plugin_installer/webui/pluginInstallStore.js
index eab4dcf44..141962db5 100644
--- a/plugins/_plugin_installer/webui/pluginInstallStore.js
+++ b/plugins/_plugin_installer/webui/pluginInstallStore.js
@@ -730,7 +730,8 @@ const model = {
/** Refresh related list views after installer/detail actions. */
refreshPluginList() {
- if (pluginListStore.activeTab === "marketplace") {
+ const marketplaceActive = pluginListStore.activeTab === "marketplace";
+ if (marketplaceActive) {
void this.fetchIndex();
}
pluginListStore.refresh();
diff --git a/webui/components/plugins/plugin-settings.html b/webui/components/plugins/plugin-settings.html
index d6c446334..cfedaea7e 100644
--- a/webui/components/plugins/plugin-settings.html
+++ b/webui/components/plugins/plugin-settings.html
@@ -18,7 +18,7 @@
<template x-if="context">
<div>
<div x-create="context.onModalOpen(); (() => { const modal = $el.closest('.modal'); if (modal) modal.__pluginSettingsContext = context; })()"
- x-destroy="context.cleanup(); $store.pluginListStore?.refresh()">
+ x-destroy="context.cleanup()">
<!-- Context toolbar: Project + Agent profile (only when at least one scope is configurable) -->
<div class="plugin-settings-scope-section"
diff --git a/webui/components/plugins/toggle/plugin-toggle-advanced.html b/webui/components/plugins/toggle/plugin-toggle-advanced.html
index 64ae95b05..697bac68e 100644
--- a/webui/components/plugins/toggle/plugin-toggle-advanced.html
+++ b/webui/components/plugins/toggle/plugin-toggle-advanced.html
@@ -8,8 +8,7 @@
<body>
<div x-data>
<template x-if="$store.pluginToggle">
- <div x-create="$store.pluginToggle.open($store.pluginListStore?.selectedPlugin || '')"
- x-destroy="$store.pluginToggle.cleanup(); $store.pluginListStore?.refresh()">
+ <div x-create="$store.pluginToggle.open($store.pluginListStore?.selectedPlugin || '')">
<!-- Error -->
<div x-show="$store.pluginToggle.error" class="plugin-settings-error">