Fixes and small changes

This commit is contained in:
Natsumi
2023-01-24 02:03:07 +13:00
parent 8da7807472
commit 69481eb36a
7 changed files with 73 additions and 50 deletions

View File

@@ -45,7 +45,7 @@ namespace VRCX
if (Program.LaunchDebug) if (Program.LaunchDebug)
cefSettings.RemoteDebuggingPort = 8088; cefSettings.RemoteDebuggingPort = 8088;
// CefSharpSettings.WcfEnabled = true; // TOOD: REMOVE THIS LINE YO (needed for synchronous configRepository) CefSharpSettings.WcfEnabled = true; // TOOD: REMOVE THIS LINE YO (needed for synchronous configRepository)
CefSharpSettings.ShutdownOnExit = false; CefSharpSettings.ShutdownOnExit = false;
// Enable High-DPI support on Windows 7 or newer // Enable High-DPI support on Windows 7 or newer

View File

@@ -955,7 +955,7 @@ speechSynthesis.getVoices();
template: template:
'<span><span @click="showLaunchDialog" class="x-link">' + '<span><span @click="showLaunchDialog" class="x-link">' +
'<i v-if="isUnlocked" class="el-icon el-icon-unlock" style="display:inline-block;margin-right:5px"></i>' + '<i v-if="isUnlocked" class="el-icon el-icon-unlock" style="display:inline-block;margin-right:5px"></i>' +
'<span> #{{ instanceName }} {{ accessType }}</span></span>' + '<span>#{{ instanceName }} {{ accessType }}</span></span>' +
'<span v-if="groupName" @click="showGroupDialog" class="x-link">({{ groupName }})</span>' + '<span v-if="groupName" @click="showGroupDialog" class="x-link">({{ groupName }})</span>' +
'<span class="flags" :class="region" style="display:inline-block;margin-left:5px"></span>' + '<span class="flags" :class="region" style="display:inline-block;margin-left:5px"></span>' +
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>', '<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
@@ -9090,9 +9090,9 @@ speechSynthesis.getVoices();
return; return;
} }
var userId = ''; var userId = '';
if (gameLog.userDisplayName) { if (gameLog.displayName) {
for (var ref of API.cachedUsers.values()) { for (var ref of API.cachedUsers.values()) {
if (ref.displayName === gameLog.userDisplayName) { if (ref.displayName === gameLog.displayName) {
userId = ref.id; userId = ref.id;
break; break;
} }
@@ -9151,21 +9151,18 @@ speechSynthesis.getVoices();
case 'player-joined': case 'player-joined':
var joinTime = Date.parse(gameLog.dt); var joinTime = Date.parse(gameLog.dt);
var userMap = { var userMap = {
displayName: gameLog.userDisplayName, displayName: gameLog.displayName,
userId, userId,
joinTime joinTime
}; };
this.lastLocation.playerList.set( this.lastLocation.playerList.set(gameLog.displayName, userMap);
gameLog.userDisplayName,
userMap
);
if (userId) { if (userId) {
var ref = API.cachedUsers.get(userId); var ref = API.cachedUsers.get(userId);
if (userId === API.currentUser.id) { if (userId === API.currentUser.id) {
// skip // skip
} else if (this.friends.has(userId)) { } else if (this.friends.has(userId)) {
this.lastLocation.friendList.set( this.lastLocation.friendList.set(
gameLog.userDisplayName, gameLog.displayName,
userMap userMap
); );
if ( if (
@@ -9183,7 +9180,7 @@ speechSynthesis.getVoices();
} else { } else {
// try fetch userId from previous encounter using database // try fetch userId from previous encounter using database
database database
.getUserIdFromDisplayName(gameLog.userDisplayName) .getUserIdFromDisplayName(gameLog.displayName)
.then((oldUserId) => { .then((oldUserId) => {
if (oldUserId && this.isGameRunning) { if (oldUserId && this.isGameRunning) {
API.getUser({userId: oldUserId}); API.getUser({userId: oldUserId});
@@ -9195,7 +9192,7 @@ speechSynthesis.getVoices();
var entry = { var entry = {
created_at: gameLog.dt, created_at: gameLog.dt,
type: 'OnPlayerJoined', type: 'OnPlayerJoined',
displayName: gameLog.userDisplayName, displayName: gameLog.displayName,
location, location,
userId, userId,
time: 0 time: 0
@@ -9203,23 +9200,15 @@ speechSynthesis.getVoices();
database.addGamelogJoinLeaveToDatabase(entry); database.addGamelogJoinLeaveToDatabase(entry);
break; break;
case 'player-left': case 'player-left':
if ( if (!this.lastLocation.playerList.has(gameLog.displayName)) {
!this.lastLocation.playerList.has(gameLog.userDisplayName)
) {
return; return;
} }
var time = 0; var time = 0;
var ref = this.lastLocation.playerList.get( var ref = this.lastLocation.playerList.get(gameLog.displayName);
gameLog.userDisplayName
);
if (typeof ref !== 'undefined') { if (typeof ref !== 'undefined') {
time = Date.now() - ref.joinTime; time = Date.now() - ref.joinTime;
this.lastLocation.playerList.delete( this.lastLocation.playerList.delete(gameLog.displayName);
gameLog.userDisplayName this.lastLocation.friendList.delete(gameLog.displayName);
);
this.lastLocation.friendList.delete(
gameLog.userDisplayName
);
} }
this.photonLobbyAvatars.delete(userId); this.photonLobbyAvatars.delete(userId);
this.updateVRLastLocation(); this.updateVRLastLocation();
@@ -11313,6 +11302,11 @@ speechSynthesis.getVoices();
break; break;
case 'group': case 'group':
L.accessName = `Group #${L.instanceName} (${platform})`; L.accessName = `Group #${L.instanceName} (${platform})`;
this.getGroupName(L.groupId).then((groupName) => {
if (groupName) {
L.accessName = `Group(${groupName}) #${L.instanceName} (${platform})`;
}
});
break; break;
} }
} }
@@ -24607,6 +24601,28 @@ speechSynthesis.getVoices();
return API.getUserFeedback({userId: API.currentUser.id}); return API.getUserFeedback({userId: API.currentUser.id});
}; };
$app.methods.gameLogIsFriend = function (row) {
if (typeof row.isFriend !== 'undefined') {
return row.isFriend;
}
if (!row.userId) {
return false;
}
row.isFriend = this.friends.has(row.userId);
return row.isFriend;
};
$app.methods.gameLogIsFavorite = function (row) {
if (typeof row.isFavorite !== 'undefined') {
return row.isFavorite;
}
if (!row.userId || API.cachedFavoritesByObjectId.size === 0) {
return false;
}
row.isFavorite = API.cachedFavoritesByObjectId.has(row.userId);
return row.isFavorite;
};
$app = new Vue($app); $app = new Vue($app);
window.$app = $app; window.$app = $app;
})(); })();

View File

@@ -351,7 +351,7 @@ img.friends-list-avatar {
} }
.x-friend-item > .avatar.active::after { .x-friend-item > .avatar.active::after {
background: #dfca43; background: #f4e05e;
} }
.x-friend-item > .avatar.online::after { .x-friend-item > .avatar.online::after {
@@ -363,11 +363,11 @@ img.friends-list-avatar {
} }
.x-friend-item > .avatar.askme::after { .x-friend-item > .avatar.askme::after {
background: #fd9200; background: #ff9500;
} }
.x-friend-item > .avatar.busy::after { .x-friend-item > .avatar.busy::after {
background: #f56c6c; background: #ff2c2c;
} }
.x-friend-item > .avatar.offline::after { .x-friend-item > .avatar.offline::after {
@@ -485,7 +485,7 @@ i.x-user-status {
} }
i.x-user-status.active { i.x-user-status.active {
background: #dfca43; background: #f4e05e;
} }
i.x-user-status.online { i.x-user-status.online {
@@ -497,11 +497,11 @@ i.x-user-status.joinme {
} }
i.x-user-status.askme { i.x-user-status.askme {
background: #fd9200; background: #ff9500;
} }
i.x-user-status.busy { i.x-user-status.busy {
background: #f56c6c; background: #ff2c2c;
} }
.x-tag-friend { .x-tag-friend {
@@ -586,7 +586,7 @@ i.x-user-status.busy {
.toggle-list .toggle-name { .toggle-list .toggle-name {
display: inline-block; display: inline-block;
min-width: 170px; min-width: 190px;
padding-right: 5px; padding-right: 5px;
text-align: right; text-align: right;
} }

View File

@@ -465,6 +465,13 @@ html
template(v-once #default="scope") template(v-once #default="scope")
span.x-link(v-if="scope.row.location && scope.row.type !== 'Location'" v-text="scope.row.type" @click="showWorldDialog(scope.row.location)") span.x-link(v-if="scope.row.location && scope.row.type !== 'Location'" v-text="scope.row.type" @click="showWorldDialog(scope.row.location)")
span(v-else v-text="scope.row.type") span(v-else v-text="scope.row.type")
el-table-column(:label="$t('table.gameLog.icon')" prop="isFriend" width="60")
template(v-once #default="scope")
template(v-if="gameLogIsFriend(scope.row)")
el-tooltip(v-if="gameLogIsFavorite(scope.row)" placement="top" content="Favorite")
span ⭐
el-tooltip(v-else placement="top" content="Friend")
span 💚
el-table-column(:label="$t('table.gameLog.user')" prop="displayName" width="180") el-table-column(:label="$t('table.gameLog.user')" prop="displayName" width="180")
template(v-once #default="scope") template(v-once #default="scope")
span.x-link(v-if="scope.row.displayName" 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")
@@ -1564,7 +1571,7 @@ html
.detail .detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }}) span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}") span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.penfing_offline') }} span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false") location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false")
template(v-else) template(v-else)
span(v-text="friend.name || friend.id") span(v-text="friend.name || friend.id")
@@ -1580,7 +1587,7 @@ html
.detail .detail
span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }}) span.name(v-if="!hideUserMemos && friend.$nickName" :style="{'color':friend.ref.$userColour}") {{ friend.ref.displayName }} ({{ friend.$nickName }})
span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}") span.name(v-else v-text="friend.ref.displayName" :style="{'color':friend.ref.$userColour}")
span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.penfing_offline') }} span.extra(v-if="friend.pendingOffline") #[i.el-icon-warning-outline] {{ $t('side_panel.pending_offline') }}
location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false") location.extra(v-else :location="friend.ref.location" :traveling="friend.ref.travelingToLocation" :link="false")
template(v-else) template(v-else)
span(v-text="friend.name || friend.id") span(v-text="friend.name || friend.id")
@@ -1986,9 +1993,9 @@ html
div(style="flex:none;margin-left:10px") div(style="flex:none;margin-left:10px")
el-tooltip(v-if="worldDialog.inCache" placement="top" :content="$t('dialog.world.actions.delete_cache_tooltip')" :disabled="hideTooltips") el-tooltip(v-if="worldDialog.inCache" placement="top" :content="$t('dialog.world.actions.delete_cache_tooltip')" :disabled="hideTooltips")
el-button(icon="el-icon-delete" circle @click="deleteVRChatCache(worldDialog.ref)" :disabled="isGameRunning && worldDialog.cacheLocked") el-button(icon="el-icon-delete" circle @click="deleteVRChatCache(worldDialog.ref)" :disabled="isGameRunning && worldDialog.cacheLocked")
el-tooltip(v-if="worldDialog.isFavorite" placement="top" :content="$t('dialog.world.actions.unfavorite_tooltip')" :disabled="hideTooltips") el-tooltip(v-if="worldDialog.isFavorite" placement="top" :content="$t('dialog.world.actions.favorites_tooltip')" :disabled="hideTooltips")
el-button(type="default" icon="el-icon-star-on" circle @click="worldDialogCommand('Add Favorite')" style="margin-left:5px") el-button(type="default" icon="el-icon-star-on" circle @click="worldDialogCommand('Add Favorite')" style="margin-left:5px")
el-tooltip(v-else placement="top" :content="$t('dialog.world.actions.favorite_tooltip')" :disabled="hideTooltips") el-tooltip(v-else placement="top" :content="$t('dialog.world.actions.favorites_tooltip')" :disabled="hideTooltips")
el-button(type="default" icon="el-icon-star-off" circle @click="worldDialogCommand('Add Favorite')" style="margin-left:5px") el-button(type="default" icon="el-icon-star-off" circle @click="worldDialogCommand('Add Favorite')" style="margin-left:5px")
el-dropdown(trigger="click" @command="worldDialogCommand" size="small" style="margin-left:5px") el-dropdown(trigger="click" @command="worldDialogCommand" size="small" style="margin-left:5px")
el-button(type="default" icon="el-icon-more" circle) el-button(type="default" icon="el-icon-more" circle)

View File

@@ -30,7 +30,7 @@
} }
}, },
"feed": { "feed": {
"favorites_only_tooltip": "Filter VIP only", "favorites_only_tooltip": "Filter favorites only",
"filter_placeholder": "Filter", "filter_placeholder": "Filter",
"search_placeholder": "Search" "search_placeholder": "Search"
}, },
@@ -120,7 +120,7 @@
"load": "Load missing entries", "load": "Load missing entries",
"load_notice": "This takes a lot of API requests so use it sparingly", "load_notice": "This takes a lot of API requests so use it sparingly",
"load_tooltip": "Load", "load_tooltip": "Load",
"favorites_only_tooltip": "Filter VIP only", "favorites_only_tooltip": "Filter favorites only",
"search_placeholder": "Search", "search_placeholder": "Search",
"filter_placeholder": "Filter", "filter_placeholder": "Filter",
"refresh_tooltip": "Refresh", "refresh_tooltip": "Refresh",
@@ -243,7 +243,7 @@
"sort_by_status": "Sort by status", "sort_by_status": "Sort by status",
"sort_gps_to_top": "Sort GPS to top", "sort_gps_to_top": "Sort GPS to top",
"sort_gps_to_top_notice": "(online for only)", "sort_gps_to_top_notice": "(online for only)",
"sort_favorite_by": "Sort VIP by", "sort_favorite_by": "Sort Favorites by",
"sort_favorite_by_alphabet": "alphabetical", "sort_favorite_by_alphabet": "alphabetical",
"sort_favorite_by_online_time": "online for", "sort_favorite_by_online_time": "online for",
"sort_online_by": "Sort Online by", "sort_online_by": "Sort Online by",
@@ -418,7 +418,7 @@
"enable": "Enable", "enable": "Enable",
"enable_tooltip": "Requires SteamVR overlay to be enabled", "enable_tooltip": "Requires SteamVR overlay to be enabled",
"filter": "Filter", "filter": "Filter",
"filter_favorites": "VIP", "filter_favorites": "Favorites",
"filter_friends": "Friends", "filter_friends": "Friends",
"filter_everyone": "Everyone", "filter_everyone": "Everyone",
"message_timeout": "Message Timeout" "message_timeout": "Message Timeout"
@@ -428,7 +428,7 @@
"enable": "Enable", "enable": "Enable",
"enable_tooltip": "Requires SteamVR overlay to be enabled", "enable_tooltip": "Requires SteamVR overlay to be enabled",
"filter": "Filter", "filter": "Filter",
"filter_favorites": "VIP", "filter_favorites": "Favorites",
"filter_friends": "Friends", "filter_friends": "Friends",
"filter_everyone": "Everyone", "filter_everyone": "Everyone",
"timeout_threshold": "Timeout Threshold" "timeout_threshold": "Timeout Threshold"
@@ -446,11 +446,11 @@
"refresh_tooltip": "Refresh friends", "refresh_tooltip": "Refresh friends",
"friends": "FRIENDS", "friends": "FRIENDS",
"me": "ME", "me": "ME",
"favorite": "VIP", "favorite": "FAVORITES",
"online": "ONLINE", "online": "ONLINE",
"active": "ACTIVE", "active": "ACTIVE",
"offline": "OFFLINE", "offline": "OFFLINE",
"penfing_offline": "Pending Offline" "pending_offline": "Pending Offline"
}, },
"dialog": { "dialog": {
"user": { "user": {
@@ -568,8 +568,7 @@
}, },
"actions": { "actions": {
"delete_cache_tooltip": "Delete world from cache", "delete_cache_tooltip": "Delete world from cache",
"favorite_tooltip": "Add to favorites", "favorites_tooltip": "Favorites",
"unfavorite_tooltip": "Remove from favorites",
"refresh": "Refresh", "refresh": "Refresh",
"new_instance": "New Instance", "new_instance": "New Instance",
"make_home": "Make Home", "make_home": "Make Home",
@@ -878,7 +877,7 @@
"wrist": "Wrist Feed Filters", "wrist": "Wrist Feed Filters",
"on": "On", "on": "On",
"off": "Off", "off": "Off",
"favorite": "VIP", "favorite": "Favorites",
"friends": "Friends", "friends": "Friends",
"everyone": "Everyone", "everyone": "Everyone",
"cancel": "Cancel", "cancel": "Cancel",
@@ -1266,6 +1265,7 @@
"gameLog": { "gameLog": {
"date": "Date", "date": "Date",
"type": "Type", "type": "Type",
"icon": "Icons",
"user": "User", "user": "User",
"detail": "Detail" "detail": "Detail"
}, },

View File

@@ -18,11 +18,11 @@ class GameLogService {
break; break;
case 'player-joined': case 'player-joined':
gameLog.userDisplayName = args[0]; gameLog.displayName = args[0];
break; break;
case 'player-left': case 'player-left':
gameLog.userDisplayName = args[0]; gameLog.displayName = args[0];
break; break;
case 'notification': case 'notification':

View File

@@ -316,7 +316,7 @@ i.x-user-status {
} }
i.x-user-status.active { i.x-user-status.active {
background: #dfca43; background: #f4e05e;
} }
i.x-user-status.online { i.x-user-status.online {
@@ -328,11 +328,11 @@ i.x-user-status.joinme {
} }
i.x-user-status.askme { i.x-user-status.askme {
background: #fd9200; background: #ff9500;
} }
i.x-user-status.busy { i.x-user-status.busy {
background: #f56c6c; background: #ff2c2c;
} }
.spin { .spin {