Support for group-member verifications via second-level panel

Also:
- All the necessary wire-up to update things in real time. If you have
a safety number page up via a group member view as well as via a 1:1
conversation with that contact, they'll both be updated as the
underlying model changes. Similarly, the overall group will update
in real-time as members change.
- A bit of special-casing for yourself in a group conversation - you're
shown as 'me' and are not clickable, where normally that would take you
to the Safety Number screen for that contact. You are also not included
in the trust calculations for a given group.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-06-10 12:18:24 -07:00
parent ae3587f05e
commit bedf10056b
12 changed files with 281 additions and 46 deletions

View file

@ -13,13 +13,15 @@
tagName: 'ul',
itemView: Backbone.View,
initialize: function(options) {
this.options = options || {};
this.listenTo(this.collection, 'add', this.addOne);
this.listenTo(this.collection, 'reset', this.addAll);
},
addOne: function(model) {
if (this.itemView) {
var view = new this.itemView({model: model});
var options = Object.assign({}, this.options.toInclude, {model: model});
var view = new this.itemView(options);
this.$el.append(view.render().el);
this.$el.trigger('add');
}