Skip to content

Commit

Permalink
[fix] UI: Prevent multiple login requests when quickly pressing the '…
Browse files Browse the repository at this point in the history
…Enter' button several times

#392
  • Loading branch information
stenya committed Sep 3, 2024
1 parent 27d3e51 commit 3ce7bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/Component-Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default {
methods: {
async Login(isForceLogout, confirmation2FA) {
try {
// check accoundID
// check accountID
var pattern = new RegExp("^(i-....-....-....)|(ivpn[a-zA-Z0-9]{7,8})$"); // fragment locator
if (this.accountID) this.accountID = this.accountID.trim();
if (pattern.test(this.accountID) !== true) {
Expand Down Expand Up @@ -298,7 +298,7 @@ export default {
this.isForceLogoutRequested = false;
},
keyup(event) {
if (event.keyCode === 13) {
if (event.keyCode === 13 && !this.isProcessing && !this.$store.getters["account/isLoggedIn"]) {
// Cancel the default action, if needed
event.preventDefault();
this.Login();
Expand Down

0 comments on commit 3ce7bb5

Please # to comment.