update blur checkbox (disabled state)

This commit is contained in:
Timo
2024-11-27 18:18:50 +01:00
committed by Hugh Nimmo-Smith
parent d23beefb60
commit 95bc7db28a
2 changed files with 15 additions and 17 deletions

View File

@@ -152,7 +152,7 @@
},
"background_blur_header": "Background",
"background_blur_label": "Enable background blurring",
"blur_not_supported_by_browser": "",
"blur_not_supported_by_browser": "(Background blur is not supported by this browser.)",
"developer_settings_label": "Developer Settings",
"developer_settings_label_description": "Expose developer settings in the settings window.",
"developer_tab_title": "Developer",

View File

@@ -91,29 +91,27 @@ export const SettingsModal: FC<Props> = ({
e,
);
canBlur = false;
setBlur(false);
}
return canBlur ? (
return (
<>
<h4>{t("settings.background_blur_header")}</h4>
<FieldRow>
<Tooltip
label={
isFirefox() ? t("settings.blur_not_supported_by_browser") : ""
<InputField
id="activateBackgroundBlur"
label={t("settings.background_blur_label")}
description={
canBlur ? "" : t("settings.blur_not_supported_by_browser")
}
>
<InputField
id="activateBackgroundBlur"
label={t("settings.background_blur_label")}
description={t("settings.video_tab_activate_background_blur")}
type="checkbox"
checked={blur}
onChange={(b): void => setBlur(b.target.checked)}
disabled={isFirefox()}
/>
</Tooltip>
type="checkbox"
checked={blur}
onChange={(b): void => setBlur(b.target.checked)}
disabled={!canBlur}
/>
</FieldRow>
</>
) : null;
);
};
const optInDescription = (