mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Fix auto login after logging out
This commit is contained in:
@@ -4736,7 +4736,11 @@ speechSynthesis.getVoices();
|
||||
this.checkVRChatDebugLogging();
|
||||
this.$nextTick(function () {
|
||||
this.$el.style.display = '';
|
||||
if (!this.enablePrimaryPassword) {
|
||||
if (
|
||||
!this.enablePrimaryPassword &&
|
||||
configRepository.getString('lastUserLoggedIn') !== null
|
||||
) {
|
||||
// login at startup
|
||||
this.loginForm.loading = true;
|
||||
API.getConfig()
|
||||
.catch((err) => {
|
||||
@@ -6646,9 +6650,10 @@ speechSynthesis.getVoices();
|
||||
$app.$refs.menu.activeIndex = 'feed';
|
||||
});
|
||||
|
||||
API.$on('LOGOUT', function () {
|
||||
$app.updateStoredUser(this.currentUser);
|
||||
API.$on('LOGOUT', async function () {
|
||||
await $app.updateStoredUser(this.currentUser);
|
||||
webApiService.clearCookies();
|
||||
configRepository.remove('lastUserLoggedIn');
|
||||
});
|
||||
|
||||
$app.methods.checkPrimaryPassword = function (args) {
|
||||
@@ -6905,7 +6910,7 @@ speechSynthesis.getVoices();
|
||||
websocket: '',
|
||||
saveCredentials: false,
|
||||
savedCredentials:
|
||||
configRepository.getString('lastUserLoggedIn') !== null
|
||||
configRepository.getString('savedCredentials') !== null
|
||||
? JSON.parse(configRepository.getString('savedCredentials'))
|
||||
: {},
|
||||
lastUserLoggedIn: configRepository.getString('lastUserLoggedIn'),
|
||||
@@ -20366,6 +20371,7 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.getUserFavoriteWorlds = async function (userId) {
|
||||
this.userDialog.isFavoriteWorldsLoading = true;
|
||||
this.$refs.favoriteWorlds.currentName = '0'; // select first tab
|
||||
this.userFavoriteWorlds = [];
|
||||
var worldLists = [];
|
||||
var params = {
|
||||
@@ -21914,10 +21920,13 @@ speechSynthesis.getVoices();
|
||||
);
|
||||
console.log('Database update complete.');
|
||||
msgBox.close();
|
||||
this.$message({
|
||||
message: 'Database upgrade complete',
|
||||
type: 'success'
|
||||
});
|
||||
if (this.databaseVersion) {
|
||||
// only display when database exists
|
||||
this.$message({
|
||||
message: 'Database upgrade complete',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
msgBox.close();
|
||||
@@ -24200,6 +24209,7 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.getGroupGalleries = async function () {
|
||||
this.groupDialog.galleries = {};
|
||||
this.$refs.groupDialogGallery.currentName = '0'; // select first tab
|
||||
this.isGroupGalleryLoading = true;
|
||||
for (var i = 0; i < this.groupDialog.ref.galleries.length; i++) {
|
||||
var gallery = this.groupDialog.ref.galleries[i];
|
||||
@@ -24370,6 +24380,9 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.checkVRChatDebugLogging = async function () {
|
||||
if (this.gameLogDisabled) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var loggingEnabled = await AppApi.GetVRChatRegistryKey(
|
||||
'LOGGING_ENABLED'
|
||||
|
||||
@@ -1896,7 +1896,7 @@ html
|
||||
span.extra(v-if="world.occupants") ({{ world.occupants }})
|
||||
el-tab-pane(:label="$t('dialog.user.favorite_worlds.header')")
|
||||
el-button(type="default" :loading="userDialog.isFavoriteWorldsLoading" @click="getUserFavoriteWorlds(userDialog.id)" size="mini" icon="el-icon-refresh" circle)
|
||||
el-tabs(type="card" v-loading="userDialog.isFavoriteWorldsLoading" style="margin-top:10px")
|
||||
el-tabs(type="card" ref="favoriteWorlds" v-loading="userDialog.isFavoriteWorldsLoading" style="margin-top:10px")
|
||||
template(v-for="(list, index) in userFavoriteWorlds" v-if="list")
|
||||
el-tab-pane
|
||||
span(slot="label")
|
||||
@@ -2397,14 +2397,15 @@ html
|
||||
span.name {{ $t('dialog.group.members.load_more') }}
|
||||
el-tab-pane(:label="$t('dialog.group.gallery.header')")
|
||||
el-button(type="default" size="mini" icon="el-icon-refresh" @click="getGroupGalleries" circle)
|
||||
el-tabs(type="card" v-loading="isGroupGalleryLoading")
|
||||
el-tabs(type="card" v-loading="isGroupGalleryLoading" ref="groupDialogGallery")
|
||||
template(v-for="(gallery, index) in groupDialog.ref.galleries")
|
||||
el-tab-pane
|
||||
span(slot="label")
|
||||
span(v-text="gallery.name" style="font-weight:bold;font-size:16px")
|
||||
i.x-user-status(style="margin-left:5px" :class="groupGalleryStatus(gallery)")
|
||||
span(style="color:#909399;font-size:12px;margin-left:5px") {{ groupDialog.galleries[gallery.id] ? groupDialog.galleries[gallery.id].length : 0 }}
|
||||
el-carousel(:interval="0" height="600px")
|
||||
span(v-text="gallery.description" style="color:#c7c7c7;padding:10px")
|
||||
el-carousel(:interval="0" height="600px" style="margin-top:10px")
|
||||
el-carousel-item(v-for="image in groupDialog.galleries[gallery.id]" :key="image.id")
|
||||
el-popover(placement="top" width="700px" trigger="click")
|
||||
img.x-link(slot="reference" v-lazy="image.imageUrl" style="width:100%;height:100%;object-fit:contain")
|
||||
|
||||
@@ -206,7 +206,8 @@ Vue.component('marquee-text', MarqueeText);
|
||||
lastLocationTimer: '',
|
||||
onlineForTimer: '',
|
||||
wristFeed: [],
|
||||
devices: []
|
||||
devices: [],
|
||||
deviceCount: 0
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
@@ -367,16 +368,13 @@ Vue.component('marquee-text', MarqueeText);
|
||||
var length = 16;
|
||||
if (!this.config.hideDevicesFromFeed) {
|
||||
length -= 2;
|
||||
if (this.devices.length > 7) {
|
||||
if (this.deviceCount > 8) {
|
||||
length -= 1;
|
||||
}
|
||||
}
|
||||
if (this.nowPlaying.playing) {
|
||||
length -= 1;
|
||||
}
|
||||
if (!this.config.hideFriendsFromFeed && this.nowPlaying.playing) {
|
||||
length -= 1;
|
||||
}
|
||||
this.wristFeed.length = length;
|
||||
};
|
||||
|
||||
@@ -426,6 +424,7 @@ Vue.component('marquee-text', MarqueeText);
|
||||
deviceList.unshift(device);
|
||||
}
|
||||
});
|
||||
this.deviceCount = deviceList.length;
|
||||
deviceList.sort((a, b) => {
|
||||
if (a[0] === b[0]) {
|
||||
return 0;
|
||||
@@ -457,6 +456,7 @@ Vue.component('marquee-text', MarqueeText);
|
||||
'',
|
||||
baseStations
|
||||
]);
|
||||
this.deviceCount += 1;
|
||||
}
|
||||
this.devices = deviceList;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user