Update safety number change warning dialog
This commit is contained in:
parent
e87a0103cc
commit
5b83485c89
38 changed files with 1221 additions and 425 deletions
39
js/views/safety_number_change_dialog_view.js
Normal file
39
js/views/safety_number_change_dialog_view.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* global Whisper, Signal */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({
|
||||
templateName: 'safety-number-change-dialog',
|
||||
initialize(options) {
|
||||
const dialog = new Whisper.ReactWrapperView({
|
||||
Component: window.Signal.Components.SafetyNumberChangeDialog,
|
||||
props: {
|
||||
contacts: options.contacts.map(contact => contact.cachedProps),
|
||||
i18n: window.i18n,
|
||||
onCancel: () => {
|
||||
dialog.remove();
|
||||
this.remove();
|
||||
options.reject();
|
||||
},
|
||||
onConfirm: () => {
|
||||
dialog.remove();
|
||||
this.remove();
|
||||
options.resolve();
|
||||
},
|
||||
renderSafetyNumber(props) {
|
||||
return Signal.State.Roots.createSafetyNumberViewer(
|
||||
window.reduxStore,
|
||||
props
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
this.$('.safety-number-change-dialog-wrapper').append(dialog.el);
|
||||
},
|
||||
});
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue