mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 00:38:36 +00:00
fix: avoid multi-clicks when perform oauth2 login (#6467)
This commit is contained in:
@@ -2980,3 +2980,17 @@ function cancelCodeComment(btn) {
|
||||
form.closest('.comment-code-cloud').remove()
|
||||
}
|
||||
}
|
||||
function onOAuthLoginClick() {
|
||||
var oauthLoader = $('#oauth2-login-loader');
|
||||
var oauthNav = $('#oauth2-login-navigator');
|
||||
|
||||
oauthNav.hide();
|
||||
oauthLoader.removeClass('disabled');
|
||||
|
||||
setTimeout(function(){
|
||||
// recover previous content to let user try again
|
||||
// usually redirection will be performed before this action
|
||||
oauthLoader.addClass('disabled');
|
||||
oauthNav.show();
|
||||
},5000);
|
||||
}
|
||||
|
Reference in New Issue
Block a user