Warn users on unsupported browsers before they lack features (#12830)

* Warn users on unsupported browsers before they lack features

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update Learn more link

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add comments

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-07-29 17:05:34 +01:00 committed by GitHub
parent 96777f84b5
commit a12c1874f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 299 additions and 19 deletions

View file

@ -32,6 +32,7 @@ import DialogButtons from "../elements/DialogButtons";
import { sendSentryReport } from "../../../sentry";
import defaultDispatcher from "../../../dispatcher/dispatcher";
import { Action } from "../../../dispatcher/actions";
import { getBrowserSupport } from "../../../SupportedBrowser";
interface IProps {
onFinished: (success: boolean) => void;
@ -206,7 +207,10 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
}
let warning: JSX.Element | undefined;
if (window.Modernizr && Object.values(window.Modernizr).some((support) => support === false)) {
if (
(window.Modernizr && Object.values(window.Modernizr).some((support) => support === false)) ||
!getBrowserSupport()
) {
warning = (
<p>
<b>{_t("bug_reporting|unsupported_browser")}</b>