Fix #274. Add re-login button to error page.
This commit is contained in:
parent
dced0fa5c1
commit
0a88e9606e
3 changed files with 25 additions and 1 deletions
|
@ -161,6 +161,8 @@
|
|||
"ViewTitle.untitled-board": "Untitled board",
|
||||
"Workspace.editing-board-template": "You're editing a board template",
|
||||
"default-properties.title": "Title",
|
||||
"error.no-workspace": "Your session may have expired or you may not have access to this workspace.",
|
||||
"error.relogin": "Log in again",
|
||||
"login.log-in-button": "Log in",
|
||||
"login.log-in-title": "Log in",
|
||||
"login.register-button": "or create an account if you don't have one",
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
|
||||
> .Button {
|
||||
margin-top: 10px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 20px;
|
||||
min-height: 38px;
|
||||
min-width: 250px;
|
||||
|
|
|
@ -1,13 +1,35 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import React from 'react'
|
||||
import {FormattedMessage} from 'react-intl'
|
||||
|
||||
import octoClient from '../octoClient'
|
||||
import Button from '../widgets/buttons/button'
|
||||
import './errorPage.scss'
|
||||
|
||||
const ErrorPage = React.memo(() => {
|
||||
return (
|
||||
<div className='ErrorPage'>
|
||||
<div className='title'>{'Error'}</div>
|
||||
<div>
|
||||
<FormattedMessage
|
||||
id='error.no-workspace'
|
||||
defaultMessage='Your session may have expired or you may not have access to this workspace.'
|
||||
/>
|
||||
</div>
|
||||
<br/>
|
||||
<Button
|
||||
filled={true}
|
||||
onClick={() => {
|
||||
octoClient.logout()
|
||||
window.location.href = '/login'
|
||||
}}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='error.relogin'
|
||||
defaultMessage='Log in again'
|
||||
/>
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue