Fix audio messages in channels
This commit is contained in:
parent
ecd7bd8090
commit
35b2dc60d7
4 changed files with 16 additions and 5 deletions
|
|
@ -82,7 +82,7 @@
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
padding: 0 15px 0 15px;
|
padding: 0 15px 0 15px;
|
||||||
}
|
}
|
||||||
.bubble.image-bubble {
|
.bubble.image-bubble, .bubble.audio-bubble {
|
||||||
/* full bleed */
|
/* full bleed */
|
||||||
padding: 0 0 0 0;
|
padding: 0 0 0 0;
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
|
|
@ -115,6 +115,7 @@
|
||||||
|
|
||||||
.audio-player {
|
.audio-player {
|
||||||
color: #1c1c31 !important;
|
color: #1c1c31 !important;
|
||||||
|
padding: 0 8px;
|
||||||
.currentColor {
|
.currentColor {
|
||||||
background-color: #000000 !important;
|
background-color: #000000 !important;
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +153,7 @@
|
||||||
padding: 15px 40px 15px 60px;
|
padding: 15px 40px 15px 60px;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
position: relative;
|
position: relative;
|
||||||
svg {
|
svg, .v-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
left: 12px;
|
left: 12px;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<message-incoming v-bind="{ ...$props, ...$attrs }" v-on="$listeners" v-if="items.length > 1 || event.isRedacted() || room.displayType == ROOM_TYPE_CHANNEL">
|
<message-incoming v-bind="{ ...$props, ...$attrs }" v-on="$listeners" v-if="items.length > 1 || event.isRedacted() || forceMultiview">
|
||||||
<div class="bubble">
|
<div class="bubble">
|
||||||
<div class="original-message" v-if="inReplyToText">
|
<div class="original-message" v-if="inReplyToText">
|
||||||
<div class="original-message-sender">{{ inReplyToSender }}</div>
|
<div class="original-message-sender">{{ inReplyToSender }}</div>
|
||||||
|
|
@ -64,6 +64,11 @@ export default {
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.event.off("Event.relationsCreated", this.onRelationsCreated);
|
this.event.off("Event.relationsCreated", this.onRelationsCreated);
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
forceMultiview() {
|
||||||
|
return this.room.displayType == ROOM_TYPE_CHANNEL && this.items.length == 1 && util.isFileTypePDF(this.items[0].event);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onRelationsCreated() {
|
onRelationsCreated() {
|
||||||
this.thread = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), util.threadMessageType(), "m.room.message");
|
this.thread = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), util.threadMessageType(), "m.room.message");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<message-outgoing v-bind="{ ...$props, ...$attrs }" v-on="$listeners">
|
<message-outgoing v-bind="{ ...$props, ...$attrs }" v-on="$listeners">
|
||||||
<div class="audio-bubble">
|
<div class="bubble audio-bubble">
|
||||||
<audio-player :event="event" :timelineSet="timelineSet">{{ $t('fallbacks.audio_file')}}</audio-player>
|
<audio-player :event="event" :timelineSet="timelineSet">{{ $t('fallbacks.audio_file')}}</audio-player>
|
||||||
</div>
|
</div>
|
||||||
</message-outgoing>
|
</message-outgoing>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<message-outgoing v-bind="{ ...$props, ...$attrs }" v-on="$listeners" v-if="items.length > 1 || event.isRedacted() || room.displayType == ROOM_TYPE_CHANNEL">
|
<message-outgoing v-bind="{ ...$props, ...$attrs }" v-on="$listeners" v-if="items.length > 1 || event.isRedacted() || forceMultiview">
|
||||||
<div class="bubble">
|
<div class="bubble">
|
||||||
<div class="original-message" v-if="inReplyToText">
|
<div class="original-message" v-if="inReplyToText">
|
||||||
<div class="original-message-sender">{{ inReplyToSender }}</div>
|
<div class="original-message-sender">{{ inReplyToSender }}</div>
|
||||||
|
|
@ -65,6 +65,11 @@ export default {
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.event.off("Event.relationsCreated", this.onRelationsCreated);
|
this.event.off("Event.relationsCreated", this.onRelationsCreated);
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
forceMultiview() {
|
||||||
|
return this.room.displayType == ROOM_TYPE_CHANNEL && this.items.length == 1 && util.isFileTypePDF(this.items[0].event);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onRelationsCreated() {
|
onRelationsCreated() {
|
||||||
this.thread = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), util.threadMessageType(), "m.room.message");
|
this.thread = this.timelineSet.relations.getChildEventsForEvent(this.event.getId(), util.threadMessageType(), "m.room.message");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue