mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
Logout instead of retry login with Primary Password
This commit is contained in:
+1
-34
@@ -5971,38 +5971,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.enablePrimaryPassword) {
|
if (this.enablePrimaryPassword) {
|
||||||
this.checkPrimaryPassword(loginParmas)
|
API.logout();
|
||||||
.then((pwd) => {
|
|
||||||
this.loginForm.loading = true;
|
|
||||||
return API.getConfig()
|
|
||||||
.catch((err) => {
|
|
||||||
this.loginForm.loading = false;
|
|
||||||
reject(err);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
API.login({
|
|
||||||
username: loginParmas.username,
|
|
||||||
password: pwd,
|
|
||||||
cipher: loginParmas.password
|
|
||||||
})
|
|
||||||
.catch((err2) => {
|
|
||||||
this.loginForm.loading = false;
|
|
||||||
API.logout();
|
|
||||||
reject(err2);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.loginForm.loading = false;
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((_) => {
|
|
||||||
this.$message({
|
|
||||||
message: 'Incorrect primary password',
|
|
||||||
type: 'error'
|
|
||||||
});
|
|
||||||
reject(_);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
API.getConfig()
|
API.getConfig()
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -6017,11 +5986,9 @@ speechSynthesis.getVoices();
|
|||||||
.catch((err2) => {
|
.catch((err2) => {
|
||||||
this.loginForm.loading = false;
|
this.loginForm.loading = false;
|
||||||
API.logout();
|
API.logout();
|
||||||
reject(err2);
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.loginForm.loading = false;
|
this.loginForm.loading = false;
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1132,7 +1132,7 @@ html
|
|||||||
div.options-container
|
div.options-container
|
||||||
span.header Application
|
span.header Application
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Use a Primary Password
|
span.name(style="min-width:236px") Encrypt password (disables auto login)
|
||||||
el-switch(v-model="enablePrimaryPassword" @change="enablePrimaryPasswordChange" :disabled="!loginForm.savedCredentials[API.currentUser.username]")
|
el-switch(v-model="enablePrimaryPassword" @change="enablePrimaryPasswordChange" :disabled="!loginForm.savedCredentials[API.currentUser.username]")
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Start at Windows startup
|
span.name Start at Windows startup
|
||||||
|
|||||||
Reference in New Issue
Block a user