From 87d7df3ed41193dfdb57fc72ef3ee90e34fa06dc Mon Sep 17 00:00:00 2001 From: Yi Date: Wed, 8 Jan 2025 16:51:06 +0800 Subject: [PATCH] fix: make the status indicator component compatible with the switch plugin version component --- .../status-indicators.tsx | 46 +++++++++++++------ .../components/switch-plugin-version.tsx | 2 +- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx index 1c28ef3019..9f3543a475 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx @@ -45,20 +45,38 @@ const StatusIndicators = ({ needsConfiguration, modelProvider, inModelList, disa {/* plugin installed and model is in model list but disabled */} {/* plugin installed from github/local and model is not in model list */} {!needsConfiguration && modelProvider && disabled && ( - - {!pluginInfo ? : plugin.name === pluginInfo.name)?.plugin_unique_identifier ?? ''} />} - + <> + {inModelList ? ( + + + + ) : !pluginInfo ? ( + + + + ) : ( + plugin.name === pluginInfo.name)?.plugin_unique_identifier ?? ''} + /> + )} + )} {!modelProvider && !pluginInfo && ( = (props) => { } const { t } = useTranslation() return -
+
e.stopPropagation()}> {isShowUpdateModal && pluginDetail &&