fix(plugins): fix broken ui
This commit is contained in:
parent
677939c333
commit
ce9968ee73
1 changed files with 32 additions and 29 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue