summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-12-30 14:10:00 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-12-30 14:10:00 +0900
commit4767804bcc607d572397eb0ebd83a3675e403106 (patch)
tree620093b0ac4ae70806f804fe91c1131a1de92a76 /packages/frontend/src/components
parentrefactor (diff)
downloadmisskey-4767804bcc607d572397eb0ebd83a3675e403106.tar.gz
misskey-4767804bcc607d572397eb0ebd83a3675e403106.tar.bz2
misskey-4767804bcc607d572397eb0ebd83a3675e403106.zip
:art:
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/MkReactionsViewer.vue14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkReactionsViewer.vue b/packages/frontend/src/components/MkReactionsViewer.vue
index 4af9d6baa2..a22f7b6e74 100644
--- a/packages/frontend/src/components/MkReactionsViewer.vue
+++ b/packages/frontend/src/components/MkReactionsViewer.vue
@@ -1,9 +1,11 @@
<template>
-<div class="tdflqwzn" :class="{ isMe }">
+<Transition :name="$store.state.animation ? 'y' : ''">
+<div v-if="Object.keys(note.reactions).length > 0" class="tdflqwzn" :class="{ isMe }">
<TransitionGroup :name="$store.state.animation ? 'x' : ''">
<XReaction v-for="(count, reaction) in note.reactions" :key="reaction" :reaction="reaction" :count="count" :is-initial="initialReactions.has(reaction)" :note="note"/>
</TransitionGroup>
</div>
+</Transition>
</template>
<script lang="ts" setup>
@@ -22,6 +24,16 @@ const isMe = computed(() => $i && $i.id === props.note.userId);
</script>
<style lang="scss" scoped>
+.y-enter-active, .y-leave-active {
+ overflow: clip;
+ max-height: 36px;
+ transition: opacity 0.2s cubic-bezier(0,.5,.5,1), max-height 0.2s cubic-bezier(0,.5,.5,1) !important;
+}
+.y-enter-from, .y-leave-to {
+ max-height: 0px;
+ opacity: 0;
+}
+
.x-move, .x-enter-active, .x-leave-active {
transition: opacity 0.2s cubic-bezier(0,.5,.5,1), transform 0.2s cubic-bezier(0,.5,.5,1) !important;
}