feat: make missing plugins prevent enabling the theme
This commit is contained in:
parent
9b89ef58be
commit
2cafedc7e7
|
@ -129,13 +129,14 @@ function UserCSSThemeCard({ theme, enabled, onChange, onDelete }: UserCSSCardPro
|
||||||
author={theme.author ?? "Unknown"}
|
author={theme.author ?? "Unknown"}
|
||||||
enabled={enabled}
|
enabled={enabled}
|
||||||
setEnabled={onChange}
|
setEnabled={onChange}
|
||||||
|
disabled={missingPlugins && missingPlugins.length > 0}
|
||||||
infoButton={
|
infoButton={
|
||||||
<>
|
<>
|
||||||
{missingPlugins && missingPlugins.length > 0 && (
|
{missingPlugins && missingPlugins.length > 0 && (
|
||||||
<Tooltip text={"The following plugins are required, but aren't enabled: " + missingPlugins.join(", ")}>
|
<Tooltip text={"The following plugins are required, but aren't enabled: " + missingPlugins.join(", ")}>
|
||||||
{({ onMouseLeave, onMouseEnter }) => (
|
{({ onMouseLeave, onMouseEnter }) => (
|
||||||
<div
|
<div
|
||||||
style={{ color: "var(--status-warning" }}
|
style={{ color: "var(--status-danger" }}
|
||||||
onMouseEnter={onMouseEnter}
|
onMouseEnter={onMouseEnter}
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue