mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-13 20:03:51 +02:00
fix local friend favorites
This commit is contained in:
@@ -32,18 +32,22 @@
|
||||
</div>
|
||||
<div v-if="favoriteDialog.type === 'friend'" style="margin-top: 20px">
|
||||
<span style="display: block; text-align: center">{{ t('dialog.favorite.local_favorites') }}</span>
|
||||
<template v-for="group in localFriendFavoriteGroups" :key="group">
|
||||
<template v-if="currentLocalFriendGroup">
|
||||
<Button
|
||||
variant="outline"
|
||||
v-if="hasLocalFriendFavorite(favoriteDialog.objectId, group)"
|
||||
style="width: 100%; white-space: initial"
|
||||
class="my-1"
|
||||
@click="removeLocalFriendFavorite(favoriteDialog.objectId, group)">
|
||||
<Check />{{ group }} ({{ localFriendFavGroupLength(group) }})
|
||||
@click="removeLocalFriendFavorite(favoriteDialog.objectId, currentLocalFriendGroup)">
|
||||
<Check />{{ currentLocalFriendGroup }} ({{
|
||||
localFriendFavGroupLength(currentLocalFriendGroup)
|
||||
}})
|
||||
</Button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<Button
|
||||
variant="outline"
|
||||
v-else
|
||||
v-for="group in localFriendFavoriteGroups"
|
||||
:key="group"
|
||||
style="width: 100%; white-space: initial"
|
||||
class="my-1"
|
||||
@click="addLocalFriendFavorite(favoriteDialog.objectId, group)">
|
||||
@@ -150,6 +154,16 @@
|
||||
}
|
||||
});
|
||||
|
||||
const currentLocalFriendGroup = computed(() => {
|
||||
const objectId = favoriteDialog.value.objectId;
|
||||
for (const group of localFriendFavoriteGroups.value) {
|
||||
if (hasLocalFriendFavorite(objectId, group)) {
|
||||
return group;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => favoriteDialog.value.visible,
|
||||
(value) => {
|
||||
|
||||
Reference in New Issue
Block a user