diff --git a/html/src/app.js b/html/src/app.js
index b593ed08..d00945f8 100644
--- a/html/src/app.js
+++ b/html/src/app.js
@@ -5976,16 +5976,48 @@ speechSynthesis.getVoices();
} else {
API.endpointDomain = API.endpointDomainVrchat;
}
- if (this.enablePrimaryPassword) {
- API.logout();
- } else {
- API.getConfig()
- .catch((err) => {
- this.loginForm.loading = false;
- throw err;
- })
- .then(() => {
- API.login({
+ return new Promise((resolve, reject) => {
+ if (this.enablePrimaryPassword) {
+ this.checkPrimaryPassword(loginParmas)
+ .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 {
+ API.getConfig()
+ .catch((err) => {
+ this.loginForm.loading = false;
+ reject(err);
+ })
+ .then(() => {
+ API.login({
username: loginParmas.username,
password: loginParmas.password,
endpoint: loginParmas.endpoint
@@ -5993,12 +6025,14 @@ speechSynthesis.getVoices();
.catch(() => {
this.loginForm.loading = false;
API.logout();
- })
- .then(() => {
- this.loginForm.loading = false;
- });
- });
- }
+ })
+ .then(() => {
+ this.loginForm.loading = false;
+ resolve();
+ });
+ });
+ }
+ });
};
$app.methods.deleteSavedLogin = function (username) {
@@ -6024,12 +6058,16 @@ speechSynthesis.getVoices();
var user =
$app.loginForm.savedCredentials[$app.loginForm.lastUserLoggedIn];
if (typeof user !== 'undefined') {
- $app.relogin(user).then(() => {
- new Noty({
- type: 'success',
- text: 'Automatically logged in.'
- }).show();
- });
+ if ($app.enablePrimaryPassword) {
+ this.logout();
+ } else {
+ $app.relogin(user).then(() => {
+ new Noty({
+ type: 'success',
+ text: 'Automatically logged in.'
+ }).show();
+ });
+ }
}
});
diff --git a/html/src/vr.js b/html/src/vr.js
index 3032a0ad..8d6f0138 100644
--- a/html/src/vr.js
+++ b/html/src/vr.js
@@ -77,7 +77,7 @@ Vue.component('marquee-text', MarqueeText);
Vue.component('location', {
template:
- '{{ text }}',
+ '{{ text }}',
props: {
location: String,
hint: {
@@ -88,7 +88,8 @@ Vue.component('marquee-text', MarqueeText);
data() {
return {
text: this.location,
- region: this.region
+ region: this.region,
+ strict: this.strict
};
},
methods: {
@@ -129,6 +130,7 @@ Vue.component('marquee-text', MarqueeText);
this.region = 'flag-icon-usw';
}
}
+ this.strict = L.strict;
}
},
watch: {
@@ -216,7 +218,8 @@ Vue.component('marquee-text', MarqueeText);
hiddenId: null,
privateId: null,
friendsId: null,
- canRequestInvite: false
+ canRequestInvite: false,
+ strict: false
};
if (_tag === 'offline') {
ctx.isOffline = true;
@@ -243,6 +246,8 @@ Vue.component('marquee-text', MarqueeText);
ctx.canRequestInvite = true;
} else if (key === 'region') {
ctx.region = value;
+ } else if (key === 'strict') {
+ ctx.strict = true;
}
} else {
ctx.instanceName = s;
@@ -346,7 +351,7 @@ Vue.component('marquee-text', MarqueeText);
} else {
this.lastLocationTimer = '';
}
- if (this.lastLocation.onlineForTimer !== 0) {
+ if (this.lastLocation.onlineForTimer) {
this.onlineForTimer = timeToText(
Date.now() - this.lastLocation.onlineFor
);