mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
better error messages for the loading-screen (#87)
better error messages for the loading-screen Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
68790dbe1b
commit
dbc592e6d7
6 changed files with 36 additions and 14 deletions
|
@ -3,18 +3,25 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|||
import { Alert } from 'react-bootstrap'
|
||||
|
||||
export interface LoadingScreenProps {
|
||||
failed: boolean
|
||||
failedTitle: string
|
||||
}
|
||||
|
||||
export const LoadingScreen: React.FC<LoadingScreenProps> = ({ failed }) => {
|
||||
export const LoadingScreen: React.FC<LoadingScreenProps> = ({ failedTitle }) => {
|
||||
return (
|
||||
<div className="loader middle">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="file-alt" size="6x"
|
||||
className={failed ? 'animation-shake' : 'animation-pulse'}/>
|
||||
className={failedTitle ? 'animation-shake' : 'animation-pulse'}/>
|
||||
</div>
|
||||
{
|
||||
failed ? <Alert variant={'danger'}>An error occurred while loading the application!</Alert> : null
|
||||
failedTitle !== ''
|
||||
? (
|
||||
<Alert variant={'danger'}>
|
||||
The task '{failedTitle}' failed.<br/>
|
||||
For further information look into the browser console.
|
||||
</Alert>
|
||||
)
|
||||
: null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue