mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 00:03:51 +02:00
refactor store
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
import { userImage, userStatusClass } from '../../../shared/utils';
|
||||
|
||||
import '@/styles/status-icon.css';
|
||||
import { showUserDialog } from '../../../coordinators/userCoordinator';
|
||||
|
||||
const props = defineProps({
|
||||
friend: { type: Object, required: true },
|
||||
@@ -89,7 +90,7 @@
|
||||
const { hideNicknames } = storeToRefs(useAppearanceSettingsStore());
|
||||
const { isRefreshFriendsLoading, allFavoriteFriendIds } = storeToRefs(useFriendStore());
|
||||
const { confirmDeleteFriend } = useFriendStore();
|
||||
const { showUserDialog } = useUserStore();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const isFriendTraveling = computed(() => props.friend.ref?.location === 'traveling');
|
||||
|
||||
@@ -216,6 +216,7 @@
|
||||
import configRepository from '../../../service/config';
|
||||
|
||||
import '@/styles/status-icon.css';
|
||||
import { showUserDialog } from '../../../coordinators/userCoordinator';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -238,7 +239,7 @@
|
||||
sidebarSortMethods
|
||||
} = storeToRefs(appearanceSettingsStore);
|
||||
const { gameLogDisabled } = storeToRefs(useAdvancedSettingsStore());
|
||||
const { showUserDialog, showSendBoopDialog } = useUserStore();
|
||||
const { showSendBoopDialog } = useUserStore();
|
||||
const launchStore = useLaunchStore();
|
||||
const { favoriteFriendGroups, groupedByGroupKeyFavoriteFriends, localFriendFavorites } =
|
||||
storeToRefs(useFavoriteStore());
|
||||
|
||||
@@ -255,6 +255,8 @@
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { useGameStore, useGroupStore, useLocationStore, useNotificationStore, useUserStore } from '../../../stores';
|
||||
import { showGroupDialog } from '../../../coordinators/groupCoordinator';
|
||||
import { showUserDialog } from '../../../coordinators/userCoordinator';
|
||||
import { checkCanInvite, userImage } from '../../../shared/utils';
|
||||
|
||||
import Location from '../../../components/Location.vue';
|
||||
@@ -461,13 +463,13 @@
|
||||
if (userId.startsWith('grp_') || n.type?.startsWith('group.') || n.type === 'groupChange') {
|
||||
const groupId = userId.startsWith('grp_') ? userId : n.data?.groupId || n.details?.groupId || '';
|
||||
if (groupId) {
|
||||
groupStore.showGroupDialog(groupId);
|
||||
showGroupDialog(groupId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (userId) {
|
||||
userStore.showUserDialog(userId);
|
||||
showUserDialog(userId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user