mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-11 15:46:24 -05:00
49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
aside.chat(
|
|
ng-controller="ChatController"
|
|
)
|
|
.messages(
|
|
infinite-scroll="loadMoreMessages()"
|
|
infinite-scroll-disabled="chat.loading || chat.atEnd"
|
|
infinite-scroll-initialize="ui.chatOpen"
|
|
infinite-scroll-upwards="true"
|
|
update-scroll-bottom-on="updateScrollPosition"
|
|
)
|
|
.infinite-scroll-inner
|
|
.loading(ng-show="chat.loading")
|
|
i.fa.fa-fw.fa-spin.fa-refresh
|
|
| Loading...
|
|
ul.list-unstyled(
|
|
ng-click="resetUnreadMessages()"
|
|
)
|
|
li.message(
|
|
ng-repeat="message in chat.messages"
|
|
ng-controller="ChatMessageController"
|
|
ng-class="{'self': message.user.id == user.id }"
|
|
)
|
|
div.date(ng-if="$index == 0 || (message.timestamp - chat.messages[$index - 1].timestamp) > 5 * 60 * 1000")
|
|
{{ message.timestamp | formatDate:'h:mm a' }} {{ message.timestamp | relativeDate }}
|
|
span.avatar
|
|
img(ng-src="{{message.user.gravatar_url}}?d=mm&s=50")
|
|
div.message-wrapper
|
|
.name(ng-if="message.user.id != user.id") {{ message.user.first_name }}
|
|
.message(
|
|
ng-style="{\
|
|
'border-color': 'hsl({{ hue(message.user) }}, 70%, 70%)',\
|
|
'background-color': 'hsl({{ hue(message.user) }}, 60%, 97%)'\
|
|
}"
|
|
)
|
|
.arrow(ng-style="{'border-color': 'hsl({{ hue(message.user) }}, 70%, 70%)'}")
|
|
p(
|
|
mathjax,
|
|
ng-repeat="content in message.contents track by $index"
|
|
) {{ content }}
|
|
|
|
.new-message
|
|
textarea(
|
|
placeholder="Your message...",
|
|
on-enter="sendMessage()",
|
|
ng-model="newMessageContent",
|
|
ng-click="resetUnreadMessages()"
|
|
)
|
|
|
|
|