summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNote.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-29 20:56:59 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-29 20:56:59 +0900
commitd9012740a17ea37f45a5354551d29daf0e2f00f0 (patch)
tree2707d990445923191a38d00fa3eb920d253f202d /packages/frontend/src/components/MkNote.vue
parentperf(frontend): reduce stack contexts (diff)
downloadsharkey-d9012740a17ea37f45a5354551d29daf0e2f00f0.tar.gz
sharkey-d9012740a17ea37f45a5354551d29daf0e2f00f0.tar.bz2
sharkey-d9012740a17ea37f45a5354551d29daf0e2f00f0.zip
enhance(frontend): アイコンのスクロール追従を無効化してパフォーマンス向上できるように
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
-rw-r--r--packages/frontend/src/components/MkNote.vue16
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 91aed351c5..8840a6a8bf 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
- <MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock"/>
+ <MkAvatar :class="[$style.avatar, prefer.s.useStickyIcons ? $style.useSticky : null]" :user="appearNote.user" :link="!mock" :preview="!mock"/>
<div :class="$style.main">
<MkNoteHeader :note="appearNote" :mini="true"/>
<MkInstanceTicker v-if="showTicker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
@@ -850,9 +850,12 @@ function emitUpdReaction(emoji: string, delta: number) {
margin: 0 14px 0 0;
width: 58px;
height: 58px;
- position: sticky !important;
- top: calc(22px + var(--MI-stickyTop, 0px));
- left: 0;
+
+ &.useSticky {
+ position: sticky !important;
+ top: calc(22px + var(--MI-stickyTop, 0px));
+ left: 0;
+ }
}
.main {
@@ -1039,7 +1042,10 @@ function emitUpdReaction(emoji: string, delta: number) {
margin: 0 10px 0 0;
width: 46px;
height: 46px;
- top: calc(14px + var(--MI-stickyTop, 0px));
+
+ &.useSticky {
+ top: calc(14px + var(--MI-stickyTop, 0px));
+ }
}
}