ErrorBoundary: improve icons and styles

profile-avatar-switcher
Alex Gleason 2021-10-10 02:48:35 -05:00
rodzic e19c2d8547
commit b1e10f3db2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 46 dodań i 13 usunięć

Wyświetl plik

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { captureException } from 'soapbox/monitoring';
import Icon from 'soapbox/components/icon';
export default class ErrorBoundary extends React.PureComponent {
@ -67,12 +68,14 @@ export default class ErrorBoundary extends React.PureComponent {
return (
<div className='error-boundary'>
<div>
<i className='fa fa-frown-o' aria-hidden='true' />
<Icon src={require('@tabler/icons/icons/mood-sad.svg')} className='sad-face' />
<FormattedMessage id='alert.unexpected.message' defaultMessage='An unexpected error occurred.' />
<a href='/' className='return-home'>
<i className='fa fa-reply' aria-hidden='true' />&nbsp;
<FormattedMessage id='alert.unexpected.return_home' defaultMessage='Return Home' />
</a>
<div className='return-home'>
<a a href='/'>
<Icon src={require('@tabler/icons/icons/arrow-back.svg')} />
<FormattedMessage id='alert.unexpected.return_home' defaultMessage='Return Home' />
</a>
</div>
{errorText && <textarea
ref={this.setTextareaRef}
className='error-boundary__component-stack'

Wyświetl plik

@ -5,12 +5,29 @@
text-align: center;
padding: 10px 10px 80px;
i.fa.fa-frown-o {
display: block;
text-align: center;
font-size: 70px;
margin: 20px 0;
* {
box-sizing: border-box;
}
::selection {
background-color: #000;
color: #fff;
}
.sad-face {
width: 70px;
height: 70px;
margin: 20px auto;
opacity: 0.5;
transition: 0.8s;
svg {
stroke-width: 1.5px;
}
&:hover {
transform: rotate(180deg);
}
}
a {
@ -26,10 +43,23 @@
color: var(--primary-text-color--faint);
}
a.return-home {
display: block;
.return-home {
display: flex;
margin: 15px auto;
text-align: center;
justify-content: center;
align-items: center;
a {
display: flex;
justify-content: center;
align-items: center;
}
.svg-icon {
width: 18px;
height: 18px;
margin-right: 5px;
}
}
}