diff --git a/website/client/components/avatar.vue b/website/client/components/avatar.vue
index 516535cf65..5f55563e18 100644
--- a/website/client/components/avatar.vue
+++ b/website/client/components/avatar.vue
@@ -48,7 +48,6 @@
.avatar {
width: 140px;
- height: 147px;
image-rendering: pixelated;
position: relative;
cursor: pointer;
diff --git a/website/client/components/chat/autoComplete.vue b/website/client/components/chat/autoComplete.vue
index 8b5cc3cf43..59038df789 100644
--- a/website/client/components/chat/autoComplete.vue
+++ b/website/client/components/chat/autoComplete.vue
@@ -1,17 +1,68 @@
-div.autocomplete-selection(v-if='searchResults.length > 0', :style='autocompleteStyle')
- .autocomplete-results(v-for='result in searchResults', @click='select(result)') {{ result }}
+.autocomplete-selection(v-if='searchResults.length > 0', :style='autocompleteStyle')
+ .autocomplete-results.d-flex.align-items-center(
+ v-for='result in searchResults',
+ @click='select(result)',
+ @mouseenter='result.hover = true',
+ @mouseleave='result.hover = false',
+ :class='{"hover-background": result.hover}',
+ )
+ span
+ h3.profile-name(:class='userLevelStyle(result.msg)') {{ result.displayName }}
+ .svg-icon(v-html="tierIcon(result.msg)", v-if='showTierStyle(result.msg)')
+ span.username.ml-2(v-if='result.username', :class='{"hover-foreground": result.hover}') @{{ result.username }}
-
diff --git a/website/client/components/chat/chatCard.vue b/website/client/components/chat/chatCard.vue
index a52824ec37..4200a718a9 100644
--- a/website/client/components/chat/chatCard.vue
+++ b/website/client/components/chat/chatCard.vue
@@ -4,36 +4,48 @@ div
.message-hidden(v-if='msg.flagCount === 1 && user.contributor.admin') Message flagged once, not hidden
.message-hidden(v-if='msg.flagCount > 1 && user.contributor.admin') Message hidden
.card-body
- h3.leader(
- :class='userLevelStyle(msg)',
- @click="showMemberModal(msg.uuid)",
- v-b-tooltip.hover.top="tierTitle",
- )
- | {{msg.user}}
- .svg-icon(v-html="tierIcon", v-if='showShowTierStyle')
- p.time(v-b-tooltip="", :title="msg.timestamp | date") {{msg.timestamp | timeAgo}}
- .text(v-markdown='msg.text')
- hr
- div(v-if='msg.id')
- .action(@click='like()', v-if='!inbox && msg.likes', :class='{active: msg.likes[user._id]}')
+ h3.leader(
+ :class='userLevelStyle(msg)',
+ @click="showMemberModal(msg.uuid)",
+ v-b-tooltip.hover.top="tierTitle",
+ v-if="msg.user"
+ )
+ | {{msg.user}}
+ .svg-icon(v-html="tierIcon", v-if='showShowTierStyle')
+ p.time(v-b-tooltip="", :title="msg.timestamp | date")
+ span(v-if="msg.username") @{{ msg.username }} •
+ span {{ msg.timestamp | timeAgo }}
+ .text(v-html='atHighlight(parseMarkdown(msg.text))')
+ hr
+ .d-flex(v-if='msg.id')
+ .action.d-flex.align-items-center(v-if='!inbox', @click='copyAsTodo(msg)')
+ .svg-icon(v-html="icons.copy")
+ div {{$t('copyAsTodo')}}
+ .action.d-flex.align-items-center(v-if='!inbox && user.flags.communityGuidelinesAccepted && msg.uuid !== "system"', @click='report(msg)')
+ .svg-icon(v-html="icons.report")
+ div {{$t('report')}}
+ // @TODO make flagging/reporting work in the inbox. NOTE: it must work even if the communityGuidelines are not accepted and it MUST work for messages that you have SENT as well as received. -- Alys
+ .action.d-flex.align-items-center(v-if='msg.uuid === user._id || inbox || user.contributor.admin', @click='remove()')
+ .svg-icon(v-html="icons.delete")
+ | {{$t('delete')}}
+ .ml-auto.d-flex
+ .action.liked.d-flex.align-items-center(v-if='likeCount > 0')
+ .svg-icon(v-html="icons.liked")
+ | + {{ likeCount }}
+ .action.d-flex.align-items-center(@click='like()', v-if='!inbox && msg.likes', :class='{active: msg.likes[user._id]}')
.svg-icon(v-html="icons.like")
span(v-if='!msg.likes[user._id]') {{ $t('like') }}
span(v-if='msg.likes[user._id]') {{ $t('liked') }}
- span.action(v-if='!inbox', @click='copyAsTodo(msg)')
- .svg-icon(v-html="icons.copy")
- | {{$t('copyAsTodo')}}
- span.action(v-if='!inbox && user.flags.communityGuidelinesAccepted && msg.uuid !== "system"', @click='report(msg)')
- .svg-icon(v-html="icons.report")
- | {{$t('report')}}
- // @TODO make flagging/reporting work in the inbox. NOTE: it must work even if the communityGuidelines are not accepted and it MUST work for messages that you have SENT as well as received. -- Alys
- span.action(v-if='msg.uuid === user._id || inbox || user.contributor.admin', @click='remove()')
- .svg-icon(v-html="icons.delete")
- | {{$t('delete')}}
- span.action.float-right.liked(v-if='likeCount > 0')
- .svg-icon(v-html="icons.liked")
- | + {{ likeCount }}
+
+
diff --git a/website/client/components/groups/chat.vue b/website/client/components/groups/chat.vue
index 9c89526fbf..f19ceeb517 100644
--- a/website/client/components/groups/chat.vue
+++ b/website/client/components/groups/chat.vue
@@ -194,7 +194,6 @@
width: 100%;
background-color: $white;
border: solid 1px $gray-400;
- font-size: 16px;
font-style: italic;
line-height: 1.43;
color: $gray-300;
diff --git a/website/server/models/message.js b/website/server/models/message.js
index 5e7089677c..68ced421ab 100644
--- a/website/server/models/message.js
+++ b/website/server/models/message.js
@@ -9,7 +9,8 @@ const defaultSchema = () => ({
text: String,
// sender properties
- user: String, // profile name
+ user: String, // profile name (unfortunately)
+ username: String,
contributor: {type: mongoose.Schema.Types.Mixed},
backer: {type: mongoose.Schema.Types.Mixed},
uuid: String, // sender uuid
@@ -115,6 +116,7 @@ export function messageDefaults (msg, user) {
contributor: user.contributor && user.contributor.toObject(),
backer: user.backer && user.backer.toObject(),
user: user.profile.name,
+ username: user.auth.local.username,
});
} else {
message.uuid = 'system';