mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30: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) {
|
||||
this.setState({loginLoading: true});
|
||||
if (this.state.loginMethod === "webAuthn") {
|
||||
let username = this.state.username;
|
||||
if (username === null || username === "") {
|
||||
@ -425,7 +426,6 @@ class LoginPage extends React.Component {
|
||||
}
|
||||
|
||||
login(values) {
|
||||
this.setState({loginLoading: true});
|
||||
// here we are supposed to determine whether Casdoor is working as an OAuth server or CAS server
|
||||
values["language"] = this.state.userLang ?? "";
|
||||
if (this.state.type === "cas") {
|
||||
@ -938,7 +938,7 @@ class LoginPage extends React.Component {
|
||||
this.login(values);
|
||||
this.setState({openCaptchaModal: false});
|
||||
}}
|
||||
onCancel={() => this.setState({openCaptchaModal: false})}
|
||||
onCancel={() => this.setState({openCaptchaModal: false, loginLoading: false})}
|
||||
isCurrentProvider={true}
|
||||
/>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user