1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-20 00:33:09 +09:00
This commit is contained in:
NoriDev 2023-12-13 22:58:27 +09:00
parent 04467e6051
commit cb3b158a00

View File

@ -4,34 +4,34 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<component :is="link ? MkA : 'span'" v-user-preview="preview ? user.id : undefined" v-bind="bound" class="_noSelect" :class="$style.root" :style="{ color }" :title="acct(user)" @click="onClick">
<MkImgWithBlurhash
:class="[$style.inner, { [$style.reduceBlurEffect]: !defaultStore.state.useBlurEffect, [$style.noDrag]: noDrag }]"
:src="url"
:hash="user.avatarBlurhash"
:cover="true"
:onlyAvgColor="true"
:noDrag="true"
@mouseover="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = true : ''"
@mouseout="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = false : ''"
@touchstart="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = true : ''"
@touchend="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = false : ''"
/>
<template v-if="showDecoration && defaultStore.state.friendlyShowAvatarDecorationsInNavBtn">
<img
v-for="decoration in decorations ?? user.avatarDecorations"
:class="[$style.decoration]"
:src="decoration.url"
:style="{
<component :is="link ? MkA : 'span'" v-user-preview="preview ? user.id : undefined" v-bind="bound" class="_noSelect" :class="$style.root" :style="{ color }" :title="acct(user)" @click="onClick">
<MkImgWithBlurhash
:class="[$style.inner, { [$style.reduceBlurEffect]: !defaultStore.state.useBlurEffect, [$style.noDrag]: noDrag }]"
:src="url"
:hash="user.avatarBlurhash"
:cover="true"
:onlyAvgColor="true"
:noDrag="true"
@mouseover="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = true : ''"
@mouseout="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = false : ''"
@touchstart="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = true : ''"
@touchend="defaultStore.state.showingAnimatedImages === 'interaction' ? playAnimation = false : ''"
/>
<template v-if="showDecoration && defaultStore.state.friendlyShowAvatarDecorationsInNavBtn">
<img
v-for="decoration in decorations ?? user.avatarDecorations"
:class="[$style.decoration]"
:src="decoration.url"
:style="{
rotate: getDecorationAngle(decoration),
scale: getDecorationScale(decoration),
transform: getDecorationTransform(decoration),
opacity: getDecorationOpacity(decoration),
}"
alt=""
>
</template>
</component>
alt=""
>
</template>
</component>
</template>
<script lang="ts" setup>