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)
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

View File

@@ -955,7 +955,7 @@ speechSynthesis.getVoices();
template:
'<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>' +
'<span> #{{ instanceName }} {{ accessType }}</span></span>' +
'<span>#{{ instanceName }} {{ accessType }}</span></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>' +
'<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;
}
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;
})();

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -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"
},

View File

@@ -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':

View File

@@ -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 {