2015-09-07 23:53:43 +02:00
|
|
|
/*
|
|
|
|
* vim: ts=4:sw=4:expandtab
|
2015-02-18 03:03:05 +01:00
|
|
|
*/
|
|
|
|
(function () {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
window.Whisper = window.Whisper || {};
|
|
|
|
|
2015-12-09 00:01:29 +01:00
|
|
|
Whisper.KeyConflictDialogueView = Whisper.View.extend({
|
2016-02-15 07:41:52 +01:00
|
|
|
className: 'key-conflict-dialogue clearfix',
|
2015-12-09 00:01:29 +01:00
|
|
|
templateName: 'key-conflict-dialogue',
|
2015-02-18 03:03:05 +01:00
|
|
|
initialize: function(options) {
|
|
|
|
this.conversation = options.conversation;
|
|
|
|
},
|
|
|
|
events: {
|
|
|
|
'click .verify': 'triggerVerify',
|
2016-02-15 07:41:52 +01:00
|
|
|
'click .resolve': 'resolve'
|
2015-02-18 03:03:05 +01:00
|
|
|
},
|
|
|
|
triggerVerify: function() {
|
2015-07-20 23:15:38 +02:00
|
|
|
this.trigger('verify', {identityKey: this.model.identityKey});
|
2015-02-18 03:03:05 +01:00
|
|
|
},
|
|
|
|
resolve: function() {
|
|
|
|
this.trigger('resolve');
|
|
|
|
this.remove();
|
2015-09-15 20:02:17 +02:00
|
|
|
this.conversation.resolveConflicts(this.model);
|
2015-02-18 03:03:05 +01:00
|
|
|
},
|
2015-12-09 00:01:29 +01:00
|
|
|
render_attributes: function() {
|
2015-12-26 07:47:09 +01:00
|
|
|
return {
|
2016-02-15 07:41:52 +01:00
|
|
|
message: i18n('identityChanged'),
|
2015-12-26 07:47:09 +01:00
|
|
|
resolve: i18n('acceptNewKey'),
|
|
|
|
verifyContact: i18n('verifyContact')
|
|
|
|
};
|
2015-02-18 03:03:05 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
})();
|