diff options
| author | ShittyKopper <shittykopper@w.on-t.work> | 2024-02-03 15:22:12 +0300 |
|---|---|---|
| committer | ShittyKopper <shittykopper@w.on-t.work> | 2024-02-04 15:21:57 +0300 |
| commit | 5ef8e3123bbc7ff1f28204a7bcd3f04db473e802 (patch) | |
| tree | 426b2d261630109127a4b8de4f1318b1b2e8f357 | |
| parent | upd: expandAllCws also expands all long posts on first click (diff) | |
| download | sharkey-5ef8e3123bbc7ff1f28204a7bcd3f04db473e802.tar.gz sharkey-5ef8e3123bbc7ff1f28204a7bcd3f04db473e802.tar.bz2 sharkey-5ef8e3123bbc7ff1f28204a7bcd3f04db473e802.zip | |
upd: only enable hover effect on SkNoteDetailed and replies
| -rw-r--r-- | packages/frontend/src/components/SkNoteDetailed.vue | 6 | ||||
| -rw-r--r-- | packages/frontend/src/components/SkNoteSub.vue | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/packages/frontend/src/components/SkNoteDetailed.vue b/packages/frontend/src/components/SkNoteDetailed.vue index 18cba35c0a..5b28a2e8eb 100644 --- a/packages/frontend/src/components/SkNoteDetailed.vue +++ b/packages/frontend/src/components/SkNoteDetailed.vue @@ -40,9 +40,9 @@ SPDX-License-Identifier: AGPL-3.0-only </div> </div> <template v-if="appearNote.reply && appearNote.reply.replyId"> - <SkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note" :expandAllCws="props.expandAllCws"/> + <SkNoteSub v-for="note in conversation" :key="note.id" :class="$style.replyToMore" :note="note" :expandAllCws="props.expandAllCws" detailed/> </template> - <SkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo" :expandAllCws="props.expandAllCws"/> + <SkNoteSub v-if="appearNote.reply" :note="appearNote.reply" :class="$style.replyTo" :expandAllCws="props.expandAllCws" detailed/> <article :id="appearNote.id" ref="noteEl" :class="$style.note" tabindex="-1" @contextmenu.stop="onContextmenu"> <header :class="$style.noteHeader"> <MkAvatar :class="$style.noteHeaderAvatar" :user="appearNote.user" indicator link preview/> @@ -850,7 +850,7 @@ onUnmounted(() => { } .replyToMore { - + } .renote { diff --git a/packages/frontend/src/components/SkNoteSub.vue b/packages/frontend/src/components/SkNoteSub.vue index 8d76c1e22c..ceb0057d63 100644 --- a/packages/frontend/src/components/SkNoteSub.vue +++ b/packages/frontend/src/components/SkNoteSub.vue @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only --> <template> -<div v-show="!isDeleted" v-if="!muted" ref="el" :class="[$style.root, { [$style.children]: depth > 1, [$style.replyRoot]: props.reply }]"> +<div v-show="!isDeleted" v-if="!muted" ref="el" :class="[$style.root, { [$style.children]: depth > 1, [$style.replyRoot]: props.reply, [$style.detailed]: props.detailed }]"> <div v-if="!hideLine" :class="$style.line"></div> <div :class="$style.main"> <div v-if="note.channel" :class="$style.colorBar" :style="{ background: note.channel.color }"></div> @@ -127,9 +127,11 @@ const props = withDefaults(defineProps<{ depth?: number; reply?: boolean; + detailed?: boolean; }>(), { depth: 1, reply: false, + detailed: false, }); const el = shallowRef<HTMLElement>(); @@ -474,7 +476,7 @@ if (props.detail) { position: relative; display: flex; - &::after { + :is(.detailed, .replyRoot) &::after { content: ""; position: absolute; top: -12px; @@ -488,8 +490,8 @@ if (props.detail) { z-index: -1; } - &:hover::after, - &:focus-within::after { + :is(.detailed, .replyRoot) &:hover::after, + :is(.detailed, .replyRoot) &:focus-within::after { opacity: 1; } } |