diff --git a/CefService.cs b/CefService.cs index 4e5ebaaf..93a9786f 100644 --- a/CefService.cs +++ b/CefService.cs @@ -45,7 +45,7 @@ namespace VRCX if (Program.LaunchDebug) 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; // Enable High-DPI support on Windows 7 or newer diff --git a/html/src/app.js b/html/src/app.js index 440bd4b5..ca76b9d4 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -955,7 +955,7 @@ speechSynthesis.getVoices(); template: '' + '' + - ' #{{ instanceName }} {{ accessType }}' + + '#{{ instanceName }} {{ accessType }}' + '({{ groupName }})' + '' + '', @@ -9090,9 +9090,9 @@ speechSynthesis.getVoices(); return; } var userId = ''; - if (gameLog.userDisplayName) { + if (gameLog.displayName) { for (var ref of API.cachedUsers.values()) { - if (ref.displayName === gameLog.userDisplayName) { + if (ref.displayName === gameLog.displayName) { userId = ref.id; break; } @@ -9151,21 +9151,18 @@ speechSynthesis.getVoices(); case 'player-joined': var joinTime = Date.parse(gameLog.dt); var userMap = { - displayName: gameLog.userDisplayName, + displayName: gameLog.displayName, userId, joinTime }; - this.lastLocation.playerList.set( - gameLog.userDisplayName, - userMap - ); + this.lastLocation.playerList.set(gameLog.displayName, userMap); if (userId) { var ref = API.cachedUsers.get(userId); if (userId === API.currentUser.id) { // skip } else if (this.friends.has(userId)) { this.lastLocation.friendList.set( - gameLog.userDisplayName, + gameLog.displayName, userMap ); if ( @@ -9183,7 +9180,7 @@ speechSynthesis.getVoices(); } else { // try fetch userId from previous encounter using database database - .getUserIdFromDisplayName(gameLog.userDisplayName) + .getUserIdFromDisplayName(gameLog.displayName) .then((oldUserId) => { if (oldUserId && this.isGameRunning) { API.getUser({userId: oldUserId}); @@ -9195,7 +9192,7 @@ speechSynthesis.getVoices(); var entry = { created_at: gameLog.dt, type: 'OnPlayerJoined', - displayName: gameLog.userDisplayName, + displayName: gameLog.displayName, location, userId, time: 0 @@ -9203,23 +9200,15 @@ speechSynthesis.getVoices(); database.addGamelogJoinLeaveToDatabase(entry); break; case 'player-left': - if ( - !this.lastLocation.playerList.has(gameLog.userDisplayName) - ) { + if (!this.lastLocation.playerList.has(gameLog.displayName)) { return; } var time = 0; - var ref = this.lastLocation.playerList.get( - gameLog.userDisplayName - ); + var ref = this.lastLocation.playerList.get(gameLog.displayName); if (typeof ref !== 'undefined') { time = Date.now() - ref.joinTime; - this.lastLocation.playerList.delete( - gameLog.userDisplayName - ); - this.lastLocation.friendList.delete( - gameLog.userDisplayName - ); + this.lastLocation.playerList.delete(gameLog.displayName); + this.lastLocation.friendList.delete(gameLog.displayName); } this.photonLobbyAvatars.delete(userId); this.updateVRLastLocation(); @@ -11313,6 +11302,11 @@ speechSynthesis.getVoices(); break; case 'group': L.accessName = `Group #${L.instanceName} (${platform})`; + this.getGroupName(L.groupId).then((groupName) => { + if (groupName) { + L.accessName = `Group(${groupName}) #${L.instanceName} (${platform})`; + } + }); break; } } @@ -24607,6 +24601,28 @@ speechSynthesis.getVoices(); 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); window.$app = $app; })(); diff --git a/html/src/app.scss b/html/src/app.scss index f656d714..188d8758 100644 --- a/html/src/app.scss +++ b/html/src/app.scss @@ -351,7 +351,7 @@ img.friends-list-avatar { } .x-friend-item > .avatar.active::after { - background: #dfca43; + background: #f4e05e; } .x-friend-item > .avatar.online::after { @@ -363,11 +363,11 @@ img.friends-list-avatar { } .x-friend-item > .avatar.askme::after { - background: #fd9200; + background: #ff9500; } .x-friend-item > .avatar.busy::after { - background: #f56c6c; + background: #ff2c2c; } .x-friend-item > .avatar.offline::after { @@ -485,7 +485,7 @@ i.x-user-status { } i.x-user-status.active { - background: #dfca43; + background: #f4e05e; } i.x-user-status.online { @@ -497,11 +497,11 @@ i.x-user-status.joinme { } i.x-user-status.askme { - background: #fd9200; + background: #ff9500; } i.x-user-status.busy { - background: #f56c6c; + background: #ff2c2c; } .x-tag-friend { @@ -586,7 +586,7 @@ i.x-user-status.busy { .toggle-list .toggle-name { display: inline-block; - min-width: 170px; + min-width: 190px; padding-right: 5px; text-align: right; } diff --git a/html/src/index.pug b/html/src/index.pug index 24502668..6b53df02 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -465,6 +465,13 @@ html 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(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") 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") @@ -1564,7 +1571,7 @@ html .detail 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.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") template(v-else) span(v-text="friend.name || friend.id") @@ -1580,7 +1587,7 @@ html .detail 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.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") template(v-else) span(v-text="friend.name || friend.id") @@ -1986,9 +1993,9 @@ html 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-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-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-dropdown(trigger="click" @command="worldDialogCommand" size="small" style="margin-left:5px") el-button(type="default" icon="el-icon-more" circle) diff --git a/html/src/localization/strings/en.json b/html/src/localization/strings/en.json index 79f39735..d10b5d0c 100644 --- a/html/src/localization/strings/en.json +++ b/html/src/localization/strings/en.json @@ -30,7 +30,7 @@ } }, "feed": { - "favorites_only_tooltip": "Filter VIP only", + "favorites_only_tooltip": "Filter favorites only", "filter_placeholder": "Filter", "search_placeholder": "Search" }, @@ -120,7 +120,7 @@ "load": "Load missing entries", "load_notice": "This takes a lot of API requests so use it sparingly", "load_tooltip": "Load", - "favorites_only_tooltip": "Filter VIP only", + "favorites_only_tooltip": "Filter favorites only", "search_placeholder": "Search", "filter_placeholder": "Filter", "refresh_tooltip": "Refresh", @@ -243,7 +243,7 @@ "sort_by_status": "Sort by status", "sort_gps_to_top": "Sort GPS to top", "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_online_time": "online for", "sort_online_by": "Sort Online by", @@ -418,7 +418,7 @@ "enable": "Enable", "enable_tooltip": "Requires SteamVR overlay to be enabled", "filter": "Filter", - "filter_favorites": "VIP", + "filter_favorites": "Favorites", "filter_friends": "Friends", "filter_everyone": "Everyone", "message_timeout": "Message Timeout" @@ -428,7 +428,7 @@ "enable": "Enable", "enable_tooltip": "Requires SteamVR overlay to be enabled", "filter": "Filter", - "filter_favorites": "VIP", + "filter_favorites": "Favorites", "filter_friends": "Friends", "filter_everyone": "Everyone", "timeout_threshold": "Timeout Threshold" @@ -446,11 +446,11 @@ "refresh_tooltip": "Refresh friends", "friends": "FRIENDS", "me": "ME", - "favorite": "VIP", + "favorite": "FAVORITES", "online": "ONLINE", "active": "ACTIVE", "offline": "OFFLINE", - "penfing_offline": "Pending Offline" + "pending_offline": "Pending Offline" }, "dialog": { "user": { @@ -568,8 +568,7 @@ }, "actions": { "delete_cache_tooltip": "Delete world from cache", - "favorite_tooltip": "Add to favorites", - "unfavorite_tooltip": "Remove from favorites", + "favorites_tooltip": "Favorites", "refresh": "Refresh", "new_instance": "New Instance", "make_home": "Make Home", @@ -878,7 +877,7 @@ "wrist": "Wrist Feed Filters", "on": "On", "off": "Off", - "favorite": "VIP", + "favorite": "Favorites", "friends": "Friends", "everyone": "Everyone", "cancel": "Cancel", @@ -1266,6 +1265,7 @@ "gameLog": { "date": "Date", "type": "Type", + "icon": "Icons", "user": "User", "detail": "Detail" }, diff --git a/html/src/service/gamelog.js b/html/src/service/gamelog.js index e3f861cc..db0cabd8 100644 --- a/html/src/service/gamelog.js +++ b/html/src/service/gamelog.js @@ -18,11 +18,11 @@ class GameLogService { break; case 'player-joined': - gameLog.userDisplayName = args[0]; + gameLog.displayName = args[0]; break; case 'player-left': - gameLog.userDisplayName = args[0]; + gameLog.displayName = args[0]; break; case 'notification': diff --git a/html/src/vr.scss b/html/src/vr.scss index 4e54378d..f6fdf5dd 100644 --- a/html/src/vr.scss +++ b/html/src/vr.scss @@ -316,7 +316,7 @@ i.x-user-status { } i.x-user-status.active { - background: #dfca43; + background: #f4e05e; } i.x-user-status.online { @@ -328,11 +328,11 @@ i.x-user-status.joinme { } i.x-user-status.askme { - background: #fd9200; + background: #ff9500; } i.x-user-status.busy { - background: #f56c6c; + background: #ff2c2c; } .spin {