Commit 7c29ae4a authored by JC Brand's avatar JC Brand

Improve stying for /me messages

Show the actions dropdown on the right, like with other messages, and
don't wrap them.
parent 0cc088a5
...@@ -281,21 +281,22 @@ ...@@ -281,21 +281,22 @@
min-width: var(--message-avatar-width); min-width: var(--message-avatar-width);
} }
.chat-msg__author {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--heading-font);
font-size: 115%;
font-weight: bold;
padding-bottom: 1px; // Hack to avoid cutting of text on the button
}
.chat-msg__heading { .chat-msg__heading {
width: 100%; width: 100%;
margin-top: 0.5em; margin-top: 0.5em;
padding-right: 0.25rem; padding-right: 0.25rem;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
.chat-msg__author {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--heading-font);
font-size: 115%;
font-weight: bold;
padding-bottom: 1px; // Hack to avoid cutting of text on the button
}
.badge { .badge {
margin-left: 0.5em; margin-left: 0.5em;
font-family: var(--normal_font); font-family: var(--normal_font);
...@@ -307,10 +308,8 @@ ...@@ -307,10 +308,8 @@
} }
} }
&.chat-msg--action { &.chat-msg--action {
.chat-msg__content { .chat-msg__message {
flex-wrap: wrap;
flex-direction: row; flex-direction: row;
justify-content: flex-start;
} }
.chat-msg__text { .chat-msg__text {
width: auto; width: auto;
......
...@@ -17,17 +17,18 @@ export default (o) => { ...@@ -17,17 +17,18 @@ export default (o) => {
${ o.shouldShowAvatar() ? renderAvatar(o.getAvatarData()) : '' } ${ o.shouldShowAvatar() ? renderAvatar(o.getAvatarData()) : '' }
<div class="chat-msg__content chat-msg__content--${o.sender} ${o.is_me_message ? 'chat-msg__content--action' : ''}"> <div class="chat-msg__content chat-msg__content--${o.sender} ${o.is_me_message ? 'chat-msg__content--action' : ''}">
<span class="chat-msg__heading">
${ (o.is_me_message) ? html` ${ !o.is_me_message ? html`
<time timestamp="${o.time}" class="chat-msg__time">${o.pretty_time}</time> <span class="chat-msg__heading">
${o.hats.map(hat => html`<span class="badge badge-secondary">${hat}</span>`)} <span class="chat-msg__author">${o.username}</span>
` : '' } ${ o.renderAvatarByline() }
<span class="chat-msg__author">${ o.is_me_message ? '**' : ''}${o.username}</span> ${ o.is_encrypted ? html`<span class="fa fa-lock"></span>` : '' }
${ !o.is_me_message ? o.renderAvatarByline() : '' } </span>` : '' }
${ o.is_encrypted ? html`<span class="fa fa-lock"></span>` : '' }
</span>
<div class="chat-msg__body chat-msg__body--${o.message_type} ${o.received ? 'chat-msg__body--received' : '' } ${o.is_delayed ? 'chat-msg__body--delayed' : '' }"> <div class="chat-msg__body chat-msg__body--${o.message_type} ${o.received ? 'chat-msg__body--received' : '' } ${o.is_delayed ? 'chat-msg__body--delayed' : '' }">
<div class="chat-msg__message"> <div class="chat-msg__message">
${ (o.is_me_message) ? html`
<time timestamp="${o.time}" class="chat-msg__time">${o.pretty_time}</time>&nbsp;
<span class="chat-msg__author">${ o.is_me_message ? '**' : ''}${o.username}</span>&nbsp;` : '' }
${ o.is_retracted ? o.renderRetraction() : o.renderMessageText() } ${ o.is_retracted ? o.renderRetraction() : o.renderMessageText() }
</div> </div>
<converse-message-actions <converse-message-actions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment