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