mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 14:26:06 +02:00
fix
This commit is contained in:
@@ -145,7 +145,9 @@
|
||||
:model-value="group.visibility === visibility"
|
||||
indicator-position="right"
|
||||
@select="handleVisibilitySelection(group, visibility)">
|
||||
<span>{{ t(`view.favorite.visibility.${visibility}`) }}</span>
|
||||
<span>{{
|
||||
t(`view.favorite.visibility.${visibility}`)
|
||||
}}</span>
|
||||
</DropdownMenuCheckboxItem>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuPortal>
|
||||
@@ -536,6 +538,7 @@
|
||||
import { Badge } from '../../components/ui/badge';
|
||||
import { Slider } from '../../components/ui/slider';
|
||||
import { Switch } from '../../components/ui/switch';
|
||||
import { debounce } from '../../shared/utils';
|
||||
import { useFavoritesCardScaling } from './composables/useFavoritesCardScaling.js';
|
||||
|
||||
import AvatarExportDialog from './dialogs/AvatarExportDialog.vue';
|
||||
@@ -570,7 +573,6 @@
|
||||
favoriteAvatarGroups,
|
||||
localAvatarFavorites,
|
||||
selectedFavoriteAvatars,
|
||||
avatarImportDialogInput,
|
||||
isFavoriteLoading,
|
||||
localAvatarFavoriteGroups
|
||||
} = storeToRefs(favoriteStore);
|
||||
@@ -582,7 +584,7 @@
|
||||
newLocalAvatarFavoriteGroup,
|
||||
localAvatarFavoritesList,
|
||||
refreshFavorites,
|
||||
getLocalWorldFavorites,
|
||||
getLocalAvatarFavorites,
|
||||
handleFavoriteGroup,
|
||||
checkInvalidLocalAvatars,
|
||||
removeInvalidLocalAvatars
|
||||
@@ -979,7 +981,7 @@
|
||||
function handleGroupClick(type, key) {
|
||||
if (hasSearchInput.value) {
|
||||
avatarFavoriteSearch.value = '';
|
||||
searchAvatarFavorites('');
|
||||
doSearchAvatarFavorites('');
|
||||
}
|
||||
selectGroup(type, key, { userInitiated: true });
|
||||
}
|
||||
@@ -1031,7 +1033,7 @@
|
||||
|
||||
function handleRefreshFavorites() {
|
||||
refreshFavorites();
|
||||
getLocalWorldFavorites();
|
||||
getLocalAvatarFavorites();
|
||||
}
|
||||
|
||||
function handleVisibilitySelection(group, visibility) {
|
||||
@@ -1264,7 +1266,7 @@
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function searchAvatarFavorites(value) {
|
||||
function doSearchAvatarFavorites(value) {
|
||||
if (typeof value === 'string') {
|
||||
avatarFavoriteSearch.value = value;
|
||||
}
|
||||
@@ -1274,6 +1276,7 @@
|
||||
return;
|
||||
}
|
||||
const results = [];
|
||||
const seen = new Set();
|
||||
localAvatarFavoriteGroups.value.forEach((group) => {
|
||||
const favorites = localAvatarFavorites.value[group];
|
||||
if (!favorites) {
|
||||
@@ -1289,7 +1292,8 @@
|
||||
return;
|
||||
}
|
||||
if (ref.name.toLowerCase().includes(search) || ref.authorName.toLowerCase().includes(search)) {
|
||||
if (!results.some((r) => r.id === ref.id)) {
|
||||
if (!seen.has(ref.id)) {
|
||||
seen.add(ref.id);
|
||||
results.push(ref);
|
||||
}
|
||||
}
|
||||
@@ -1306,13 +1310,15 @@
|
||||
return;
|
||||
}
|
||||
if (ref.name.toLowerCase().includes(search) || ref.authorName.toLowerCase().includes(search)) {
|
||||
if (!results.some((r) => r.id === ref.id)) {
|
||||
if (!seen.has(ref.id)) {
|
||||
seen.add(ref.id);
|
||||
results.push(ref);
|
||||
}
|
||||
}
|
||||
});
|
||||
avatarFavoriteSearchResults.value = results;
|
||||
}
|
||||
const searchAvatarFavorites = debounce(doSearchAvatarFavorites, 200);
|
||||
|
||||
async function refreshLocalAvatarFavorites() {
|
||||
if (refreshingLocalFavorites.value) {
|
||||
|
||||
@@ -148,7 +148,9 @@
|
||||
:model-value="group.visibility === visibility"
|
||||
indicator-position="right"
|
||||
@select="handleVisibilitySelection(group, visibility)">
|
||||
<span>{{ t(`view.favorite.visibility.${visibility}`) }}</span>
|
||||
<span>{{
|
||||
t(`view.favorite.visibility.${visibility}`)
|
||||
}}</span>
|
||||
</DropdownMenuCheckboxItem>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuPortal>
|
||||
@@ -325,12 +327,12 @@
|
||||
} from '../../components/ui/select';
|
||||
import { useAppearanceSettingsStore, useFavoriteStore, useModalStore, useUserStore } from '../../stores';
|
||||
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '../../components/ui/resizable';
|
||||
import { debounce, userImage } from '../../shared/utils';
|
||||
import { Badge } from '../../components/ui/badge';
|
||||
import { Slider } from '../../components/ui/slider';
|
||||
import { Switch } from '../../components/ui/switch';
|
||||
import { favoriteRequest } from '../../api';
|
||||
import { useFavoritesCardScaling } from './composables/useFavoritesCardScaling.js';
|
||||
import { userImage } from '../../shared/utils';
|
||||
|
||||
import FavoritesFriendItem from './components/FavoritesFriendItem.vue';
|
||||
import FriendExportDialog from './dialogs/FriendExportDialog.vue';
|
||||
@@ -683,12 +685,12 @@
|
||||
function handleGroupClick(type, key) {
|
||||
if (hasSearchInput.value) {
|
||||
friendFavoriteSearch.value = '';
|
||||
searchFriendFavorites('');
|
||||
doSearchFriendFavorites('');
|
||||
}
|
||||
selectGroup(type, key);
|
||||
}
|
||||
|
||||
function searchFriendFavorites(searchTerm) {
|
||||
function doSearchFriendFavorites(searchTerm) {
|
||||
const search = searchTerm.trim().toLowerCase();
|
||||
if (search.length < 3) {
|
||||
friendFavoriteSearchResults.value = [];
|
||||
@@ -703,6 +705,7 @@
|
||||
});
|
||||
friendFavoriteSearchResults.value = filtered;
|
||||
}
|
||||
const searchFriendFavorites = debounce(doSearchFriendFavorites, 200);
|
||||
|
||||
function toggleFriendSelection(id, value) {
|
||||
if (value) {
|
||||
|
||||
@@ -148,7 +148,9 @@
|
||||
:model-value="group.visibility === visibility"
|
||||
indicator-position="right"
|
||||
@select="handleVisibilitySelection(group, visibility)">
|
||||
<span>{{ t(`view.favorite.visibility.${visibility}`) }}</span>
|
||||
<span>{{
|
||||
t(`view.favorite.visibility.${visibility}`)
|
||||
}}</span>
|
||||
</DropdownMenuCheckboxItem>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuPortal>
|
||||
@@ -470,6 +472,7 @@
|
||||
import { Badge } from '../../components/ui/badge';
|
||||
import { Slider } from '../../components/ui/slider';
|
||||
import { Switch } from '../../components/ui/switch';
|
||||
import { debounce } from '../../shared/utils';
|
||||
import { useFavoritesCardScaling } from './composables/useFavoritesCardScaling.js';
|
||||
|
||||
import FavoritesWorldItem from './components/FavoritesWorldItem.vue';
|
||||
@@ -813,7 +816,7 @@
|
||||
type: 'cards',
|
||||
key: `local:${activeLocalGroupName.value}:${index}`,
|
||||
items: items.slice(index, index + safeColumns).map((favorite) => ({
|
||||
key: favorite.id ?? favorite.worldId ?? favorite.name ?? `${index}:${Math.random()}`,
|
||||
key: favorite.id ?? favorite.worldId ?? favorite.name ?? `${activeLocalGroupName.value}:${index}`,
|
||||
favorite
|
||||
}))
|
||||
});
|
||||
@@ -939,7 +942,7 @@
|
||||
function handleGroupClick(type, key) {
|
||||
if (hasSearchInput.value) {
|
||||
worldFavoriteSearch.value = '';
|
||||
searchWorldFavorites('');
|
||||
doSearchWorldFavorites('');
|
||||
}
|
||||
selectGroup(type, key, { userInitiated: true });
|
||||
}
|
||||
@@ -1171,7 +1174,7 @@
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function searchWorldFavorites(worldFavoriteSearch) {
|
||||
function doSearchWorldFavorites(worldFavoriteSearch) {
|
||||
const search = worldFavoriteSearch.trim().toLowerCase();
|
||||
if (search.length < 3) {
|
||||
worldFavoriteSearchResults.value = [];
|
||||
@@ -1186,6 +1189,7 @@
|
||||
});
|
||||
worldFavoriteSearchResults.value = filtered;
|
||||
}
|
||||
const searchWorldFavorites = debounce(doSearchWorldFavorites, 200);
|
||||
|
||||
function handleVisibilitySelection(group, visibility) {
|
||||
const menuKey = remoteGroupMenuKey(group.key);
|
||||
|
||||
Reference in New Issue
Block a user