Fix preferences warnings
parent
9ce3545901
commit
365a0b2832
|
@ -11,14 +11,14 @@ const PrefRow = styled("div")`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
> :first-child {
|
> div:first-of-type {
|
||||||
flex: 1 0 40%;
|
flex: 1 0 40%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: ${(props) => (props.alignTop ? "normal" : "center")};
|
justify-content: ${(props) => (props.alignTop ? "normal" : "center")};
|
||||||
}
|
}
|
||||||
|
|
||||||
> :last-child {
|
> div:last-of-type {
|
||||||
flex: 1 0 calc(60% - 50px);
|
flex: 1 0 calc(60% - 50px);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -29,12 +29,12 @@ const PrefRow = styled("div")`
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
||||||
> :first-child,
|
> :div:first-of-type,
|
||||||
> :last-child {
|
> :div:last-of-type {
|
||||||
flex: unset;
|
flex: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
> :last-child {
|
> div:last-of-type {
|
||||||
.MuiFormControl-root {
|
.MuiFormControl-root {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,7 +241,7 @@ const DeleteAfter = () => {
|
||||||
const Theme = () => {
|
const Theme = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const labelId = "prefTheme";
|
const labelId = "prefTheme";
|
||||||
const enabled = useLiveQuery(async () => prefs.theme());
|
const theme = useLiveQuery(async () => prefs.theme());
|
||||||
const handleChange = async (ev) => {
|
const handleChange = async (ev) => {
|
||||||
await prefs.setTheme(ev.target.value);
|
await prefs.setTheme(ev.target.value);
|
||||||
};
|
};
|
||||||
|
@ -249,7 +249,7 @@ const Theme = () => {
|
||||||
return (
|
return (
|
||||||
<Pref labelId={labelId} title={t("prefs_appearance_theme_title")}>
|
<Pref labelId={labelId} title={t("prefs_appearance_theme_title")}>
|
||||||
<FormControl fullWidth variant="standard" sx={{ m: 1 }}>
|
<FormControl fullWidth variant="standard" sx={{ m: 1 }}>
|
||||||
<Select value={enabled ?? false} onChange={handleChange} aria-labelledby={labelId}>
|
<Select value={theme ?? THEME.SYSTEM} onChange={handleChange} aria-labelledby={labelId}>
|
||||||
<MenuItem value={THEME.SYSTEM}>{t("prefs_appearance_theme_system")}</MenuItem>
|
<MenuItem value={THEME.SYSTEM}>{t("prefs_appearance_theme_system")}</MenuItem>
|
||||||
<MenuItem value={THEME.DARK}>{t("prefs_appearance_theme_dark")}</MenuItem>
|
<MenuItem value={THEME.DARK}>{t("prefs_appearance_theme_dark")}</MenuItem>
|
||||||
<MenuItem value={THEME.LIGHT}>{t("prefs_appearance_theme_light")}</MenuItem>
|
<MenuItem value={THEME.LIGHT}>{t("prefs_appearance_theme_light")}</MenuItem>
|
||||||
|
|
Loading…
Reference in New Issue