Add avatars to conversation headers

So as not to look repetitive, hide the per-message avatars in one-on-one
conversations.

// FREEBIE
This commit is contained in:
lilia 2015-11-09 11:29:51 -08:00
parent 86d5ac7ef9
commit f860278b89
5 changed files with 21 additions and 4 deletions

View file

@ -42,6 +42,7 @@
<li><a class='destroy'>Delete messages</a></li> <li><a class='destroy'>Delete messages</a></li>
</ul> </ul>
</div> </div>
{{> avatar }}
<span class='conversation-title'>{{ title }}</span> <span class='conversation-title'>{{ title }}</span>
</div> </div>

View file

@ -17,7 +17,8 @@
render_attributes: function() { render_attributes: function() {
return { return {
group: this.model.get('type') === 'group', group: this.model.get('type') === 'group',
title: this.model.getTitle() title: this.model.getTitle(),
avatar: this.model.getAvatar()
}; };
}, },
initialize: function(options) { initialize: function(options) {
@ -246,7 +247,7 @@
$discussionContainer.outerHeight( $discussionContainer.outerHeight(
this.$el.outerHeight() - this.$el.outerHeight() -
$bottomBarNewHeight - $bottomBarNewHeight -
$conversationHeader.outerHeight() - 20); $conversationHeader.outerHeight() - 40);
this.view.scrollToBottomIfNeeded(); this.view.scrollToBottomIfNeeded();
}, },

View file

@ -1,7 +1,7 @@
.conversation { .conversation {
background-color: #ffffff; background-color: #ffffff;
margin: 10px; margin: 10px;
padding: 10px; padding: 20px;
border-radius: 10px; border-radius: 10px;
.panel { .panel {
@ -176,6 +176,7 @@
.container { height: calc(100% - #{$header-height} - 85px); } .container { height: calc(100% - #{$header-height} - 85px); }
} }
.private .entry .avatar,
.private .sender, .private .sender,
.outgoing .sender { .outgoing .sender {
display: none; display: none;

View file

@ -67,6 +67,13 @@
.conversation-header { .conversation-header {
border-bottom: solid 1px darken($grey_l, 10%); border-bottom: solid 1px darken($grey_l, 10%);
margin-bottom: 4px; margin-bottom: 4px;
.avatar {
float: left;
width: 70px;
height: 70px;
line-height: 70px;
font-size: x-large;
}
} }
.menu.conversation-menu { .menu.conversation-menu {
button.drop-down { button.drop-down {

View file

@ -454,6 +454,12 @@ img.emoji {
.conversation-header { .conversation-header {
border-bottom: solid 1px #d9d9d9; border-bottom: solid 1px #d9d9d9;
margin-bottom: 4px; } margin-bottom: 4px; }
.conversation-header .avatar {
float: left;
width: 70px;
height: 70px;
line-height: 70px;
font-size: x-large; }
.menu.conversation-menu button.drop-down { .menu.conversation-menu button.drop-down {
background: url("/images/arrow_drop_down.png") no-repeat center; } background: url("/images/arrow_drop_down.png") no-repeat center; }
@ -539,7 +545,7 @@ input.search {
.conversation { .conversation {
background-color: #ffffff; background-color: #ffffff;
margin: 10px; margin: 10px;
padding: 10px; padding: 20px;
border-radius: 10px; } border-radius: 10px; }
.conversation .panel { .conversation .panel {
height: 100%; } height: 100%; }
@ -661,6 +667,7 @@ input.search {
.new-group-update .container { .new-group-update .container {
height: calc(100% - 36px - 85px); } height: calc(100% - 36px - 85px); }
.private .entry .avatar,
.private .sender, .private .sender,
.outgoing .sender { .outgoing .sender {
display: none; } display: none; }