mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
feat: set button to loading status immediately after click (#3696)
This commit is contained in:
@ -366,6 +366,7 @@ class LoginPage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFinish(values) {
|
onFinish(values) {
|
||||||
|
this.setState({loginLoading: true});
|
||||||
if (this.state.loginMethod === "webAuthn") {
|
if (this.state.loginMethod === "webAuthn") {
|
||||||
let username = this.state.username;
|
let username = this.state.username;
|
||||||
if (username === null || username === "") {
|
if (username === null || username === "") {
|
||||||
@ -425,7 +426,6 @@ class LoginPage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
login(values) {
|
login(values) {
|
||||||
this.setState({loginLoading: true});
|
|
||||||
// here we are supposed to determine whether Casdoor is working as an OAuth server or CAS server
|
// here we are supposed to determine whether Casdoor is working as an OAuth server or CAS server
|
||||||
values["language"] = this.state.userLang ?? "";
|
values["language"] = this.state.userLang ?? "";
|
||||||
if (this.state.type === "cas") {
|
if (this.state.type === "cas") {
|
||||||
@ -938,7 +938,7 @@ class LoginPage extends React.Component {
|
|||||||
this.login(values);
|
this.login(values);
|
||||||
this.setState({openCaptchaModal: false});
|
this.setState({openCaptchaModal: false});
|
||||||
}}
|
}}
|
||||||
onCancel={() => this.setState({openCaptchaModal: false})}
|
onCancel={() => this.setState({openCaptchaModal: false, loginLoading: false})}
|
||||||
isCurrentProvider={true}
|
isCurrentProvider={true}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user