mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
merge from local
This commit is contained in:
parent
06aee646ca
commit
7619c1f4d9
2
comty.js
2
comty.js
@ -1 +1 @@
|
||||
Subproject commit 126bad9c1e21c0c7fcab60a22fc9d70bbbd9a999
|
||||
Subproject commit 4911d7b1af76b1a06c52d14151bf70f09feda030
|
@ -30,7 +30,7 @@ const phasesToSteps = {
|
||||
1: "password",
|
||||
}
|
||||
|
||||
export default class Login extends React.Component {
|
||||
class Login extends React.Component {
|
||||
static pageStatement = {
|
||||
bottomBarAllowed: false
|
||||
}
|
||||
@ -41,6 +41,7 @@ export default class Login extends React.Component {
|
||||
error: null,
|
||||
phase: 0,
|
||||
mfa_required: null,
|
||||
forbidden: false,
|
||||
}
|
||||
|
||||
formRef = React.createRef()
|
||||
@ -62,12 +63,8 @@ export default class Login extends React.Component {
|
||||
await AuthModel.login(payload, this.onDone).catch((error) => {
|
||||
if (error.response.data) {
|
||||
if (error.response.data.violation) {
|
||||
this.props.close({
|
||||
unlock: true
|
||||
})
|
||||
|
||||
return app.history.push("/violation", {
|
||||
violation: error.response.data.violation
|
||||
return this.setState({
|
||||
forbidden: error.response.data.violation
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -235,6 +232,22 @@ export default class Login extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.forbidden) {
|
||||
return <div className="login_wrapper">
|
||||
<div className="content">
|
||||
<h1>Access denied</h1>
|
||||
<h3>Your account has been disabled due a violation to our terms of service</h3>
|
||||
|
||||
<p>Here is a detailed description of the violation</p>
|
||||
|
||||
<div className="field-error">
|
||||
{this.state.forbidden.reason}
|
||||
</div>
|
||||
|
||||
<p>If you think this is an error, or you want to apeel this decision please contact our support</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
return <div className="login_wrapper">
|
||||
<div className="content">
|
||||
<h1>
|
||||
@ -346,3 +359,9 @@ export default class Login extends React.Component {
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
const ForwardedLogin = (props) => {
|
||||
return <Login {...props} />
|
||||
}
|
||||
|
||||
export default ForwardedLogin
|
Loading…
x
Reference in New Issue
Block a user