diff --git a/background.html b/background.html
index bdbfdad53..3591f294a 100644
--- a/background.html
+++ b/background.html
@@ -61,7 +61,6 @@
-
-
-
-
-
-
-
diff --git a/js/modules/signal.js b/js/modules/signal.js
index faff94482..a5992190d 100644
--- a/js/modules/signal.js
+++ b/js/modules/signal.js
@@ -51,9 +51,6 @@ const {
} = require('../../ts/components/conversation/MessageDetail');
const { Quote } = require('../../ts/components/conversation/Quote');
const { ProgressModal } = require('../../ts/components/ProgressModal');
-const {
- SafetyNumberChangeDialog,
-} = require('../../ts/components/SafetyNumberChangeDialog');
const {
StagedLinkPreview,
} = require('../../ts/components/conversation/StagedLinkPreview');
@@ -79,13 +76,9 @@ const {
createConversationHeader,
} = require('../../ts/state/roots/createConversationHeader');
const { createApp } = require('../../ts/state/roots/createApp');
-const { createCallManager } = require('../../ts/state/roots/createCallManager');
const {
createForwardMessageModal,
} = require('../../ts/state/roots/createForwardMessageModal');
-const {
- createGlobalModalContainer,
-} = require('../../ts/state/roots/createGlobalModalContainer');
const {
createGroupLinkManagement,
} = require('../../ts/state/roots/createGroupLinkManagement');
@@ -347,7 +340,6 @@ exports.setup = (options = {}) => {
MessageDetail,
Quote,
ProgressModal,
- SafetyNumberChangeDialog,
StagedLinkPreview,
DisappearingTimeDialog,
Types: {
@@ -357,14 +349,12 @@ exports.setup = (options = {}) => {
const Roots = {
createApp,
- createCallManager,
createChatColorPicker,
createCompositionArea,
createContactModal,
createConversationDetails,
createConversationHeader,
createForwardMessageModal,
- createGlobalModalContainer,
createGroupLinkManagement,
createGroupV1MigrationModal,
createGroupV2JoinModal,
diff --git a/js/views/banner_view.js b/js/views/banner_view.js
deleted file mode 100644
index 92e9e6f06..000000000
--- a/js/views/banner_view.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2017-2020 Signal Messenger, LLC
-// SPDX-License-Identifier: AGPL-3.0-only
-
-/* global Whisper, $ */
-
-// eslint-disable-next-line func-names
-(function () {
- window.Whisper = window.Whisper || {};
-
- Whisper.BannerView = Whisper.View.extend({
- className: 'banner',
- template: () => $('#banner').html(),
- events: {
- 'click .dismiss': 'onDismiss',
- 'click .body': 'onClick',
- },
- initialize(options) {
- this.message = options.message;
- this.callbacks = {
- onDismiss: options.onDismiss,
- onClick: options.onClick,
- };
- this.render();
- },
- render_attributes() {
- return {
- message: this.message,
- };
- },
- onDismiss(e) {
- this.callbacks.onDismiss();
- e.stopPropagation();
- },
- onClick() {
- this.callbacks.onClick();
- },
- });
-})();
diff --git a/js/views/contact_list_view.js b/js/views/contact_list_view.js
deleted file mode 100644
index 39c32e613..000000000
--- a/js/views/contact_list_view.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015-2020 Signal Messenger, LLC
-// SPDX-License-Identifier: AGPL-3.0-only
-
-/* global Whisper, textsecure, $ */
-
-// eslint-disable-next-line func-names
-(function () {
- window.Whisper = window.Whisper || {};
-
- Whisper.ContactListView = Whisper.ListView.extend({
- tagName: 'div',
- itemView: Whisper.View.extend({
- tagName: 'div',
- className: 'contact',
- template: () => $('#contact').html(),
- initialize(options) {
- this.ourNumber = textsecure.storage.user.getNumber();
- this.listenBack = options.listenBack;
- this.loading = false;
- this.conversation = options.conversation;
-
- this.listenTo(this.model, 'change', this.render);
- },
- render() {
- if (this.contactView) {
- this.contactView.remove();
- this.contactView = null;
- }
-
- const formattedContact = this.model.format();
-
- this.contactView = new Whisper.ReactWrapperView({
- className: 'contact-wrapper',
- Component: window.Signal.Components.ContactListItem,
- props: {
- ...formattedContact,
- onClick: () =>
- this.conversation.trigger(
- 'show-contact-modal',
- formattedContact.id
- ),
- },
- });
- this.$el.append(this.contactView.el);
- return this;
- },
- }),
- });
-})();
diff --git a/js/views/group_member_list_view.js b/js/views/group_member_list_view.js
deleted file mode 100644
index 2ade0085a..000000000
--- a/js/views/group_member_list_view.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015-2020 Signal Messenger, LLC
-// SPDX-License-Identifier: AGPL-3.0-only
-
-/* global Whisper, i18n, $ */
-
-// eslint-disable-next-line func-names
-(function () {
- window.Whisper = window.Whisper || {};
-
- Whisper.GroupMemberList = Whisper.View.extend({
- className: 'group-member-list panel',
- template: () => $('#group-member-list').html(),
- initialize(options) {
- this.needVerify = options.needVerify;
-
- this.render();
-
- this.member_list_view = new Whisper.ContactListView({
- collection: this.model,
- className: 'members',
- toInclude: {
- listenBack: options.listenBack,
- conversation: options.conversation,
- },
- });
- this.member_list_view.render();
-
- this.$('.container').append(this.member_list_view.el);
- },
- render_attributes() {
- let summary;
- if (this.needVerify) {
- summary = i18n('membersNeedingVerification');
- }
-
- return {
- members: i18n('groupMembers'),
- summary,
- };
- },
- });
-})();
diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js
index 3d9bbef8b..8f89f2a0f 100644
--- a/js/views/inbox_view.js
+++ b/js/views/inbox_view.js
@@ -137,8 +137,6 @@
this.startConnectionListener();
} else {
this.setupLeftPane();
- this.setupCallManagerUI();
- this.setupGlobalModalContainer();
}
Whisper.events.on('pack-install-failed', () => {
@@ -155,28 +153,6 @@
events: {
click: 'onClick',
},
- setupCallManagerUI() {
- if (this.callManagerView) {
- return;
- }
- this.callManagerView = new Whisper.ReactWrapperView({
- className: 'call-manager-wrapper',
- JSX: Signal.State.Roots.createCallManager(window.reduxStore),
- });
- this.$('.call-manager-placeholder').append(this.callManagerView.el);
- },
- setupGlobalModalContainer() {
- if (this.globalModalContainerView) {
- return;
- }
- this.globalModalContainerView = new Whisper.ReactWrapperView({
- JSX: Signal.State.Roots.createGlobalModalContainer(window.reduxStore),
- });
- const node = document.querySelector('.inbox-container');
- if (node) {
- node.appendChild(this.globalModalContainerView.el);
- }
- },
setupLeftPane() {
if (this.leftPaneView) {
return;
@@ -217,8 +193,6 @@
},
onEmpty() {
this.setupLeftPane();
- this.setupCallManagerUI();
- this.setupGlobalModalContainer();
const view = this.appLoadingScreen;
if (view) {
@@ -241,14 +215,6 @@
this.$('#header, .gutter').addClass('inactive');
this.$('.conversation-stack').removeClass('inactive');
},
- focusHeader() {
- this.$('.conversation-stack').addClass('inactive');
- this.$('#header, .gutter').removeClass('inactive');
- this.$('.conversation:first .menu').trigger('close');
- },
- reloadBackgroundPage() {
- window.location.reload();
- },
closeRecording(e) {
if (e && this.$(e.target).closest('.capture-audio').length > 0) {
return;
diff --git a/js/views/list_view.js b/js/views/list_view.js
deleted file mode 100644
index b546ce89a..000000000
--- a/js/views/list_view.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014-2020 Signal Messenger, LLC
-// SPDX-License-Identifier: AGPL-3.0-only
-
-/* global Backbone, Whisper, _ */
-
-// eslint-disable-next-line func-names
-(function () {
- window.Whisper = window.Whisper || {};
-
- /*
- * Generic list view that watches a given collection, wraps its members in
- * a given child view and adds the child view elements to its own element.
- */
- Whisper.ListView = Backbone.View.extend({
- tagName: 'ul',
- itemView: Backbone.View,
- initialize(options) {
- this.options = options || {};
- this.listenTo(this.collection, 'add', this.addOne);
- this.listenTo(this.collection, 'reset', this.addAll);
- },
-
- addOne(model) {
- if (this.itemView) {
- const options = _.extend({}, this.options.toInclude, { model });
- // eslint-disable-next-line new-cap
- const view = new this.itemView(options);
- this.$el.append(view.render().el);
- this.$el.trigger('add');
- }
- },
-
- addAll() {
- this.$el.html('');
- this.collection.each(this.addOne, this);
- },
-
- render() {
- this.addAll();
- return this;
- },
- });
-})();
diff --git a/js/views/safety_number_change_dialog_view.js b/js/views/safety_number_change_dialog_view.js
deleted file mode 100644
index 792ae258e..000000000
--- a/js/views/safety_number_change_dialog_view.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2020 Signal Messenger, LLC
-// SPDX-License-Identifier: AGPL-3.0-only
-
-/* global Whisper, Signal, $ */
-
-// eslint-disable-next-line func-names
-(function () {
- window.Whisper = window.Whisper || {};
-
- Whisper.SafetyNumberChangeDialogView = Whisper.View.extend({
- template: () => $('#safety-number-change-dialog').html(),
- initialize(options) {
- const dialog = new Whisper.ReactWrapperView({
- Component: window.Signal.Components.SafetyNumberChangeDialog,
- props: {
- confirmText: options.confirmText,
- contacts: options.contacts.map(contact => contact.format()),
- 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);
- },
- });
-})();
diff --git a/test/index.html b/test/index.html
index b74c8353f..d192ea3d7 100644
--- a/test/index.html
+++ b/test/index.html
@@ -43,7 +43,6 @@
@@ -131,10 +114,6 @@
-
-