mirror of
https://gitlab.com/comunic/comunicconsole
synced 2024-11-23 13:59:23 +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";
|
} from "../../helpers/AccountHelper";
|
||||||
import { input, matAlert } from "../widgets/DialogsProvider";
|
import { input, matAlert } from "../widgets/DialogsProvider";
|
||||||
|
|
||||||
function ErrorGettingOptions() {
|
function ErrorGettingOptions(p: { message: string }) {
|
||||||
return (
|
return (
|
||||||
<Paper
|
<Paper
|
||||||
style={{
|
style={{
|
||||||
@ -40,7 +40,7 @@ function ErrorGettingOptions() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ErrorOutline></ErrorOutline>
|
<ErrorOutline></ErrorOutline>
|
||||||
Could not get your auth options!
|
{p.message}
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ export class LoginRoute extends React.Component<{}, LoginRouteState> {
|
|||||||
|
|
||||||
{/* Login error (if any) */}
|
{/* Login error (if any) */}
|
||||||
{this.state.errorGettingAuthOptions ? (
|
{this.state.errorGettingAuthOptions ? (
|
||||||
ErrorGettingOptions()
|
<ErrorGettingOptions message="Could not get your auth options!" />
|
||||||
) : (
|
) : (
|
||||||
<div></div>
|
<div></div>
|
||||||
)}
|
)}
|
||||||
@ -265,6 +265,15 @@ class AuthOptionsWidget extends React.Component<
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
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 (
|
return (
|
||||||
<Paper style={{ width: "100%", marginTop: "10px" }}>
|
<Paper style={{ width: "100%", marginTop: "10px" }}>
|
||||||
<List style={{ width: "100%" }}>
|
<List style={{ width: "100%" }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user