Updates and fixes

This commit is contained in:
Natsumi
2024-05-23 21:11:46 +12:00
parent d9bb77d395
commit 55ebcb1ad7
5 changed files with 27 additions and 38 deletions
+2 -2
View File
@@ -1157,7 +1157,7 @@ namespace VRCX
{ {
// 2023.09.26 04:12:57 Warning - Could not Start OSC: Address already in use // 2023.09.26 04:12:57 Warning - Could not Start OSC: Address already in use
if (string.Compare(line, offset, "VRChat could not start OSC server, TLDR: delete install.exe (https://vrchat.canny.io/bug-reports/p/installexe-breaks-osc-port-binding): ", 0, 21, StringComparison.Ordinal) != 0) if (string.Compare(line, offset, "Could not Start OSC: ", 0, 21, StringComparison.Ordinal) != 0)
return false; return false;
AppendLog(new[] AppendLog(new[]
@@ -1165,7 +1165,7 @@ namespace VRCX
fileInfo.Name, fileInfo.Name,
ConvertLogTimeToISO8601(line), ConvertLogTimeToISO8601(line),
"event", "event",
line.Substring(offset) $"VRChat could not start OSC server, You may be affected by (https://vrchat.canny.io/bug-reports/p/installexe-breaks-osc-port-binding) \"{line.Substring(offset)}\""
}); });
return true; return true;
} }
+17 -28
View File
@@ -1690,6 +1690,10 @@ speechSynthesis.getVoices();
}; };
API.applyPresenceGroups = function (ref) { API.applyPresenceGroups = function (ref) {
if (!this.currentUserGroupsInit) {
// wait for init before diffing
return;
}
var groups = ref.presence?.groups; var groups = ref.presence?.groups;
if (!groups) { if (!groups) {
console.error('API.applyPresenceGroups: invalid groups', ref); console.error('API.applyPresenceGroups: invalid groups', ref);
@@ -1700,14 +1704,6 @@ speechSynthesis.getVoices();
return; return;
} }
if (groups.length !== this.currentUserGroups.size) {
console.log(
`applyPresenceGroups: size old: ${this.currentUserGroups.size} new: ${groups.length}`,
this.currentUserGroups,
groups
);
}
// update group list // update group list
for (var groupId of groups) { for (var groupId of groups) {
if (!this.currentUserGroups.has(groupId)) { if (!this.currentUserGroups.has(groupId)) {
@@ -4427,6 +4423,7 @@ speechSynthesis.getVoices();
} }
this.refreshFavoriteItems(); this.refreshFavoriteItems();
this.refreshFavoriteGroups(); this.refreshFavoriteGroups();
$app.updateLocalFavoriteFriends();
this.isFavoriteLoading = false; this.isFavoriteLoading = false;
} }
}); });
@@ -24768,10 +24765,10 @@ speechSynthesis.getVoices();
$app.methods.getCurrentUserGroups = async function () { $app.methods.getCurrentUserGroups = async function () {
var args = await API.getGroups({ userId: API.currentUser.id }); var args = await API.getGroups({ userId: API.currentUser.id });
API.currentUserGroups.clear(); API.currentUserGroups.clear();
args.json.forEach((group) => { for (var group of args.json) {
var ref = API.applyGroup(group); var ref = API.applyGroup(group);
API.currentUserGroups.set(group.id, ref); API.currentUserGroups.set(group.id, ref);
}); }
await API.getGroupPermissions({ userId: API.currentUser.id }); await API.getGroupPermissions({ userId: API.currentUser.id });
this.saveCurrentUserGroups(); this.saveCurrentUserGroups();
}; };
@@ -26451,12 +26448,14 @@ speechSynthesis.getVoices();
}; };
$app.methods.isRealInstance = function (instanceId) { $app.methods.isRealInstance = function (instanceId) {
if (!instanceId) {
return false;
}
switch (instanceId) { switch (instanceId) {
case 'offline': case 'offline':
case 'private': case 'private':
case 'traveling': case 'traveling':
case instanceId.startsWith('local'): case instanceId.startsWith('local'):
case '':
return false; return false;
} }
return true; return true;
@@ -27898,7 +27897,7 @@ speechSynthesis.getVoices();
this.localFavoriteFriends.clear(); this.localFavoriteFriends.clear();
for (var ref of API.cachedFavorites.values()) { for (var ref of API.cachedFavorites.values()) {
if ( if (
ref.$isDeleted === false && !ref.$isDeleted &&
ref.type === 'friend' && ref.type === 'friend' &&
(this.localFavoriteFriendsGroups.length === 0 || (this.localFavoriteFriendsGroups.length === 0 ||
this.localFavoriteFriendsGroups.includes(ref.$groupKey)) this.localFavoriteFriendsGroups.includes(ref.$groupKey))
@@ -29790,7 +29789,6 @@ speechSynthesis.getVoices();
API.currentUserGroups.set(group.id, ref); API.currentUserGroups.set(group.id, ref);
} }
var fetchedRoles = false;
if (groups) { if (groups) {
for (var i = 0; i < groups.length; i++) { for (var i = 0; i < groups.length; i++) {
var groupId = groups[i]; var groupId = groups[i];
@@ -29809,7 +29807,6 @@ speechSynthesis.getVoices();
}); });
var ref = API.applyGroup(args.json); var ref = API.applyGroup(args.json);
API.currentUserGroups.set(groupId, ref); API.currentUserGroups.set(groupId, ref);
fetchedRoles = true;
console.log(`Fetched group ${ref.name}`); console.log(`Fetched group ${ref.name}`);
} catch (err) { } catch (err) {
console.error(err); console.error(err);
@@ -29818,9 +29815,6 @@ speechSynthesis.getVoices();
} }
this.currentUserGroupsInit = true; this.currentUserGroupsInit = true;
if (fetchedRoles) {
this.saveCurrentUserGroups();
}
}; };
API.applyGroupMember = function (json) { API.applyGroupMember = function (json) {
@@ -30189,23 +30183,18 @@ speechSynthesis.getVoices();
// ignore this event if we were the one to trigger it // ignore this event if we were the one to trigger it
return; return;
} }
// if (this.groupDialog.visible && this.groupDialog.id === groupId) {
// this.showGroupDialog(groupId);
// }
if (!API.currentUserGroups.has(groupId)) { if (!API.currentUserGroups.has(groupId)) {
API.currentUserGroups.set(groupId, { API.currentUserGroups.set(groupId, {
id: groupId, id: groupId,
name: '', name: '',
iconUrl: '' iconUrl: ''
}); });
if (this.friendLogInitStatus) { API.getGroup({ groupId, includeRoles: true }).then((args) => {
API.getGroup({ groupId, includeRoles: true }).then((args) => { var ref = API.applyGroup(args.json);
var ref = API.applyGroup(args.json); API.currentUserGroups.set(groupId, ref);
API.currentUserGroups.set(groupId, ref); this.saveCurrentUserGroups();
this.saveCurrentUserGroups(); return args;
return args; });
});
}
} }
}; };
+5 -5
View File
@@ -983,17 +983,17 @@ html
.group-description(style="margin-top:5px") .group-description(style="margin-top:5px")
span(v-show="groupDialog.ref.name !== groupDialog.ref.description" v-text="groupDialog.ref.description" style="font-size:12px") span(v-show="groupDialog.ref.name !== groupDialog.ref.description" v-text="groupDialog.ref.description" style="font-size:12px")
div(style="flex:none;margin-left:10px") div(style="flex:none;margin-left:10px")
template(v-if="groupDialog.inGroup") template(v-if="groupDialog.inGroup && groupDialog.ref?.myMember")
el-tooltip(v-if="groupDialog.ref.isRepresenting" placement="top" :content="$t('dialog.group.actions.unrepresent_tooltip')" :disabled="hideTooltips") el-tooltip(v-if="groupDialog.ref.myMember?.isRepresenting" placement="top" :content="$t('dialog.group.actions.unrepresent_tooltip')" :disabled="hideTooltips")
el-button(type="warning" icon="el-icon-star-on" circle @click="clearGroupRepresentation(groupDialog.id)" style="margin-left:5px") el-button(type="warning" icon="el-icon-star-on" circle @click="clearGroupRepresentation(groupDialog.id)" style="margin-left:5px")
el-tooltip(v-else placement="top" :content="$t('dialog.group.actions.represent_tooltip')" :disabled="hideTooltips") el-tooltip(v-else placement="top" :content="$t('dialog.group.actions.represent_tooltip')" :disabled="hideTooltips")
span span
el-button(type="default" icon="el-icon-star-off" circle @click="setGroupRepresentation(groupDialog.id)" style="margin-left:5px" :disabled="groupDialog.ref.privacy === 'private'") el-button(type="default" icon="el-icon-star-off" circle @click="setGroupRepresentation(groupDialog.id)" style="margin-left:5px" :disabled="groupDialog.ref.privacy === 'private'")
template(v-else-if="groupDialog.ref.membershipStatus === 'requested'") template(v-else-if="groupDialog.ref.myMember?.membershipStatus === 'requested'")
el-tooltip(placement="top" :content="$t('dialog.group.actions.cancel_join_request_tooltip')" :disabled="hideTooltips") el-tooltip(placement="top" :content="$t('dialog.group.actions.cancel_join_request_tooltip')" :disabled="hideTooltips")
span span
el-button(type="default" icon="el-icon-close" circle @click="cancelGroupRequest(groupDialog.id)" style="margin-left:5px") el-button(type="default" icon="el-icon-close" circle @click="cancelGroupRequest(groupDialog.id)" style="margin-left:5px")
template(v-else-if="groupDialog.ref.membershipStatus === 'invited'") template(v-else-if="groupDialog.ref.myMember?.membershipStatus === 'invited'")
el-tooltip(placement="top" :content="$t('dialog.group.actions.pending_request_tooltip')" :disabled="hideTooltips") el-tooltip(placement="top" :content="$t('dialog.group.actions.pending_request_tooltip')" :disabled="hideTooltips")
span span
el-button(type="default" icon="el-icon-check" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px") el-button(type="default" icon="el-icon-check" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
@@ -1395,7 +1395,7 @@ html
el-input(v-for="(link, index) in bioDialog.bioLinks" :key="index" :value="link" v-model="bioDialog.bioLinks[index]" size="small" style="margin-top:5px") el-input(v-for="(link, index) in bioDialog.bioLinks" :key="index" :value="link" v-model="bioDialog.bioLinks[index]" size="small" style="margin-top:5px")
img(slot="prepend" :src="getFaviconUrl(link)" style="width:16px;height:16px") img(slot="prepend" :src="getFaviconUrl(link)" style="width:16px;height:16px")
el-button(slot="append" icon="el-icon-delete" @click="bioDialog.bioLinks.splice(index, 1)") el-button(slot="append" icon="el-icon-delete" @click="bioDialog.bioLinks.splice(index, 1)")
el-button(@click="bioDialog.bioLinks.push('')" size="mini" style="margin-top:5px") {{ $t('dialog.bio.add_link') }} el-button(@click="bioDialog.bioLinks.push('')" :disabled="bioDialog.bioLinks.length >= 3" size="mini" style="margin-top:5px") {{ $t('dialog.bio.add_link') }}
template(#footer) template(#footer)
el-button(type="primary" size="small" :disabled="bioDialog.loading" @click="saveBio") {{ $t('dialog.bio.update') }} el-button(type="primary" size="small" :disabled="bioDialog.loading" @click="saveBio") {{ $t('dialog.bio.update') }}
+1 -1
View File
@@ -40,7 +40,7 @@ mixin loginPage()
div.x-legal-notice-container div.x-legal-notice-container
div(style="text-align:center;font-size:12px") div(style="text-align:center;font-size:12px")
p #[a.x-link(@click="openExternalLink('https://vrchat.com/home/password')") {{ $t("view.login.forgotPassword") }}] p #[a.x-link(@click="openExternalLink('https://vrchat.com/home/password')") {{ $t("view.login.forgotPassword") }}]
p &copy; 2019-2022 #[a.x-link(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] &amp; #[a.x-link(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi] p &copy; 2019-2024 #[a.x-link(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] &amp; #[a.x-link(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi]
p {{ $t("view.settings.general.legal_notice.info") }} p {{ $t("view.settings.general.legal_notice.info") }}
p {{ $t("view.settings.general.legal_notice.disclaimer1") }} p {{ $t("view.settings.general.legal_notice.disclaimer1") }}
p {{ $t("view.settings.general.legal_notice.disclaimer2") }} p {{ $t("view.settings.general.legal_notice.disclaimer2") }}
+2 -2
View File
@@ -2158,7 +2158,7 @@ class Database {
); );
} }
async getAvatarHistory(currentUserId) { async getAvatarHistory(currentUserId, limit = 100) {
var data = []; var data = [];
await sqliteService.execute((dbRow) => { await sqliteService.execute((dbRow) => {
var row = { var row = {
@@ -2175,7 +2175,7 @@ class Database {
version: dbRow[13] version: dbRow[13]
}; };
data.push(row); data.push(row);
}, `SELECT * FROM ${Database.userPrefix}_avatar_history INNER JOIN cache_avatar ON cache_avatar.id = ${Database.userPrefix}_avatar_history.avatar_id WHERE author_id != "${currentUserId}" ORDER BY ${Database.userPrefix}_avatar_history.created_at DESC LIMIT 100`); }, `SELECT * FROM ${Database.userPrefix}_avatar_history INNER JOIN cache_avatar ON cache_avatar.id = ${Database.userPrefix}_avatar_history.avatar_id WHERE author_id != "${currentUserId}" ORDER BY ${Database.userPrefix}_avatar_history.created_at DESC LIMIT ${limit}`);
return data; return data;
} }