mirror of
https://github.com/vrcx-team/VRCX.git
synced 2026-04-06 00:32:02 +02:00
fix: emoji size in gallery and avatar dialog
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div style="overflow: hidden" :style="{ width: size + 'px', height: size + 'px' }">
|
||||
<div class="overflow-hidden" :style="sizeStyle">
|
||||
<div
|
||||
v-if="image.frames"
|
||||
class="avatar"
|
||||
:style="generateEmojiStyle(imageUrl, image.framesOverTime, image.frames, image.loopStyle, size)"></div>
|
||||
<Avatar v-else class="rounded" :style="{ width: size + 'px', height: size + 'px' }">
|
||||
<Avatar v-else class="rounded w-full h-full">
|
||||
<AvatarImage :src="imageUrl" class="object-cover" />
|
||||
<AvatarFallback class="rounded">
|
||||
<Image class="size-4 text-muted-foreground" />
|
||||
@@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { Image } from 'lucide-vue-next';
|
||||
|
||||
import { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';
|
||||
@@ -26,7 +26,14 @@
|
||||
|
||||
const props = defineProps({
|
||||
imageUrl: { type: String, default: '' },
|
||||
size: { type: Number, default: 100 }
|
||||
size: { type: Number, default: 0 }
|
||||
});
|
||||
|
||||
const sizeStyle = computed(() => {
|
||||
if (props.size > 0) {
|
||||
return { width: props.size + 'px', height: props.size + 'px' };
|
||||
}
|
||||
return {};
|
||||
});
|
||||
|
||||
const image = ref({
|
||||
|
||||
@@ -629,6 +629,7 @@
|
||||
|
||||
import SetAvatarStylesDialog from './SetAvatarStylesDialog.vue';
|
||||
import SetAvatarTagsDialog from './SetAvatarTagsDialog.vue';
|
||||
import { AppDebug } from '@/services/appConfig';
|
||||
|
||||
const { sortUserDialogAvatars } = useUserStore();
|
||||
const { userDialog, currentUser } = storeToRefs(useUserStore());
|
||||
|
||||
@@ -327,7 +327,6 @@
|
||||
">
|
||||
<Emoji
|
||||
:imageUrl="image.versions[image.versions.length - 1].file.url"
|
||||
:size="200"
|
||||
class="aspect-square w-full rounded-t-md" />
|
||||
</ItemHeader>
|
||||
<ItemContent class="min-w-0 px-2.5 pt-1.5 pb-0">
|
||||
|
||||
Reference in New Issue
Block a user