refactor store

This commit is contained in:
pa
2026-03-10 15:25:23 +09:00
parent d7220baaf6
commit 95c4a1d3e6
82 changed files with 3243 additions and 3066 deletions

View File

@@ -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');

View File

@@ -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());

View File

@@ -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;
}