File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ export default {
380
380
sender_id: replyMessage .sender_id
381
381
}
382
382
383
- if (message . replyMessage .file ) {
383
+ if (replyMessage .file ) {
384
384
message .replyMessage .file = replyMessage .file
385
385
}
386
386
}
Original file line number Diff line number Diff line change 18
18
@mouseleave =" onLeaveMessage"
19
19
>
20
20
<div
21
+ ref =" imageRef"
21
22
class =" message-card"
22
23
:class =" {
23
24
'message-highlight': isMessageHover(message),
70
71
'image-loading':
71
72
isImageLoading && message.sender_id === currentUserId
72
73
}"
73
- :style =" { background: `url(${message.file.url})` }"
74
+ :style =" {
75
+ background: `url(${message.file.url})`,
76
+ 'max-height': `${imageMaxHeight}px`
77
+ }"
74
78
>
75
79
<transition name =" fade-image" >
76
80
<div class =" image-buttons" v-if =" imageHover && !isImageLoading" >
@@ -227,7 +231,8 @@ export default {
227
231
menuOptionsHeight: 0 ,
228
232
messageReaction: ' ' ,
229
233
newMessage: {},
230
- emojiOpened: false
234
+ emojiOpened: false ,
235
+ imageMaxHeight: ' '
231
236
}
232
237
},
233
238
@@ -262,6 +267,7 @@ export default {
262
267
index: this .index
263
268
})
264
269
}
270
+ this .imageMaxHeight = this .$refs .imageRef .clientWidth - 18
265
271
},
266
272
267
273
computed: {
@@ -514,8 +520,8 @@ export default {
514
520
}
515
521
516
522
.image-container {
517
- // padding-bottom: 2px;
518
523
width : 250px ;
524
+ max-width : 100% ;
519
525
}
520
526
521
527
.image-reply-container {
@@ -534,6 +540,7 @@ export default {
534
540
background-repeat : no-repeat !important ;
535
541
height : 250px ;
536
542
width : 250px ;
543
+ max-width : 100% ;
537
544
border-radius : 4px ;
538
545
margin : 4px auto 5px ;
539
546
transition : 0.4s filter linear ;
You can’t perform that action at this time.
0 commit comments