Show three dot icon next to message on hover

But only if it doesn't have an error.

Also: reformatted message template in legacy_templates.js to match what
is in background.html for easier diffing.
This commit is contained in:
Scott Nonnenberg 2018-04-16 18:46:36 -07:00
parent a563dc8b37
commit 30957341e4
No known key found for this signature in database
GPG key ID: 5F82280C35134661
6 changed files with 76 additions and 21 deletions

View file

@ -468,6 +468,9 @@
},
render() {
const contact = this.model.isIncoming() ? this.model.getContact() : null;
const errors = this.model.get('errors');
const hasErrors = errors && errors.length > 0;
this.$el.html(Mustache.render(_.result(this, 'template', ''), {
message: this.model.get('body'),
timestamp: this.model.get('sent_at'),
@ -475,6 +478,7 @@
avatar: (contact && contact.getAvatar()),
profileName: (contact && contact.getProfileName()),
innerBubbleClasses: this.isImageWithoutCaption() ? '' : 'with-tail',
hoverIcon: !hasErrors,
}, this.render_partials()));
this.timeStampView.setElement(this.$('.timestamp'));
this.timeStampView.update();