fix(plugins): fix broken ui

This commit is contained in:
cocobo1 2025-10-12 22:33:15 +02:00
parent 677939c333
commit ce9968ee73

View file

@ -153,33 +153,36 @@ export default function PluginCard({
[plugin, result],
);
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 />
<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>
);
}