Move the safety number viewer into modal
This commit is contained in:
parent
8c34d6ebc2
commit
048e1e4cd7
14 changed files with 132 additions and 167 deletions
|
@ -1,37 +0,0 @@
|
|||
// Copyright 2015-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global Backbone, Signal, Whisper, $ */
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function () {
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.KeyVerificationPanelView = Whisper.View.extend({
|
||||
className: 'panel',
|
||||
template: () => $('#key-verification').html(),
|
||||
initialize(options) {
|
||||
this.render();
|
||||
|
||||
this.view = new Whisper.ReactWrapperView({
|
||||
JSX: Signal.State.Roots.createSafetyNumberViewer(window.reduxStore, {
|
||||
contactID: options.model.get('id'),
|
||||
}),
|
||||
onInitialRender: () => {
|
||||
if (options.onLoad) {
|
||||
options.onLoad(this);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
this.$('.key-verification-wrapper').append(this.view.el);
|
||||
},
|
||||
|
||||
remove() {
|
||||
if (this.view) {
|
||||
this.view.remove();
|
||||
}
|
||||
Backbone.View.prototype.remove.call(this);
|
||||
},
|
||||
});
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue