diff --git a/Dotnet/LogWatcher.cs b/Dotnet/LogWatcher.cs index fc4987dc..d626c5cc 100644 --- a/Dotnet/LogWatcher.cs +++ b/Dotnet/LogWatcher.cs @@ -1157,7 +1157,7 @@ namespace VRCX { // 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; AppendLog(new[] @@ -1165,7 +1165,7 @@ namespace VRCX fileInfo.Name, ConvertLogTimeToISO8601(line), "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; } diff --git a/html/src/app.js b/html/src/app.js index 2f54ab5c..4ff1c20a 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -1690,6 +1690,10 @@ speechSynthesis.getVoices(); }; API.applyPresenceGroups = function (ref) { + if (!this.currentUserGroupsInit) { + // wait for init before diffing + return; + } var groups = ref.presence?.groups; if (!groups) { console.error('API.applyPresenceGroups: invalid groups', ref); @@ -1700,14 +1704,6 @@ speechSynthesis.getVoices(); return; } - if (groups.length !== this.currentUserGroups.size) { - console.log( - `applyPresenceGroups: size old: ${this.currentUserGroups.size} new: ${groups.length}`, - this.currentUserGroups, - groups - ); - } - // update group list for (var groupId of groups) { if (!this.currentUserGroups.has(groupId)) { @@ -4427,6 +4423,7 @@ speechSynthesis.getVoices(); } this.refreshFavoriteItems(); this.refreshFavoriteGroups(); + $app.updateLocalFavoriteFriends(); this.isFavoriteLoading = false; } }); @@ -24768,10 +24765,10 @@ speechSynthesis.getVoices(); $app.methods.getCurrentUserGroups = async function () { var args = await API.getGroups({ userId: API.currentUser.id }); API.currentUserGroups.clear(); - args.json.forEach((group) => { + for (var group of args.json) { var ref = API.applyGroup(group); API.currentUserGroups.set(group.id, ref); - }); + } await API.getGroupPermissions({ userId: API.currentUser.id }); this.saveCurrentUserGroups(); }; @@ -26451,12 +26448,14 @@ speechSynthesis.getVoices(); }; $app.methods.isRealInstance = function (instanceId) { + if (!instanceId) { + return false; + } switch (instanceId) { case 'offline': case 'private': case 'traveling': case instanceId.startsWith('local'): - case '': return false; } return true; @@ -27898,7 +27897,7 @@ speechSynthesis.getVoices(); this.localFavoriteFriends.clear(); for (var ref of API.cachedFavorites.values()) { if ( - ref.$isDeleted === false && + !ref.$isDeleted && ref.type === 'friend' && (this.localFavoriteFriendsGroups.length === 0 || this.localFavoriteFriendsGroups.includes(ref.$groupKey)) @@ -29790,7 +29789,6 @@ speechSynthesis.getVoices(); API.currentUserGroups.set(group.id, ref); } - var fetchedRoles = false; if (groups) { for (var i = 0; i < groups.length; i++) { var groupId = groups[i]; @@ -29809,7 +29807,6 @@ speechSynthesis.getVoices(); }); var ref = API.applyGroup(args.json); API.currentUserGroups.set(groupId, ref); - fetchedRoles = true; console.log(`Fetched group ${ref.name}`); } catch (err) { console.error(err); @@ -29818,9 +29815,6 @@ speechSynthesis.getVoices(); } this.currentUserGroupsInit = true; - if (fetchedRoles) { - this.saveCurrentUserGroups(); - } }; API.applyGroupMember = function (json) { @@ -30189,23 +30183,18 @@ speechSynthesis.getVoices(); // ignore this event if we were the one to trigger it return; } - // if (this.groupDialog.visible && this.groupDialog.id === groupId) { - // this.showGroupDialog(groupId); - // } if (!API.currentUserGroups.has(groupId)) { API.currentUserGroups.set(groupId, { id: groupId, name: '', iconUrl: '' }); - if (this.friendLogInitStatus) { - API.getGroup({ groupId, includeRoles: true }).then((args) => { - var ref = API.applyGroup(args.json); - API.currentUserGroups.set(groupId, ref); - this.saveCurrentUserGroups(); - return args; - }); - } + API.getGroup({ groupId, includeRoles: true }).then((args) => { + var ref = API.applyGroup(args.json); + API.currentUserGroups.set(groupId, ref); + this.saveCurrentUserGroups(); + return args; + }); } }; diff --git a/html/src/index.pug b/html/src/index.pug index 5e36c882..b481b9ef 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -983,17 +983,17 @@ html .group-description(style="margin-top:5px") 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") - template(v-if="groupDialog.inGroup") - el-tooltip(v-if="groupDialog.ref.isRepresenting" placement="top" :content="$t('dialog.group.actions.unrepresent_tooltip')" :disabled="hideTooltips") + template(v-if="groupDialog.inGroup && groupDialog.ref?.myMember") + 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-tooltip(v-else placement="top" :content="$t('dialog.group.actions.represent_tooltip')" :disabled="hideTooltips") span 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") span 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") span 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") 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(@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) el-button(type="primary" size="small" :disabled="bioDialog.loading" @click="saveBio") {{ $t('dialog.bio.update') }} diff --git a/html/src/mixins/loginPage.pug b/html/src/mixins/loginPage.pug index de8c7972..cf45bbc2 100644 --- a/html/src/mixins/loginPage.pug +++ b/html/src/mixins/loginPage.pug @@ -40,7 +40,7 @@ mixin loginPage() div.x-legal-notice-container div(style="text-align:center;font-size:12px") p #[a.x-link(@click="openExternalLink('https://vrchat.com/home/password')") {{ $t("view.login.forgotPassword") }}] - p © 2019-2022 #[a.x-link(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] & #[a.x-link(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi] + p © 2019-2024 #[a.x-link(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] & #[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.disclaimer1") }} p {{ $t("view.settings.general.legal_notice.disclaimer2") }} \ No newline at end of file diff --git a/html/src/repository/database.js b/html/src/repository/database.js index c914b4c0..f9eefc12 100644 --- a/html/src/repository/database.js +++ b/html/src/repository/database.js @@ -2158,7 +2158,7 @@ class Database { ); } - async getAvatarHistory(currentUserId) { + async getAvatarHistory(currentUserId, limit = 100) { var data = []; await sqliteService.execute((dbRow) => { var row = { @@ -2175,7 +2175,7 @@ class Database { version: dbRow[13] }; 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; }