From ce9968ee73ecf29d6991a865e1f3951a634c8179 Mon Sep 17 00:00:00 2001 From: cocobo1 Date: Sun, 12 Oct 2025 22:33:15 +0200 Subject: [PATCH] fix(plugins): fix broken ui --- .../pages/Plugins/components/PluginCard.tsx | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/src/core/ui/settings/pages/Plugins/components/PluginCard.tsx b/src/core/ui/settings/pages/Plugins/components/PluginCard.tsx index db48764..e98fba6 100644 --- a/src/core/ui/settings/pages/Plugins/components/PluginCard.tsx +++ b/src/core/ui/settings/pages/Plugins/components/PluginCard.tsx @@ -153,33 +153,36 @@ export default function PluginCard({ [plugin, result], ); - return ( - - - - - - - <Authors /> - </View> - <View> - <Stack spacing={12} direction="horizontal"> - <Actions /> - <TableSwitch - value={plugin.isEnabled()} - onValueChange={(v: boolean) => { - plugin.toggle(v); - forceUpdate(); - }} - /> - </Stack> - </View> - </View> - <Description /> - </Stack> - </Card> - </CardContext.Provider> - ); + return ( + <CardContext.Provider value={cardContextValue}> + <Card> + <Stack spacing={16}> + <View style={{ flexDirection: "row", justifyContent: "space-between" }}> + <View style={{ flexShrink: 1 }}> + <Title /> + <Authors /> + </View> + <View> + <Stack spacing={12} direction="horizontal"> + <Actions /> + <View style={core ? { opacity: 0.5 } : undefined}> + <TableSwitch + value={core ? true : plugin.isEnabled()} + disabled={core} + onValueChange={(v: boolean) => { + if (!core) { + plugin.toggle(v); + forceUpdate(); + } + }} + /> + </View> + </Stack> + </View> + </View> + <Description /> + </Stack> + </Card> + </CardContext.Provider> + ); } \ No newline at end of file