From f896812c42be5446228c225d151541e8151c01a8 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 10 Feb 2023 18:56:47 +0900 Subject: [PATCH] fix: (friendly) Adjust position of profile icon when header disappears --- packages/frontend/src/components/MkNote.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 39a638be9f..6a76bdc63d 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -35,7 +35,7 @@
- +
@@ -145,6 +145,9 @@ import { useNoteCapture } from '@/scripts/use-note-capture'; import { deepClone } from '@/scripts/clone'; import { useTooltip } from '@/scripts/use-tooltip'; import { claimAchievement } from '@/scripts/achievements'; +import { eventBus } from '@/scripts/cherrypick/eventBus'; + +let showEl = $ref(false); const props = defineProps<{ note: misskey.entities.Note; @@ -205,6 +208,12 @@ const keymap = { 's': () => showContent.value !== showContent.value, }; +onMounted(() => { + eventBus.on('showEl', (showEl_receive) => { + showEl = showEl_receive; + }); +}); + useNoteCapture({ rootEl: el, note: $$(appearNote), @@ -624,6 +633,11 @@ function readPromo() { width: 46px; height: 46px; top: calc(14px + var(--stickyTop, 0px)); + transition: top 0.5s; + + &.showEl { + top: 14px; + } } }