summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNotes.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-04-28 12:53:58 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-04-28 12:53:58 +0900
commitcf07e1e4b9d6da2ec63ef4af5765816e8b760121 (patch)
tree5ae3a3056167b127bdccc70c5eda0122b6b31895 /packages/frontend/src/components/MkNotes.vue
parentfix(deps): update [frontend] update dependencies (#15809) (diff)
downloadsharkey-cf07e1e4b9d6da2ec63ef4af5765816e8b760121.tar.gz
sharkey-cf07e1e4b9d6da2ec63ef4af5765816e8b760121.tar.bz2
sharkey-cf07e1e4b9d6da2ec63ef4af5765816e8b760121.zip
perf(frontend): improve timeline performance
Diffstat (limited to 'packages/frontend/src/components/MkNotes.vue')
-rw-r--r--packages/frontend/src/components/MkNotes.vue30
1 files changed, 3 insertions, 27 deletions
diff --git a/packages/frontend/src/components/MkNotes.vue b/packages/frontend/src/components/MkNotes.vue
index f02216a5ca..9d862a4eac 100644
--- a/packages/frontend/src/components/MkNotes.vue
+++ b/packages/frontend/src/components/MkNotes.vue
@@ -13,16 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<template #default="{ items: notes }">
- <component
- :is="prefer.s.animation ? TransitionGroup : 'div'"
- :class="[$style.root, { [$style.noGap]: noGap, '_gaps': !noGap, [$style.reverse]: pagination.reversed }]"
- :enterActiveClass="$style.transition_x_enterActive"
- :leaveActiveClass="$style.transition_x_leaveActive"
- :enterFromClass="$style.transition_x_enterFrom"
- :leaveToClass="$style.transition_x_leaveTo"
- :moveClass=" $style.transition_x_move"
- tag="div"
- >
+ <div :class="[$style.root, { [$style.noGap]: noGap, '_gaps': !noGap, [$style.reverse]: pagination.reversed }]">
<template v-for="(note, i) in notes" :key="note.id">
<div v-if="note._shouldInsertAd_" :class="[$style.noteWithAd, { '_gaps': !noGap }]" :data-scroll-anchor="note.id">
<MkNote :class="$style.note" :note="note" :withHardMute="true"/>
@@ -32,19 +23,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkNote v-else :class="$style.note" :note="note" :withHardMute="true" :data-scroll-anchor="note.id"/>
</template>
- </component>
+ </div>
</template>
</MkPagination>
</template>
<script lang="ts" setup>
-import { useTemplateRef, TransitionGroup } from 'vue';
+import { useTemplateRef } from 'vue';
import type { Paging } from '@/components/MkPagination.vue';
import MkNote from '@/components/MkNote.vue';
import MkPagination from '@/components/MkPagination.vue';
import { i18n } from '@/i18n.js';
import { infoImageUrl } from '@/instance.js';
-import { prefer } from '@/preferences.js';
const props = defineProps<{
pagination: Paging;
@@ -60,20 +50,6 @@ defineExpose({
</script>
<style lang="scss" module>
-.transition_x_move,
-.transition_x_enterActive,
-.transition_x_leaveActive {
- transition: opacity 0.3s cubic-bezier(0,.5,.5,1), transform 0.3s cubic-bezier(0,.5,.5,1) !important;
-}
-.transition_x_enterFrom,
-.transition_x_leaveTo {
- opacity: 0;
- transform: translateY(-50%);
-}
-.transition_x_leaveActive {
- position: absolute;
-}
-
.reverse {
display: flex;
flex-direction: column-reverse;