mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
add avatar search input in user dialog
This commit is contained in:
@@ -1105,6 +1105,11 @@
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<template v-if="userDialog.ref.id === currentUser.id">
|
||||
<Input
|
||||
v-model="avatarSearchQuery"
|
||||
class="h-8 w-40 mr-2"
|
||||
placeholder="Search avatars"
|
||||
@click.stop />
|
||||
<span class="mr-1">{{ t('dialog.user.avatars.sort_by') }}</span>
|
||||
<Select
|
||||
:model-value="userDialog.avatarSorting"
|
||||
@@ -1143,9 +1148,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="x-friend-list" style="margin-top: 10px; min-height: 60px; max-height: 50vh">
|
||||
<template v-if="userDialogAvatars.length">
|
||||
<template v-if="filteredUserDialogAvatars.length">
|
||||
<div
|
||||
v-for="avatar in userDialogAvatars"
|
||||
v-for="avatar in filteredUserDialogAvatars"
|
||||
:key="avatar.id"
|
||||
class="x-friend-item x-friend-item-border"
|
||||
@click="showAvatarDialog(avatar.id)">
|
||||
@@ -1251,6 +1256,7 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { DataTableEmpty } from '@/components/ui/data-table';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { TabsUnderline } from '@/components/ui/tabs';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -1471,6 +1477,25 @@
|
||||
}
|
||||
return avatars;
|
||||
});
|
||||
const avatarSearchQuery = ref('');
|
||||
const filteredUserDialogAvatars = computed(() => {
|
||||
const avatars = userDialogAvatars.value;
|
||||
if (userDialog.value.ref?.id !== currentUser.value.id) {
|
||||
return avatars;
|
||||
}
|
||||
const query = avatarSearchQuery.value.trim().toLowerCase();
|
||||
if (!query) {
|
||||
return avatars;
|
||||
}
|
||||
return avatars.filter((avatar) => (avatar.name || '').toLowerCase().includes(query));
|
||||
});
|
||||
|
||||
watch(
|
||||
() => userDialog.value.id,
|
||||
() => {
|
||||
avatarSearchQuery.value = '';
|
||||
}
|
||||
);
|
||||
|
||||
function userFavoriteWorldsStatus(visibility) {
|
||||
const style = {};
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { dbVars } from '../database';
|
||||
|
||||
import sqliteService from '../sqlite.js';
|
||||
|
||||
const tableAlter = {
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<span class="header">{{ t('view.settings.advanced.advanced.header') }}</span>
|
||||
<div class="options-container-item" style="margin-top: 15px">
|
||||
<ButtonGroup>
|
||||
<Button variant="outline" size="sm" @click="showVRChatConfig()">
|
||||
<Settings />
|
||||
VRChat config.json
|
||||
</Button>
|
||||
<Button variant="outline" size="sm" @click="showLaunchOptions()">
|
||||
<Settings />
|
||||
{{ t('view.settings.advanced.advanced.launch_options') }}
|
||||
</Button>
|
||||
<Button variant="outline" size="sm" @click="showRegistryBackupDialog()">
|
||||
<Package />
|
||||
{{ t('view.settings.advanced.advanced.vrc_registry_backup') }}
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</div>
|
||||
<div class="options-container">
|
||||
<span class="sub-header">{{ t('view.settings.advanced.advanced.primary_password.header') }}</span>
|
||||
<simple-switch
|
||||
|
||||
@@ -351,11 +351,6 @@
|
||||
:label="t('view.settings.appearance.user_dialog.vrcx_memos')"
|
||||
:value="!hideUserMemos"
|
||||
@change="setHideUserMemos" />
|
||||
<div class="options-container-item">
|
||||
<span class="name">{{
|
||||
t('view.settings.appearance.user_dialog.export_vrcx_memos_into_vrchat_notes')
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="options-container">
|
||||
<span class="header">{{ t('view.settings.appearance.friend_log.header') }}</span>
|
||||
|
||||
Reference in New Issue
Block a user