mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-23 08:43:50 +02:00
Fix asking for primary password when not enabled
This commit is contained in:
@@ -5582,6 +5582,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.relogin = function (loginParmas) {
|
$app.methods.relogin = function (loginParmas) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
if (this.enablePrimaryPassword) {
|
||||||
this.checkPrimaryPassword(loginParmas)
|
this.checkPrimaryPassword(loginParmas)
|
||||||
.then((pwd) => {
|
.then((pwd) => {
|
||||||
this.loginForm.loading = true;
|
this.loginForm.loading = true;
|
||||||
@@ -5614,6 +5615,28 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
reject(_);
|
reject(_);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
API.getConfig()
|
||||||
|
.catch((err) => {
|
||||||
|
this.loginForm.loading = false;
|
||||||
|
reject(err);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
API.login({
|
||||||
|
username: loginParmas.username,
|
||||||
|
password: loginParmas.password
|
||||||
|
})
|
||||||
|
.catch((err2) => {
|
||||||
|
this.loginForm.loading = false;
|
||||||
|
API.logout();
|
||||||
|
reject(err2);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.loginForm.loading = false;
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5637,9 +5660,6 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
|
|
||||||
API.$on('AUTOLOGIN', function () {
|
API.$on('AUTOLOGIN', function () {
|
||||||
if ($app.enablePrimaryPassword) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var user =
|
var user =
|
||||||
$app.loginForm.savedCredentials[$app.loginForm.lastUserLoggedIn];
|
$app.loginForm.savedCredentials[$app.loginForm.lastUserLoggedIn];
|
||||||
if (typeof user !== 'undefined') {
|
if (typeof user !== 'undefined') {
|
||||||
|
|||||||
Reference in New Issue
Block a user