You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.3 KiB
29 lines
1.3 KiB
include ../../link/components/preview
|
|
include ../../user/components/profile-picture
|
|
mixin renderChatMessage (message)
|
|
.chat-message
|
|
.uk-flex
|
|
.uk-width-auto.no-select
|
|
+renderProfilePicture(message.author, { iconClass: 'member-profile-icon' })
|
|
.uk-width-expand
|
|
.message-attribution.uk-margin-small.no-select
|
|
.uk-flex.uk-flex-top
|
|
.uk-width-expand
|
|
if (message.author.displayName && (message.author.displayName.length > 0))
|
|
.author-display-name= message.author.displayName
|
|
.author-username @#{message.author.username}
|
|
.uk-width-auto
|
|
.message-timestamp(
|
|
data-dtp-timestamp= message.created,
|
|
data-dtp-timestamp-format= "time",
|
|
uk-tooltip={ title: dayjs(message.created).format('MMM D, YYYY') }
|
|
)= dayjs(message.created).format('h:mm a')
|
|
|
|
if message.content && (message.content.length > 0)
|
|
.message-content
|
|
div!= marked.parse(message.content, { renderer: fullMarkedRenderer })
|
|
|
|
if Array.isArray(message.links) && (message.links.length > 0)
|
|
each link in message.links
|
|
div(class="uk-width-large").uk-margin-small
|
|
+renderLinkPreview(link, { layout: 'responsive' })
|