Show 'no messages' state in chat

This commit is contained in:
James Allen 2014-07-21 12:19:13 +01:00
parent 4151f5d85f
commit 1cf508356c
3 changed files with 20 additions and 2 deletions

View file

@ -62,7 +62,7 @@ block content
include ./editor/publish-template
include ./editor/dropbox
.ui-layout-east(ng-if="!anonymous")
.ui-layout-east
include ./editor/chat
script(type="text/ng-template", id="genericMessageModalTemplate")

View file

@ -1,5 +1,6 @@
aside.chat(
ng-controller="ChatController"
ng-controller="ChatController",
ng-if="!anonymous"
)
.messages(
infinite-scroll="loadMoreMessages()"
@ -12,6 +13,12 @@ aside.chat(
.loading(ng-show="chat.loading")
i.fa.fa-fw.fa-spin.fa-refresh
|   Loading...
.no-messages.text-center.small(ng-show='!chat.loading && chat.messages.length == 0')
| No messages
.first-message.text-center(ng-show='!chat.loading && chat.messages.length == 0')
| Send your first message
br
i.fa.fa-arrow-down
ul.list-unstyled(
ng-click="resetUnreadMessages()"
)

View file

@ -7,6 +7,17 @@
text-align: center;
}
.no-messages {
padding: @line-height-computed / 2;
}
.first-message {
position: absolute;
bottom: 0;
width: 100%;
padding: @line-height-computed / 2;
}
.messages {
position: absolute;
top: 0;