From c7d37c4e8c2c91d99a62ef7c5fba3bf3c2cbfa11 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 28 Dec 2025 16:31:54 -0500 Subject: [PATCH] feat(plugins): rename ErrorIndicator to EnabledOrErrorField and enhance error handling logic Signed-off-by: Deluan --- ui/src/plugin/PluginList.jsx | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/ui/src/plugin/PluginList.jsx b/ui/src/plugin/PluginList.jsx index 5dee41838..5c71b6c04 100644 --- a/ui/src/plugin/PluginList.jsx +++ b/ui/src/plugin/PluginList.jsx @@ -23,25 +23,25 @@ const useStyles = makeStyles((theme) => ({ }, })) -const ErrorIndicator = () => { +const EnabledOrErrorField = () => { const record = useRecordContext() const translate = useTranslate() const classes = useStyles() - if (!record.lastError) { - return null + if (record.lastError) { + return ( + + } + label={translate('resources.plugin.fields.hasError')} + className={classes.errorChip} + /> + + ) } - return ( - - } - label={translate('resources.plugin.fields.hasError')} - className={classes.errorChip} - /> - - ) + return } const useManifest = () => { @@ -96,8 +96,7 @@ const PluginList = (props) => { {!isXsmall && } - - + )}