mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
🎨
This commit is contained in:
parent
59e83605ac
commit
1b5f0571f7
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<template v-if="showDecoration">
|
<template v-if="showDecoration">
|
||||||
<img
|
<img
|
||||||
v-for="decoration in decorations ?? user.avatarDecorations"
|
v-for="decoration in decorations ?? user.avatarDecorations"
|
||||||
:class="[$style.decoration]"
|
:class="[$style.decoration, { [$style.decorationBlink]: decoration.blink }]"
|
||||||
:src="getDecorationUrl(decoration)"
|
:src="getDecorationUrl(decoration)"
|
||||||
:style="{
|
:style="{
|
||||||
rotate: getDecorationAngle(decoration),
|
rotate: getDecorationAngle(decoration),
|
||||||
@ -60,7 +60,7 @@ const props = withDefaults(defineProps<{
|
|||||||
link?: boolean;
|
link?: boolean;
|
||||||
preview?: boolean;
|
preview?: boolean;
|
||||||
indicator?: boolean;
|
indicator?: boolean;
|
||||||
decorations?: Omit<Misskey.entities.UserDetailed['avatarDecorations'][number], 'id'>[];
|
decorations?: (Omit<Misskey.entities.UserDetailed['avatarDecorations'][number], 'id'> & { blink?: boolean; })[];
|
||||||
forceShowDecoration?: boolean;
|
forceShowDecoration?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
target: null,
|
target: null,
|
||||||
@ -330,4 +330,17 @@ watch(() => props.user.avatarBlurhash, () => {
|
|||||||
width: 200%;
|
width: 200%;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.decorationBlink {
|
||||||
|
animation: blink 1s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
0%, 100% {
|
||||||
|
filter: brightness(2);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
filter: brightness(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -96,6 +96,7 @@ const decorationsForPreview = computed(() => {
|
|||||||
flipH: flipH.value,
|
flipH: flipH.value,
|
||||||
offsetX: offsetX.value,
|
offsetX: offsetX.value,
|
||||||
offsetY: offsetY.value,
|
offsetY: offsetY.value,
|
||||||
|
blink: true,
|
||||||
};
|
};
|
||||||
const decorations = [...$i.avatarDecorations];
|
const decorations = [...$i.avatarDecorations];
|
||||||
if (props.usingIndex != null) {
|
if (props.usingIndex != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user