2020-01-16 02:09:53 +05:30
|
|
|
|
import React, { ComponentType } from 'react';
|
2016-11-12 05:03:12 +05:30
|
|
|
|
import { FormattedMessage as Message } from 'react-intl';
|
2020-01-16 02:09:53 +05:30
|
|
|
|
|
2020-06-04 22:11:27 +05:30
|
|
|
|
import appName from 'app/components/auth/appInfo/appName.intl';
|
2016-11-12 05:03:12 +05:30
|
|
|
|
|
2017-08-10 00:11:35 +05:30
|
|
|
|
import BoxesField from './BoxesField';
|
2020-01-16 02:09:53 +05:30
|
|
|
|
|
|
|
|
|
import styles from './styles.scss';
|
2016-11-12 05:03:12 +05:30
|
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
|
interface State {
|
2020-05-24 04:38:24 +05:30
|
|
|
|
lastEventId?: string | void;
|
2019-12-07 16:58:52 +05:30
|
|
|
|
}
|
|
|
|
|
|
2020-01-16 02:09:53 +05:30
|
|
|
|
interface Props {
|
2020-05-24 04:38:24 +05:30
|
|
|
|
lastEventId?: string;
|
2020-01-16 02:09:53 +05:30
|
|
|
|
}
|
2018-05-02 23:52:13 +05:30
|
|
|
|
|
2020-01-16 02:09:53 +05:30
|
|
|
|
// TODO: probably it's better to render this view from the App view
|
|
|
|
|
// to remove dependencies from the store and IntlProvider
|
|
|
|
|
const BSoD: ComponentType<Props> = ({ lastEventId }) => {
|
2020-05-24 04:38:24 +05:30
|
|
|
|
let emailUrl = 'mailto:support@ely.by';
|
|
|
|
|
|
|
|
|
|
if (lastEventId) {
|
|
|
|
|
emailUrl += `?subject=Bug report for #${lastEventId}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className={styles.body}>
|
|
|
|
|
<canvas className={styles.canvas} ref={(el: HTMLCanvasElement | null) => el && new BoxesField(el)} />
|
|
|
|
|
|
|
|
|
|
<div className={styles.wrapper}>
|
|
|
|
|
<div className={styles.title}>
|
2020-06-04 22:11:27 +05:30
|
|
|
|
<Message {...appName} />
|
2020-05-24 04:38:24 +05:30
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.lineWithMargin}>
|
2020-06-04 22:11:27 +05:30
|
|
|
|
<Message
|
|
|
|
|
key="criticalErrorHappened"
|
|
|
|
|
defaultMessage="There was a critical error due to which the application can not continue its normal operation."
|
|
|
|
|
/>
|
2020-05-24 04:38:24 +05:30
|
|
|
|
</div>
|
|
|
|
|
<div className={styles.line}>
|
2020-06-04 22:11:27 +05:30
|
|
|
|
<Message
|
|
|
|
|
key="reloadPageOrContactUs"
|
|
|
|
|
defaultMessage="Please reload this page and try again. If problem occurs again, please report it to the developers by sending email to"
|
|
|
|
|
/>
|
2020-05-24 04:38:24 +05:30
|
|
|
|
</div>
|
|
|
|
|
<a href={emailUrl} className={styles.support}>
|
|
|
|
|
support@ely.by
|
|
|
|
|
</a>
|
|
|
|
|
<div className={styles.easterEgg}>
|
2020-06-04 22:11:27 +05:30
|
|
|
|
<Message
|
|
|
|
|
key="alsoYouCanInteractWithBackground"
|
|
|
|
|
defaultMessage="You can also play around with the background – it's interactable ;)"
|
|
|
|
|
/>
|
2020-05-24 04:38:24 +05:30
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-01-16 02:09:53 +05:30
|
|
|
|
</div>
|
2020-05-24 04:38:24 +05:30
|
|
|
|
);
|
2020-01-16 02:09:53 +05:30
|
|
|
|
};
|
2019-12-07 16:58:52 +05:30
|
|
|
|
|
|
|
|
|
export default BSoD;
|