Skip to content

Commit

Permalink
update blur checkbox (disabled state)
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Nov 27, 2024
1 parent 748f8fc commit 312cb38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion locales/en-GB/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,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",
Expand Down
30 changes: 14 additions & 16 deletions src/settings/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit 312cb38

Please sign in to comment.