mirror of
https://gitlab.com/comunic/comunicconsole
synced 2024-12-25 13:08:52 +00:00
Show an appropriate message when a user can not sign into his account
This commit is contained in:
parent
9b0f3c1fec
commit
cc26bab72e
@ -28,7 +28,7 @@ import {
|
||||
} from "../../helpers/AccountHelper";
|
||||
import { input, matAlert } from "../widgets/DialogsProvider";
|
||||
|
||||
function ErrorGettingOptions() {
|
||||
function ErrorGettingOptions(p: { message: string }) {
|
||||
return (
|
||||
<Paper
|
||||
style={{
|
||||
@ -40,7 +40,7 @@ function ErrorGettingOptions() {
|
||||
}}
|
||||
>
|
||||
<ErrorOutline></ErrorOutline>
|
||||
Could not get your auth options!
|
||||
{p.message}
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
@ -180,7 +180,7 @@ export class LoginRoute extends React.Component<{}, LoginRouteState> {
|
||||
|
||||
{/* Login error (if any) */}
|
||||
{this.state.errorGettingAuthOptions ? (
|
||||
ErrorGettingOptions()
|
||||
<ErrorGettingOptions message="Could not get your auth options!" />
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
@ -265,6 +265,15 @@ class AuthOptionsWidget extends React.Component<
|
||||
}
|
||||
|
||||
render() {
|
||||
// Check if no option is available
|
||||
if (
|
||||
this.props.options.keys.length == 0 &&
|
||||
!this.props.options.reset_token
|
||||
)
|
||||
return (
|
||||
<ErrorGettingOptions message="You have no way to access your account right now!" />
|
||||
);
|
||||
|
||||
return (
|
||||
<Paper style={{ width: "100%", marginTop: "10px" }}>
|
||||
<List style={{ width: "100%" }}>
|
||||
|
Loading…
Reference in New Issue
Block a user