diff options
| author | Marie <marie@kaifa.ch> | 2023-12-29 18:36:15 +0100 |
|---|---|---|
| committer | Marie <marie@kaifa.ch> | 2023-12-29 18:36:15 +0100 |
| commit | 70433db9d9079f5da3f7075416875a2cf402be46 (patch) | |
| tree | e7bf98bdc0f82c592676b3232f04a96002024afa | |
| parent | fix: frontend not being able to build (diff) | |
| download | sharkey-70433db9d9079f5da3f7075416875a2cf402be46.tar.gz sharkey-70433db9d9079f5da3f7075416875a2cf402be46.tar.bz2 sharkey-70433db9d9079f5da3f7075416875a2cf402be46.zip | |
fix: button effect not lining up on sub notes|
Closes #277
| -rw-r--r-- | packages/frontend/src/components/MkNoteSub.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/components/SkNoteSub.vue | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue index 9c25ce3452..d96785a2d9 100644 --- a/packages/frontend/src/components/MkNoteSub.vue +++ b/packages/frontend/src/components/MkNoteSub.vue @@ -228,7 +228,7 @@ function like(): void { noteId: props.note.id, override: defaultLike.value, }); - const el = reactButton.value as HTMLElement | null | undefined; + const el = likeButton.value as HTMLElement | null | undefined; if (el) { const rect = el.getBoundingClientRect(); const x = rect.left + (el.offsetWidth / 2); diff --git a/packages/frontend/src/components/SkNoteSub.vue b/packages/frontend/src/components/SkNoteSub.vue index 46f0838bf1..0dc4b0b31b 100644 --- a/packages/frontend/src/components/SkNoteSub.vue +++ b/packages/frontend/src/components/SkNoteSub.vue @@ -152,16 +152,16 @@ const isRenote = ( ); async function addReplyTo(replyNote: Misskey.entities.Note) { - replies.value.unshift(replyNote); - appearNote.value.repliesCount += 1; + replies.value.unshift(replyNote); + appearNote.value.repliesCount += 1; } async function removeReply(id: Misskey.entities.Note['id']) { - const replyIdx = replies.value.findIndex(note => note.id === id); - if (replyIdx >= 0) { - replies.value.splice(replyIdx, 1); - appearNote.value.repliesCount -= 1; - } + const replyIdx = replies.value.findIndex(note => note.id === id); + if (replyIdx >= 0) { + replies.value.splice(replyIdx, 1); + appearNote.value.repliesCount -= 1; + } } useNoteCapture({ @@ -237,7 +237,7 @@ function like(): void { noteId: props.note.id, override: defaultLike.value, }); - const el = reactButton.value as HTMLElement | null | undefined; + const el = likeButton.value as HTMLElement | null | undefined; if (el) { const rect = el.getBoundingClientRect(); const x = rect.left + (el.offsetWidth / 2); |