feat: make missing plugins prevent enabling the theme

This commit is contained in:
Lewis Crichton 2023-12-28 13:59:36 +00:00
parent 9b89ef58be
commit 2cafedc7e7
No known key found for this signature in database

View file

@ -129,13 +129,14 @@ function UserCSSThemeCard({ theme, enabled, onChange, onDelete }: UserCSSCardPro
author={theme.author ?? "Unknown"}
enabled={enabled}
setEnabled={onChange}
disabled={missingPlugins && missingPlugins.length > 0}
infoButton={
<>
{missingPlugins && missingPlugins.length > 0 && (
<Tooltip text={"The following plugins are required, but aren't enabled: " + missingPlugins.join(", ")}>
{({ onMouseLeave, onMouseEnter }) => (
<div
style={{ color: "var(--status-warning" }}
style={{ color: "var(--status-danger" }}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
>