This commit is contained in:
Natsumi
2023-01-17 22:09:29 +13:00
parent 4c1faa66ce
commit b92a7f6751
5 changed files with 98 additions and 29 deletions
+3
View File
@@ -42,6 +42,9 @@ namespace VRCX
cefSettings.CefCommandLineArgs.Add("disable-web-security"); cefSettings.CefCommandLineArgs.Add("disable-web-security");
cefSettings.SetOffScreenRenderingBestPerformanceArgs(); cefSettings.SetOffScreenRenderingBestPerformanceArgs();
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; CefSharpSettings.ShutdownOnExit = false;
+72 -19
View File
@@ -1186,6 +1186,17 @@ speechSynthesis.getVoices();
API.$on('USER:CURRENT', function (args) { API.$on('USER:CURRENT', function (args) {
var {json} = args; var {json} = args;
args.ref = this.applyCurrentUser(json); args.ref = this.applyCurrentUser(json);
var location = '';
var travelingToLocation = '';
if (json.presence?.world && $app.isRealInstance(json.presence.world)) {
location = `${json.presence.world}:${json.presence.instance}`;
}
if (
json.presence?.travelingToWorld &&
$app.isRealInstance(json.presence.travelingToWorld)
) {
travelingToLocation = `${json.presence.travelingToWorld}:${json.presence.travelingToInstance}`;
}
this.applyUser({ this.applyUser({
id: json.id, id: json.id,
displayName: json.displayName, displayName: json.displayName,
@@ -1207,10 +1218,14 @@ speechSynthesis.getVoices();
fallbackAvatar: json.fallbackAvatar, fallbackAvatar: json.fallbackAvatar,
profilePicOverride: json.profilePicOverride, profilePicOverride: json.profilePicOverride,
isFriend: false, isFriend: false,
location: json.location,
travelingToInstance: json.travelingToInstance, // Presence
travelingToLocation: json.travelingToLocation, location,
travelingToWorld: json.travelingToWorld travelingToLocation,
instanceId: json.presence?.instance,
worldId: json.presence?.world,
travelingToInstance: json.presence?.travelingToInstance,
travelingToWorld: json.presence?.travelingToWorld
}); });
}); });
@@ -1451,6 +1466,7 @@ speechSynthesis.getVoices();
username: '', username: '',
displayName: '', displayName: '',
userIcon: '', userIcon: '',
profilePicOverride: '',
bio: '', bio: '',
bioLinks: [], bioLinks: [],
pastDisplayNames: [], pastDisplayNames: [],
@@ -1459,6 +1475,7 @@ speechSynthesis.getVoices();
currentAvatarThumbnailImageUrl: '', currentAvatarThumbnailImageUrl: '',
currentAvatar: '', currentAvatar: '',
currentAvatarAssetUrl: '', currentAvatarAssetUrl: '',
fallbackAvatar: '',
homeLocation: '', homeLocation: '',
twoFactorAuthEnabled: false, twoFactorAuthEnabled: false,
status: '', status: '',
@@ -1474,9 +1491,22 @@ speechSynthesis.getVoices();
onlineFriends: [], onlineFriends: [],
activeFriends: [], activeFriends: [],
offlineFriends: [], offlineFriends: [],
travelingToInstance: '', presence: {
travelingToLocation: '', avatarThumbnail: '',
travelingToWorld: '', displayName: '',
groups: [],
id: '',
instance: '',
instanceType: '',
isRejoining: '0',
platform: '',
profilePicOverride: '',
status: '',
travelingToInstance: '',
travelingToWorld: '',
world: '',
...json.presence
},
// VRCX // VRCX
$online_for: Date.now(), $online_for: Date.now(),
$offline_for: '', $offline_for: '',
@@ -1592,10 +1622,12 @@ speechSynthesis.getVoices();
id: '', id: '',
displayName: '', displayName: '',
userIcon: '', userIcon: '',
profilePicOverride: '',
bio: '', bio: '',
bioLinks: [], bioLinks: [],
currentAvatarImageUrl: '', currentAvatarImageUrl: '',
currentAvatarThumbnailImageUrl: '', currentAvatarThumbnailImageUrl: '',
fallbackAvatar: '',
status: '', status: '',
statusDescription: '', statusDescription: '',
state: '', state: '',
@@ -5679,7 +5711,7 @@ speechSynthesis.getVoices();
if (noty.thumbnailImageUrl) { if (noty.thumbnailImageUrl) {
imageUrl = noty.thumbnailImageUrl; imageUrl = noty.thumbnailImageUrl;
} else if (noty.details && noty.details.imageUrl) { } else if (noty.details && noty.details.imageUrl) {
imageUrl = noty.details.imageURL; imageUrl = noty.details.imageUrl;
} else if (noty.imageUrl) { } else if (noty.imageUrl) {
imageUrl = noty.imageUrl; imageUrl = noty.imageUrl;
} else if (userId) { } else if (userId) {
@@ -7615,7 +7647,7 @@ speechSynthesis.getVoices();
); );
} }
var newRef = args.ref; var newRef = args.ref;
if (ctx.state !== newState && ctx.ref !== 'undefined') { if (ctx.state !== newState && typeof ctx.ref !== 'undefined') {
if ( if (
(newState === 'offline' || newState === 'active') && (newState === 'offline' || newState === 'active') &&
ctx.state === 'online' ctx.state === 'online'
@@ -9784,7 +9816,7 @@ speechSynthesis.getVoices();
showGroupBadgeToOthers: user.showGroupBadgeToOthers, showGroupBadgeToOthers: user.showGroupBadgeToOthers,
showSocialRank: user.showSocialRank showSocialRank: user.showSocialRank
}); });
this.photonUserJoin(id, user.avatarDict, gameLogDate); this.photonUserJoin(id, user, gameLogDate);
} }
} else { } else {
console.log('oldSetUserProps', data); console.log('oldSetUserProps', data);
@@ -9821,7 +9853,7 @@ speechSynthesis.getVoices();
user.user.showGroupBadgeToOthers, user.user.showGroupBadgeToOthers,
showSocialRank: user.user.showSocialRank showSocialRank: user.user.showSocialRank
}); });
this.photonUserJoin(id, user.avatarDict, gameLogDate); this.photonUserJoin(id, user, gameLogDate);
} }
break; break;
case 42: case 42:
@@ -9904,7 +9936,7 @@ speechSynthesis.getVoices();
}); });
this.photonUserJoin( this.photonUserJoin(
data.Parameters[254], data.Parameters[254],
data.Parameters[249].avatarDict, data.Parameters[249],
gameLogDate gameLogDate
); );
this.checkPhotonBotJoin( this.checkPhotonBotJoin(
@@ -10442,10 +10474,19 @@ speechSynthesis.getVoices();
this.photonLobbyUserData.set(photonId, photonUser); this.photonLobbyUserData.set(photonId, photonUser);
}; };
$app.methods.photonUserJoin = function (photonId, avatar, gameLogDate) { $app.methods.photonUserJoin = function (photonId, user, gameLogDate) {
if (photonId === this.photonLobbyCurrentUser) { if (photonId === this.photonLobbyCurrentUser) {
return; return;
} }
var avatar = user.avatarDict;
var platform = '';
if (user.last_platform === 'android') {
platform = 'Quest';
} else if (user.inVRMode) {
platform = 'VR';
} else {
platform = 'Desktop';
}
this.checkVRChatCache(avatar).then((cacheInfo) => { this.checkVRChatCache(avatar).then((cacheInfo) => {
var inCache = false; var inCache = false;
if (cacheInfo[0] > 0) { if (cacheInfo[0] > 0) {
@@ -10457,7 +10498,8 @@ speechSynthesis.getVoices();
type: 'OnPlayerJoined', type: 'OnPlayerJoined',
created_at: gameLogDate, created_at: gameLogDate,
avatar, avatar,
inCache inCache,
platform
}); });
}); });
}; };
@@ -10620,6 +10662,7 @@ speechSynthesis.getVoices();
} }
var {groupOnNameplate} = this.photonLobbyJointime.get(photonId); var {groupOnNameplate} = this.photonLobbyJointime.get(photonId);
if ( if (
groupOnNameplate &&
groupOnNameplate !== groupId && groupOnNameplate !== groupId &&
photonId !== this.photonLobbyCurrentUser photonId !== this.photonLobbyCurrentUser
) { ) {
@@ -15643,6 +15686,10 @@ speechSynthesis.getVoices();
$app.methods.refreshUserDialogTreeData = function () { $app.methods.refreshUserDialogTreeData = function () {
var D = this.userDialog; var D = this.userDialog;
if (D.id === API.currentUser.id) {
D.treeData = buildTreeData(API.currentUser);
return;
}
D.treeData = buildTreeData(D.ref); D.treeData = buildTreeData(D.ref);
}; };
@@ -20154,7 +20201,7 @@ speechSynthesis.getVoices();
workerTimers.setTimeout(() => this.restartVRCX(), 2000); workerTimers.setTimeout(() => this.restartVRCX(), 2000);
} else { } else {
this.downloadDialog.visible = false; this.downloadDialog.visible = false;
this.pendingVRCXUpdate = this.downloadCurrent.ref.name; this.pendingVRCXInstall = this.downloadCurrent.ref.name;
this.showVRCXUpdateDialog(); this.showVRCXUpdateDialog();
} }
} }
@@ -20765,7 +20812,8 @@ speechSynthesis.getVoices();
}; };
$app.data.checkingForVRCXUpdate = false; $app.data.checkingForVRCXUpdate = false;
$app.data.pendingVRCXUpdate = ''; $app.data.pendingVRCXInstall = '';
$app.data.pendingVRCXUpdate = false;
$app.data.branches = { $app.data.branches = {
Stable: { Stable: {
@@ -20893,7 +20941,7 @@ speechSynthesis.getVoices();
D.releases = releases; D.releases = releases;
D.release = json[0].name; D.release = json[0].name;
this.VRCXUpdateDialog.updatePendingIsLatest = false; this.VRCXUpdateDialog.updatePendingIsLatest = false;
if (D.release === this.pendingVRCXUpdate) { if (D.release === this.pendingVRCXInstall) {
// update already downloaded and latest version // update already downloaded and latest version
this.VRCXUpdateDialog.updatePendingIsLatest = true; this.VRCXUpdateDialog.updatePendingIsLatest = true;
} }
@@ -20903,6 +20951,9 @@ speechSynthesis.getVoices();
}; };
$app.methods.saveAutoUpdateVRCX = function () { $app.methods.saveAutoUpdateVRCX = function () {
if (this.autoUpdateVRCX === 'Off') {
this.pendingVRCXUpdate = false;
}
configRepository.setString('VRCX_autoUpdateVRCX', this.autoUpdateVRCX); configRepository.setString('VRCX_autoUpdateVRCX', this.autoUpdateVRCX);
}; };
@@ -20925,6 +20976,7 @@ speechSynthesis.getVoices();
url, url,
method: 'GET' method: 'GET'
}); });
this.pendingVRCXUpdate = false;
this.checkingForVRCXUpdate = false; this.checkingForVRCXUpdate = false;
var json = JSON.parse(response.data); var json = JSON.parse(response.data);
if (this.debugWebRequests) { if (this.debugWebRequests) {
@@ -20934,7 +20986,7 @@ speechSynthesis.getVoices();
this.latestAppVersion = json.name; this.latestAppVersion = json.name;
var name = json.name; var name = json.name;
this.VRCXUpdateDialog.updatePendingIsLatest = false; this.VRCXUpdateDialog.updatePendingIsLatest = false;
if (name === this.pendingVRCXUpdate) { if (name === this.pendingVRCXInstall) {
// update already downloaded // update already downloaded
this.VRCXUpdateDialog.updatePendingIsLatest = true; this.VRCXUpdateDialog.updatePendingIsLatest = true;
} else if (name > this.appVersion) { } else if (name > this.appVersion) {
@@ -20953,12 +21005,13 @@ speechSynthesis.getVoices();
if (!downloadUrl) { if (!downloadUrl) {
return; return;
} }
this.pendingVRCXUpdate = true;
this.notifyMenu('settings'); this.notifyMenu('settings');
var type = 'Auto'; var type = 'Auto';
if (!API.isLoggedIn) { if (!API.isLoggedIn) {
this.showVRCXUpdateDialog(); this.showVRCXUpdateDialog();
} else if (this.autoUpdateVRCX === 'Notify') { } else if (this.autoUpdateVRCX === 'Notify') {
this.showVRCXUpdateDialog(); // this.showVRCXUpdateDialog();
} else if (this.autoUpdateVRCX === 'Auto Download') { } else if (this.autoUpdateVRCX === 'Auto Download') {
var autoInstall = false; var autoInstall = false;
this.downloadVRCXUpdate( this.downloadVRCXUpdate(
+9 -1
View File
@@ -54,9 +54,11 @@ html
//- menu //- menu
.x-menu-container .x-menu-container
//- download progress //- download progress, update pending
div(v-if="downloadInProgress" @click="showDownloadDialog" style="margin:7px;height:50px;cursor:pointer") div(v-if="downloadInProgress" @click="showDownloadDialog" style="margin:7px;height:50px;cursor:pointer")
el-progress(type="circle" width="50" stroke-width="3" :percentage="downloadProgress" :format="downloadProgressText") el-progress(type="circle" width="50" stroke-width="3" :percentage="downloadProgress" :format="downloadProgressText")
div(v-else-if="pendingVRCXUpdate || pendingVRCXInstall" style="margin:7px;height:50px;width:50px")
el-button(type="default" @click="showVRCXUpdateDialog" size="mini" icon="el-icon-download" circle style="font-size:14px;height:50px;width:50px")
el-menu(ref="menu" collapse @select="selectMenu") el-menu(ref="menu" collapse @select="selectMenu")
mixin menuitem(index, name, icon) mixin menuitem(index, name, icon)
@@ -186,6 +188,9 @@ html
location(:location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName" :link="false") location(:location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName" :link="false")
span(v-else-if="scope.row.type === 'ChatBoxMessage'" v-text="scope.row.text") span(v-else-if="scope.row.type === 'ChatBoxMessage'" v-text="scope.row.text")
span(v-else-if="scope.row.type === 'OnPlayerJoined'") span(v-else-if="scope.row.type === 'OnPlayerJoined'")
span(v-if="scope.row.platform === 'Desktop'" style="color:#409eff") PC 
span(v-else-if="scope.row.platform === 'VR'" style="color:#409eff") VR 
span(v-else-if="scope.row.platform === 'Quest'" style="color:#67c23a") Q 
span.x-link(v-text="scope.row.avatar.name" @click="showAvatarDialog(scope.row.avatar.id)") span.x-link(v-text="scope.row.avatar.name" @click="showAvatarDialog(scope.row.avatar.id)")
|   |  
span(v-if="!scope.row.inCache" style="color:#aaa") #[i.el-icon-download]  span(v-if="!scope.row.inCache" style="color:#aaa") #[i.el-icon-download] 
@@ -247,6 +252,9 @@ html
location(:location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName" :link="false") location(:location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName" :link="false")
span(v-else-if="scope.row.type === 'ChatBoxMessage'" v-text="scope.row.text") span(v-else-if="scope.row.type === 'ChatBoxMessage'" v-text="scope.row.text")
span(v-else-if="scope.row.type === 'OnPlayerJoined'") span(v-else-if="scope.row.type === 'OnPlayerJoined'")
span(v-if="scope.row.platform === 'Desktop'" style="color:#409eff") PC 
span(v-else-if="scope.row.platform === 'VR'" style="color:#409eff") VR 
span(v-else-if="scope.row.platform === 'Quest'" style="color:#67c23a") Q 
span.x-link(v-text="scope.row.avatar.name" @click="showAvatarDialog(scope.row.avatar.id)") span.x-link(v-text="scope.row.avatar.name" @click="showAvatarDialog(scope.row.avatar.id)")
|   |  
span(v-if="!scope.row.inCache" style="color:#aaa") #[i.el-icon-download]  span(v-if="!scope.row.inCache" style="color:#aaa") #[i.el-icon-download] 
+3 -1
View File
@@ -375,7 +375,9 @@ Vue.component('marquee-text', MarqueeText);
if (this.nowPlaying.playing) { if (this.nowPlaying.playing) {
length -= 1; length -= 1;
} }
this.wristFeed.length = length; if (length < this.wristFeed.length) {
this.wristFeed.length = length;
}
}; };
$app.methods.updateStatsLoop = async function () { $app.methods.updateStatsLoop = async function () {
+11 -8
View File
@@ -481,13 +481,13 @@ html
div(v-for="feed in hudFeed") div(v-for="feed in hudFeed")
.item #[span(v-if="feed.isMaster") 👑]<strong>{{ feed.displayName }}</strong> .item #[span(v-if="feed.isMaster") 👑]<strong>{{ feed.displayName }}</strong>
template(v-if="feed.type === 'ChangeAvatar'") template(v-if="feed.type === 'ChangeAvatar'")
span(style="margin-left:10px") ChangeAvatar span(style="margin-left:10px;color:#a3a3a3") ChangeAvatar
span(v-if="!feed.inCache" style="color:#aaa;margin-left:10px") #[i.el-icon-download] span(v-if="!feed.inCache" style="color:#aaa;margin-left:10px") #[i.el-icon-download]
span(v-text="feed.avatar.name" style="margin-left:10px") span(v-text="feed.avatar.name" style="margin-left:10px")
span(v-if="feed.avatar.releaseStatus === 'public'" style="margin-left:10px;color:#67c23a") (Public) span(v-if="feed.avatar.releaseStatus === 'public'" style="margin-left:10px;color:#67c23a") (Public)
span(v-else-if="feed.avatar.releaseStatus === 'private'" style="margin-left:10px;color:#e6a23c") (Private) span(v-else-if="feed.avatar.releaseStatus === 'private'" style="margin-left:10px;color:#e6a23c") (Private)
template(v-else-if="feed.type === 'ChangeStatus'") template(v-else-if="feed.type === 'ChangeStatus'")
span(style="margin-left:10px") ChangeStatus span(style="margin-left:10px;color:#a3a3a3") ChangeStatus
template(v-if="feed.status !== feed.previousStatus") template(v-if="feed.status !== feed.previousStatus")
i.x-user-status(:class="statusClass(feed.previousStatus)" style="margin-left:10px;width:20px;height:20px") i.x-user-status(:class="statusClass(feed.previousStatus)" style="margin-left:10px;width:20px;height:20px")
span span
@@ -495,23 +495,26 @@ html
i.x-user-status(:class="statusClass(feed.status)" style="width:20px;height:20px") i.x-user-status(:class="statusClass(feed.status)" style="width:20px;height:20px")
span(v-if="feed.statusDescription !== feed.previousStatusDescription" v-text="feed.statusDescription" style="margin-left:10px") span(v-if="feed.statusDescription !== feed.previousStatusDescription" v-text="feed.statusDescription" style="margin-left:10px")
template(v-else-if="feed.type === 'ChangeGroup'") template(v-else-if="feed.type === 'ChangeGroup'")
span(style="margin-left:10px") ChangeGroup span(style="margin-left:10px;color:#a3a3a3") ChangeGroup
span(v-text="feed.groupName" style="margin-left:10px") span(v-text="feed.groupName" style="margin-left:10px")
template(v-else-if="feed.type === 'ChatBoxMessage'") template(v-else-if="feed.type === 'ChatBoxMessage'")
span(style="margin-left:10px") ChatBox span(style="margin-left:10px;color:#a3a3a3") ChatBox
span(v-text="feed.text" style="margin-left:10px;white-space:normal") span(v-text="feed.text" style="margin-left:10px;white-space:normal")
template(v-else-if="feed.type === 'PortalSpawn'") template(v-else-if="feed.type === 'PortalSpawn'")
span(style="margin-left:10px") PortalSpawn span(style="margin-left:10px;color:#a3a3a3") PortalSpawn
location(:location="feed.location" :hint="feed.worldName" :link="false" style="margin-left:10px") location(:location="feed.location" :hint="feed.worldName" :link="false" style="margin-left:10px")
template(v-else-if="feed.type === 'OnPlayerJoined'") template(v-else-if="feed.type === 'OnPlayerJoined'")
span(style="margin-left:10px") has joined - span(style="margin-left:10px;color:#a3a3a3") has joined
span(v-if="feed.platform === 'Desktop'" style="color:#409eff;margin-left:10px") PC
span(v-else-if="feed.platform === 'VR'" style="color:#409eff;margin-left:10px") VR
span(v-else-if="feed.platform === 'Quest'" style="color:#67c23a;margin-left:10px") Q
span(v-if="!feed.inCache" style="color:#aaa;margin-left:10px") #[i.el-icon-download] span(v-if="!feed.inCache" style="color:#aaa;margin-left:10px") #[i.el-icon-download]
span(v-text="feed.avatar.name" style="margin-left:10px") span(v-text="feed.avatar.name" style="margin-left:10px")
template(v-else-if="feed.type === 'SpawnEmoji'") template(v-else-if="feed.type === 'SpawnEmoji'")
span(style="margin-left:10px") SpawnEmoji span(style="margin-left:10px;color:#a3a3a3") SpawnEmoji
span(v-text="feed.text" style="margin-left:10px") span(v-text="feed.text" style="margin-left:10px")
span(v-else-if="feed.color === 'yellow'" v-text="feed.text" style="color:yellow;margin-left:10px") span(v-else-if="feed.color === 'yellow'" v-text="feed.text" style="color:yellow;margin-left:10px")
span(v-else style="margin-left:10px" v-text="feed.text") span(v-else style="margin-left:10px;color:#a3a3a3" v-text="feed.text")
template(v-if="feed.combo > 1") template(v-if="feed.combo > 1")
span.combo(style="margin-left:10px") x{{ feed.combo }} span.combo(style="margin-left:10px") x{{ feed.combo }}
.hud-timeout(v-if="hudTimeout.length > 0") .hud-timeout(v-if="hudTimeout.length > 0")