-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scroll when adding a message. Track last read timestamp.
- Loading branch information
Showing
8 changed files
with
102 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,6 @@ <h2> | |
</footer> | ||
</aside> | ||
|
||
<article> | ||
<ui-view></ui-view> | ||
</article> | ||
|
||
<ui-view></ui-view> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,49 @@ | ||
<header> | ||
<h1> | ||
<span>{{ messagesCtrl.channelName }}</span> | ||
<img | ||
ng-repeat="user in channelsCtrl.users" | ||
class="user-pic" | ||
ng-class="{ online: user.online }" | ||
alt="{{ user.displayName }}" | ||
ng-src="{{ channelsCtrl.getGravatar(user.$id) }}" /> | ||
</h1> | ||
</header> | ||
<article scroll-bottom="messagesCtrl.messages"> | ||
<header> | ||
<h1> | ||
<span>{{ messagesCtrl.channelName }}</span> | ||
<img | ||
ng-repeat="user in channelsCtrl.users" | ||
class="user-pic" | ||
ng-class="{ online: user.online }" | ||
alt="{{ user.displayName }}" | ||
ng-src="{{ channelsCtrl.getGravatar(user.$id) }}" /> | ||
</h1> | ||
</header> | ||
|
||
<ul> | ||
<li ng-repeat="message in messagesCtrl.messages"> | ||
<img | ||
class="user-pic" | ||
alt="{{ channelsCtrl.getDisplayName(message.uid) }}" | ||
ng-src="{{ channelsCtrl.getGravatar(message.uid) }}" /> | ||
<ul in-view-container> | ||
<li | ||
id="message_{{ message.$id }}" | ||
ng-repeat="message in messagesCtrl.messages" | ||
in-view="$inview&&messagesCtrl.markAsRead($index, $inview, $inviewpart, $event)"> | ||
<img | ||
class="user-pic" | ||
alt="{{ channelsCtrl.getDisplayName(message.uid) }}" | ||
ng-src="{{ channelsCtrl.getGravatar(message.uid) }}" /> | ||
|
||
<div class="message-info"> | ||
<div class="user-name"> | ||
{{ channelsCtrl.getDisplayName(message.uid) }} | ||
<span class="timestamp">{{ message.timestamp | date: "short" }}</span> | ||
</div> | ||
<div class="message-info"> | ||
<div class="user-name"> | ||
{{ channelsCtrl.getDisplayName(message.uid) }} | ||
<span class="timestamp">{{ message.timestamp | date: "short" }}</span> | ||
</div> | ||
|
||
<div class="message"> | ||
{{ message.body }} | ||
<div class="message"> | ||
{{ message.body }} | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
||
<form id="new-message" ng-submit="messagesCtrl.sendMessage()"> | ||
<p class="input-group"> | ||
<input | ||
type="text" | ||
class="form-control" | ||
placeholder="Type a message..." | ||
ng-model="messagesCtrl.message"> | ||
<span class="input-group-btn"> | ||
<button type="submit" class="btn btn-default">Send</button> | ||
</span> | ||
</p> | ||
</form> | ||
<form id="new-message" ng-submit="messagesCtrl.sendMessage()"> | ||
<p class="input-group"> | ||
<input | ||
type="text" | ||
class="form-control" | ||
placeholder="Type a message..." | ||
ng-model="messagesCtrl.message"> | ||
<span class="input-group-btn"> | ||
<button type="submit" class="btn btn-default">Send</button> | ||
</span> | ||
</p> | ||
</form> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters