Fix traveling world name, fix sorting grouped players in same instance

This commit is contained in:
Natsumi
2025-09-29 13:41:12 +13:00
parent feef537cb3
commit 9872cf1d93
6 changed files with 69 additions and 294 deletions
+5 -15
View File
@@ -466,10 +466,7 @@
:model-value="sidebarSortMethod1"
style="width: 170px"
:placeholder="t('view.settings.appearance.side_panel.sorting.placeholder')"
@change="
setSidebarSortMethod1($event);
saveSidebarSortOrder();
">
@change="setSidebarSortMethod1($event)">
<el-option-group :label="t('view.settings.appearance.side_panel.sorting.dropdown_header')">
<el-option
class="x-friend-item"
@@ -501,17 +498,14 @@
value="Sort by Location"></el-option>
</el-option-group>
</el-select>
<el-icon><ArrowRight /></el-icon>
<el-icon style="padding: 5px"><ArrowRight /></el-icon>
<el-select
:model-value="sidebarSortMethod2"
:disabled="!sidebarSortMethod1"
style="width: 170px"
clearable
:placeholder="t('view.settings.appearance.side_panel.sorting.placeholder')"
@change="
setSidebarSortMethod2($event);
saveSidebarSortOrder();
">
@change="setSidebarSortMethod2($event)">
<el-option-group :label="t('view.settings.appearance.side_panel.sorting.dropdown_header')">
<el-option
class="x-friend-item"
@@ -543,17 +537,14 @@
value="Sort by Location"></el-option>
</el-option-group>
</el-select>
<el-icon><ArrowRight /></el-icon>
<el-icon style="padding: 5px"><ArrowRight /></el-icon>
<el-select
:model-value="sidebarSortMethod3"
:disabled="!sidebarSortMethod2"
style="width: 170px"
clearable
:placeholder="t('view.settings.appearance.side_panel.sorting.placeholder')"
@change="
setSidebarSortMethod3($event);
saveSidebarSortOrder();
">
@change="setSidebarSortMethod3($event)">
<el-option-group :label="t('view.settings.appearance.side_panel.sorting.dropdown_header')">
<el-option
class="x-friend-item"
@@ -1493,7 +1484,6 @@
const { showConsole } = useVrcxStore();
const { disableGameLogDialog } = useGameLogStore();
const { photonLoggingEnabled } = storeToRefs(usePhotonStore());
const { saveSidebarSortOrder } = useFriendStore();
const { cachedWorlds } = useWorldStore();
const { cachedInstances } = useInstanceStore();
const { showLaunchOptions } = useLaunchStore();
@@ -175,7 +175,7 @@
import { useI18n } from 'vue-i18n';
import FriendItem from '../../../components/FriendItem.vue';
import configRepository from '../../../service/config';
import { isRealInstance, userImage, userStatusClass } from '../../../shared/utils';
import { isRealInstance, userImage, userStatusClass, getFriendsSortFunction } from '../../../shared/utils';
import {
useAdvancedSettingsStore,
useAppearanceSettingsStore,
@@ -189,7 +189,7 @@
const { t } = useI18n();
const { vipFriends, onlineFriends, activeFriends, offlineFriends } = storeToRefs(useFriendStore());
const { isSidebarGroupByInstance, isHideFriendsInSameInstance, isSidebarDivideByFriendGroup } =
const { isSidebarGroupByInstance, isHideFriendsInSameInstance, isSidebarDivideByFriendGroup, sidebarSortMethods } =
storeToRefs(useAppearanceSettingsStore());
const { gameLogDisabled } = storeToRefs(useAdvancedSettingsStore());
const { showUserDialog } = useUserStore();
@@ -234,7 +234,7 @@
const sortedFriendsList = [];
for (const group of Object.values(friendsList)) {
if (group.length > 1) {
sortedFriendsList.push(group.sort((a, b) => a.ref?.$location_at - b.ref?.$location_at));
sortedFriendsList.push(group.sort(getFriendsSortFunction(sidebarSortMethods.value)));
}
}