Confirmaton on send, banner when 'unverified'

Not yet using the new APIs, but ready to. Still to do:
- Send sync messages on trust decisions
- Respond to received trust decision sync messages
- Show trust decisions in the conversation history
- In that rare situation where a sent message ends up with a key error
  make it easy to retry the send.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-06-13 17:36:32 -07:00
parent bedf10056b
commit 243cbd8123
12 changed files with 442 additions and 62 deletions

36
js/views/banner_view.js Normal file
View file

@ -0,0 +1,36 @@
/*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.BannerView = Whisper.View.extend({
className: 'banner',
templateName: 'banner',
events: {
'click .dismiss': 'onDismiss',
'click .body': 'onClick',
},
initialize: function(options) {
this.message = options.message;
this.callbacks = {
onDismiss: options.onDismiss,
onClick: options.onClick
};
this.render();
},
render_attributes: function() {
return {
message: this.message
};
},
onDismiss: function(e) {
this.callbacks.onDismiss();
e.stopPropagation();
},
onClick: function() {
this.callbacks.onClick();
}
});
})();