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