Skip to content

Commit b9347d7

Browse files
committed
(UI) improve message options blur
1 parent efca98f commit b9347d7

File tree

1 file changed

+31
-14
lines changed

1 file changed

+31
-14
lines changed

src/ChatWindow/Message.vue

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,18 @@
116116
</span>
117117
</div>
118118

119-
<transition name="fade-message">
120-
<div
121-
v-if="messageHover"
122-
class="options-container"
123-
:class="{
124-
'options-me': message.sender_id === currentUserId
125-
}"
126-
></div>
127-
</transition>
119+
<div class="options-container">
120+
<transition name="slide-left">
121+
<div
122+
v-if="messageHover"
123+
class="blur-container"
124+
:class="{
125+
'options-me': message.sender_id === currentUserId,
126+
'options-image': isImage
127+
}"
128+
></div>
129+
</transition>
130+
</div>
128131

129132
<transition name="slide-left">
130133
<div
@@ -634,19 +637,33 @@ export default {
634637
635638
.options-container {
636639
position: absolute;
637-
top: 8px;
638-
right: 15px;
639-
height: 26px;
640-
width: 60px;
641-
border-radius: 0 8px;
640+
top: 3px;
641+
right: 10px;
642+
height: 40px;
643+
width: 70px;
644+
overflow: hidden;
645+
border-top-right-radius: 8px;
646+
}
647+
648+
.blur-container {
649+
position: absolute;
650+
height: 100%;
651+
width: 100%;
652+
left: 10px;
653+
bottom: 10px;
642654
background: var(--chat-message-bg-color);
643655
filter: blur(4px);
656+
border-bottom-left-radius: 8px;
644657
}
645658
646659
.options-me {
647660
background: var(--chat-message-bg-color-me);
648661
}
649662
663+
.options-image {
664+
background: rgba(255, 255, 255, 0.8);
665+
}
666+
650667
.image-buttons {
651668
position: absolute;
652669
width: 100%;

0 commit comments

Comments
 (0)