mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-01 12:43:46 +02:00
use computed to extract data
This commit is contained in:
@@ -102,14 +102,8 @@
|
||||
const emit = defineEmits(['update:avatarExportDialogVisible']);
|
||||
|
||||
const favoriteStore = useFavoriteStore();
|
||||
const {
|
||||
favoriteAvatars,
|
||||
favoriteAvatarGroups,
|
||||
localAvatarFavorites,
|
||||
localAvatarFavoritesList,
|
||||
localAvatarFavoriteGroups
|
||||
} = storeToRefs(favoriteStore);
|
||||
const { localAvatarFavGroupLength } = favoriteStore;
|
||||
const { favoriteAvatars, favoriteAvatarGroups, localAvatarFavorites } = storeToRefs(favoriteStore);
|
||||
const { localAvatarFavGroupLength, localAvatarFavoritesList, localAvatarFavoriteGroups } = favoriteStore;
|
||||
const { cachedAvatars } = useAvatarStore();
|
||||
|
||||
const avatarExportContent = ref('');
|
||||
@@ -213,8 +207,8 @@
|
||||
favoriteAvatars.value.forEach((ref) => {
|
||||
lines.push(resText(ref.ref));
|
||||
});
|
||||
for (let i = 0; i < localAvatarFavoritesList.value.length; ++i) {
|
||||
const avatarId = localAvatarFavoritesList.value[i];
|
||||
for (let i = 0; i < localAvatarFavoritesList.length; ++i) {
|
||||
const avatarId = localAvatarFavoritesList[i];
|
||||
const ref = cachedAvatars.get(avatarId);
|
||||
if (typeof ref !== 'undefined') {
|
||||
lines.push(resText(ref));
|
||||
|
||||
@@ -190,9 +190,9 @@
|
||||
const emit = defineEmits(['update:avatarImportDialogInput']);
|
||||
const { t } = useI18n();
|
||||
const { showUserDialog } = useUserStore();
|
||||
const { favoriteAvatarGroups, avatarImportDialogInput, avatarImportDialogVisible, localAvatarFavoriteGroups } =
|
||||
const { favoriteAvatarGroups, avatarImportDialogInput, avatarImportDialogVisible } =
|
||||
storeToRefs(useFavoriteStore());
|
||||
const { addLocalAvatarFavorite, localAvatarFavGroupLength } = useFavoriteStore();
|
||||
const { addLocalAvatarFavorite, localAvatarFavGroupLength, localAvatarFavoriteGroups } = useFavoriteStore();
|
||||
const { showAvatarDialog, applyAvatar } = useAvatarStore();
|
||||
const { showFullscreenImageDialog } = useGalleryStore();
|
||||
|
||||
|
||||
@@ -100,14 +100,8 @@
|
||||
const { t } = useI18n();
|
||||
|
||||
const favoriteStore = useFavoriteStore();
|
||||
const {
|
||||
favoriteWorlds,
|
||||
favoriteWorldGroups,
|
||||
localWorldFavorites,
|
||||
localWorldFavoriteGroups,
|
||||
localWorldFavoritesList
|
||||
} = storeToRefs(favoriteStore);
|
||||
const { localWorldFavGroupLength } = favoriteStore;
|
||||
const { favoriteWorlds, favoriteWorldGroups, localWorldFavorites } = storeToRefs(favoriteStore);
|
||||
const { localWorldFavGroupLength, localWorldFavoritesList, localWorldFavoriteGroups } = favoriteStore;
|
||||
const { cachedWorlds } = useWorldStore();
|
||||
|
||||
const worldExportContent = ref('');
|
||||
@@ -215,8 +209,8 @@
|
||||
favoriteWorlds.value.forEach((ref) => {
|
||||
lines.push(resText(ref.ref));
|
||||
});
|
||||
for (let i = 0; i < localWorldFavoritesList.value.length; ++i) {
|
||||
const worldId = localWorldFavoritesList.value[i];
|
||||
for (let i = 0; i < localWorldFavoritesList.length; ++i) {
|
||||
const worldId = localWorldFavoritesList[i];
|
||||
const ref = cachedWorlds.get(worldId);
|
||||
if (typeof ref !== 'undefined') {
|
||||
lines.push(resText(ref));
|
||||
|
||||
@@ -184,9 +184,8 @@
|
||||
import { removeFromArray } from '../../../shared/utils';
|
||||
|
||||
const { showUserDialog } = useUserStore();
|
||||
const { favoriteWorldGroups, worldImportDialogInput, worldImportDialogVisible, localWorldFavoriteGroups } =
|
||||
storeToRefs(useFavoriteStore());
|
||||
const { localWorldFavGroupLength, addLocalWorldFavorite } = useFavoriteStore();
|
||||
const { favoriteWorldGroups, worldImportDialogInput, worldImportDialogVisible } = storeToRefs(useFavoriteStore());
|
||||
const { localWorldFavGroupLength, addLocalWorldFavorite, localWorldFavoriteGroups } = useFavoriteStore();
|
||||
const { showWorldDialog } = useWorldStore();
|
||||
const { showFullscreenImageDialog } = useGalleryStore();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user