Render conversation placeholder hint in place

// FREEBIE
This commit is contained in:
lilia 2015-11-28 14:41:58 -08:00
parent 891a5e54ad
commit 8d214b73d9
4 changed files with 10 additions and 19 deletions

View File

@ -23,6 +23,10 @@
</div>
</div>
<div class='conversation-stack'>
<div class='conversation placeholder'>
<h3>Welcome to Signal</h3>
<p> Select a contact or group to start chatting.</p>
</div>
</div>
</script>
<script type='text/x-tmpl-mustache' id='hint'>

View File

@ -102,13 +102,7 @@
this.inboxListView.$el.hide();
});
this.hintView = new Whisper.HintView({
className: 'conversation placeholder',
content: "Select a contact or group to start chatting."
});
if (inboxCollection.length === 0) {
this.hintView.render();
this.hintView.$el.prependTo(this.$('.conversation-stack'));
this.searchView.showAllContacts = true;
this.searchView.reset();
this.listenToOnce(inboxCollection, 'add', function() {
@ -141,7 +135,6 @@
}
},
hideHints: function() {
this.hintView.remove();
this.searchView.hideHints();
},
openConversation: function(e, conversation) {

View File

@ -218,14 +218,10 @@ input.search {
}
}
.placeholder p {
color: $grey;
}
.conversation.placeholder {
p {
text-align: center;
margin-top: 120px;
}
text-align: center;
padding-top: 100px;
color: #aaa;
}
.contact.placeholder {
position: absolute;

View File

@ -536,12 +536,10 @@ input.search {
border-color: transparent #2eace0 transparent transparent;
left: -30px; }
.placeholder p {
color: #616161; }
.conversation.placeholder p {
.conversation.placeholder {
text-align: center;
margin-top: 120px; }
padding-top: 100px;
color: #aaa; }
.contact.placeholder {
position: absolute;