mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Update plugin validation state on plugin state change
This commit is contained in:
@@ -30,11 +30,10 @@ export function PluginManagementCard({plugin}: { plugin: PluginDto }) {
|
||||
const [configValidationResult, setConfigValidationResult] = useState<PluginConfigValidationResult | undefined>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
PluginEndpoint.validatePluginConfig(plugin.id).then((response: PluginConfigValidationResult | undefined) => {
|
||||
if (response === undefined) return;
|
||||
PluginEndpoint.validatePluginConfig(plugin.id).then((response: PluginConfigValidationResult) => {
|
||||
setConfigValidationResult(response);
|
||||
});
|
||||
}, [pluginDetailsModal.isOpen]);
|
||||
}, [pluginDetailsModal.isOpen, plugin.state]);
|
||||
|
||||
function borderColor(state: PluginState | undefined, trustLevel: PluginTrustLevel | undefined): "success" | "warning" | "danger" | "default" {
|
||||
if (trustLevel === PluginTrustLevel.UNTRUSTED) return "danger";
|
||||
|
||||
Reference in New Issue
Block a user