Improve identity key conflict ux
Clicking on a key conflict message opens the message detail view, which displays the contact(s) in this conversation. If the message contains a key conflict with any of these contacts, a button is displayed which attempts to resolve that conflict and any other conflicts in the conversation that are related to that contact.
This commit is contained in:
parent
857eee5003
commit
897d391817
11 changed files with 415 additions and 81 deletions
|
@ -17,20 +17,6 @@
|
|||
'use strict';
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
var ErrorView = Backbone.View.extend({
|
||||
className: 'error',
|
||||
events: {
|
||||
'click' : 'replay'
|
||||
},
|
||||
replay: function() {
|
||||
new window.textsecure.ReplayableError(this.model).replay();
|
||||
},
|
||||
render: function() {
|
||||
this.$el.text(this.model.message);
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
var ContentMessageView = Whisper.View.extend({
|
||||
tagName: 'div',
|
||||
template: $('#message').html(),
|
||||
|
@ -75,10 +61,13 @@
|
|||
|
||||
var errors = this.model.get('errors');
|
||||
if (errors && errors.length) {
|
||||
this.$el.find('.bubble').append(
|
||||
this.$el.find('.bubble').prepend(
|
||||
errors.map(function(error) {
|
||||
return new ErrorView({model: error}).render().el;
|
||||
})
|
||||
return new Whisper.MessageErrorView({
|
||||
model: error,
|
||||
message: this.model
|
||||
}).render().el;
|
||||
}.bind(this))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue