mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 05:50:22 +00:00
Actually change message output based on statusMessage setting
This commit is contained in:
parent
c168e15db8
commit
bc69ef5f0b
3 changed files with 15 additions and 9 deletions
|
@ -7,8 +7,6 @@
|
|||
:data-id="channel.id"
|
||||
:class="{
|
||||
'hide-motd': !settings.motd,
|
||||
'hide-status-messages': settings.statusMessages === 'hidden',
|
||||
'condensed-status-messages': settings.statusMessages === 'condensed',
|
||||
'colored-nicks': settings.coloredNicks,
|
||||
'show-seconds': settings.showSeconds,
|
||||
}"
|
||||
|
@ -54,7 +52,9 @@
|
|||
<div
|
||||
v-else
|
||||
class="chat-content">
|
||||
<MessageList :channel="channel"/>
|
||||
<MessageList
|
||||
:channel="channel"
|
||||
:settings="settings"/>
|
||||
<ChatUserList
|
||||
v-if="channel.type === 'channel'"
|
||||
:channel="channel"/>
|
||||
|
|
|
@ -76,6 +76,7 @@ export default {
|
|||
MessageCondensed,
|
||||
},
|
||||
props: {
|
||||
settings: Object,
|
||||
channel: Object,
|
||||
},
|
||||
computed: {
|
||||
|
@ -84,6 +85,16 @@ export default {
|
|||
return this.channel.messages;
|
||||
}
|
||||
|
||||
// If actions are hidden, just return a message list with them excluded
|
||||
if (this.settings.statusMessages === "hidden") {
|
||||
return this.channel.messages.filter((message) => !constants.condensedTypes.includes(message.type));
|
||||
}
|
||||
|
||||
// If actions are not condensed, just return raw message list
|
||||
if (this.settings.statusMessages !== "condensed") {
|
||||
return this.channel.messages;
|
||||
}
|
||||
|
||||
const condensed = [];
|
||||
let lastCondensedContainer = null;
|
||||
|
||||
|
|
|
@ -996,10 +996,6 @@ background on hover (unless active) */
|
|||
}
|
||||
|
||||
#chat .condensed-summary {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat.condensed-status-messages .condensed-summary {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
@ -1011,7 +1007,7 @@ background on hover (unless active) */
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
#chat.condensed-status-messages .condensed.closed .msg {
|
||||
#chat .condensed.closed .msg {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -1306,7 +1302,6 @@ background on hover (unless active) */
|
|||
width: 50px;
|
||||
}
|
||||
|
||||
#chat.hide-status-messages .condensed,
|
||||
#chat.hide-motd .motd {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue