Fix empty displayName in gameLog + Fix progress pie filter

This commit is contained in:
Natsumi
2021-10-29 17:01:01 +13:00
parent 208a71a045
commit 83dbf0d50f
4 changed files with 30 additions and 23 deletions

View File

@@ -8244,6 +8244,9 @@ speechSynthesis.getVoices();
this.showUserDialog(ref.userId);
return;
}
if (!ref.displayname) {
return;
}
for (var ctx of API.cachedUsers.values()) {
if (ctx.displayName === ref.displayName) {
this.showUserDialog(ctx.id);
@@ -9852,6 +9855,21 @@ speechSynthesis.getVoices();
if (this.isDarkMode) {
notificationTheme = 'sunset';
}
var VRConfigVars = {
overlayNotifications: this.overlayNotifications,
hideDevicesFromFeed: this.hideDevicesFromFeed,
minimalFeed: this.minimalFeed,
notificationPosition: this.notificationPosition,
notificationTimeout: this.notificationTimeout,
notificationTheme,
backgroundEnabled: this.vrBackgroundEnabled
};
var json = JSON.stringify(VRConfigVars);
AppApi.ExecuteVrFeedFunction('configUpdate', json);
AppApi.ExecuteVrOverlayFunction('configUpdate', json);
};
$app.methods.updateVRLastLocation = function () {
var progressPie = false;
if (this.progressPie) {
progressPie = true;
@@ -9866,28 +9884,13 @@ speechSynthesis.getVoices();
}
}
}
var VRConfigVars = {
overlayNotifications: this.overlayNotifications,
hideDevicesFromFeed: this.hideDevicesFromFeed,
minimalFeed: this.minimalFeed,
notificationPosition: this.notificationPosition,
notificationTimeout: this.notificationTimeout,
notificationTheme,
backgroundEnabled: this.vrBackgroundEnabled,
progressPie
};
var json = JSON.stringify(VRConfigVars);
AppApi.ExecuteVrFeedFunction('configUpdate', json);
AppApi.ExecuteVrOverlayFunction('configUpdate', json);
};
$app.methods.updateVRLastLocation = function () {
var lastLocation = {
date: this.lastLocation.date,
location: this.lastLocation.location,
name: this.lastLocation.name,
playerList: Array.from(this.lastLocation.playerList.values()),
friendList: Array.from(this.lastLocation.friendList.values())
friendList: Array.from(this.lastLocation.friendList.values()),
progressPie
};
var json = JSON.stringify(lastLocation);
AppApi.ExecuteVrFeedFunction('lastLocationUpdate', json);

View File

@@ -200,7 +200,7 @@ html
span(v-else v-text="scope.row.type")
el-table-column(label="User" prop="displayName" width="180")
template(v-once #default="scope")
span.x-link(v-text="scope.row.displayName" @click="lookupUser(scope.row)" style="padding-right:10px")
span.x-link(v-if="scope.row.displayName" v-text="scope.row.displayName" @click="lookupUser(scope.row)" style="padding-right:10px")
el-table-column(label="Detail" prop="data")
template(v-once #default="scope")
location(v-if="scope.row.type === 'Location'" :location="scope.row.location" :hint="scope.row.worldName")
@@ -977,10 +977,10 @@ html
span.header Progress pie overlay for videos
div.options-container-item
span.name Enable
el-switch(v-model="progressPie" @change="changeYouTubeApi")
el-switch(v-model="progressPie" @change="changeYouTubeApi" :disabled="!openVR")
div.options-container-item
span.name Dance worlds only
el-switch(v-model="progressPieFilter" @change="changeYouTubeApi")
el-switch(v-model="progressPieFilter" @change="changeYouTubeApi" :disabled="!openVR")
div.options-container
span.header VRCX Instance Cache/Debug
div.options-container-item

View File

@@ -193,7 +193,8 @@ import configRepository from './repository/config.js';
location: '',
name: '',
playerList: [],
friendList: []
friendList: [],
progressPie: false
},
lastLocationTimer: '',
wristFeed: [],
@@ -298,7 +299,10 @@ import configRepository from './repository/config.js';
this.nowPlaying = JSON.parse(json);
if (this.appType === '2') {
var circle = document.querySelector('.np-progress-circle-stroke');
if (this.config.progressPie && this.nowPlaying.percentage !== 0) {
if (
this.lastLocation.progressPie &&
this.nowPlaying.percentage !== 0
) {
circle.style.opacity = 0.5;
var circumference = circle.getTotalLength();
circle.style.strokeDashoffset =

View File

@@ -395,7 +395,7 @@ html
span(style="display:inline-block;margin-right:5px") {{ downloadProgress }}%
template(v-if="lastLocation.date !== 0")
span(style="float:right") {{ lastLocationTimer }}
span(style="display:inline-block") {{ lastLocation.playerList.length }}
span(style="display:inline-block") {{ lastLocation.playerList.length }}
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
template(v-else)
template(v-if="downloadProgress === 100")