Conversation Colors
This commit is contained in:
parent
b63d8e908c
commit
28f016ce48
128 changed files with 3997 additions and 1207 deletions
|
@ -30,6 +30,7 @@ const {
|
|||
AttachmentList,
|
||||
} = require('../../ts/components/conversation/AttachmentList');
|
||||
const { CaptionEditor } = require('../../ts/components/CaptionEditor');
|
||||
const { ChatColorPicker } = require('../../ts/components/ChatColorPicker');
|
||||
const {
|
||||
ConfirmationDialog,
|
||||
} = require('../../ts/components/ConfirmationDialog');
|
||||
|
@ -61,6 +62,9 @@ const {
|
|||
|
||||
// State
|
||||
const { createTimeline } = require('../../ts/state/roots/createTimeline');
|
||||
const {
|
||||
createChatColorPicker,
|
||||
} = require('../../ts/state/roots/createChatColorPicker');
|
||||
const {
|
||||
createCompositionArea,
|
||||
} = require('../../ts/state/roots/createCompositionArea');
|
||||
|
@ -77,6 +81,9 @@ 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');
|
||||
|
@ -324,6 +331,7 @@ exports.setup = (options = {}) => {
|
|||
const Components = {
|
||||
AttachmentList,
|
||||
CaptionEditor,
|
||||
ChatColorPicker,
|
||||
ConfirmationDialog,
|
||||
ContactDetail,
|
||||
ContactListItem,
|
||||
|
@ -345,11 +353,13 @@ exports.setup = (options = {}) => {
|
|||
|
||||
const Roots = {
|
||||
createCallManager,
|
||||
createChatColorPicker,
|
||||
createCompositionArea,
|
||||
createContactModal,
|
||||
createConversationDetails,
|
||||
createConversationHeader,
|
||||
createForwardMessageModal,
|
||||
createGlobalModalContainer,
|
||||
createGroupLinkManagement,
|
||||
createGroupV1MigrationModal,
|
||||
createGroupV2JoinModal,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2017-2020 Signal Messenger, LLC
|
||||
// Copyright 2017-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global Backbone, Whisper, storage, _, ConversationController, $ */
|
||||
|
@ -34,17 +34,10 @@
|
|||
},
|
||||
applyTheme() {
|
||||
const theme = resolveTheme();
|
||||
const iOS = storage.get('userAgent') === 'OWI';
|
||||
this.$el
|
||||
.removeClass('light-theme')
|
||||
.removeClass('dark-theme')
|
||||
.addClass(`${theme}-theme`);
|
||||
|
||||
if (iOS) {
|
||||
this.$el.addClass('ios-theme');
|
||||
} else {
|
||||
this.$el.removeClass('ios-theme');
|
||||
}
|
||||
},
|
||||
applyHideMenu() {
|
||||
const hideMenuBar = storage.get('hide-menu-bar', false);
|
||||
|
|
|
@ -48,18 +48,18 @@
|
|||
});
|
||||
|
||||
const COLORS = {
|
||||
red: '#cc163d',
|
||||
deep_orange: '#c73800',
|
||||
brown: '#746c53',
|
||||
pink: '#a23474',
|
||||
purple: '#862caf',
|
||||
indigo: '#5951c8',
|
||||
blue: '#336ba3',
|
||||
teal: '#067589',
|
||||
green: '#3b7845',
|
||||
light_green: '#1c8260',
|
||||
blue_grey: '#895d66',
|
||||
grey: '#6b6b78',
|
||||
ultramarine: '#2c6bed',
|
||||
blue: '#0a69c7',
|
||||
burlap: '#866118',
|
||||
crimson: '#d00b2c',
|
||||
forest: '#067919',
|
||||
indigo: '#5151f6',
|
||||
plum: '#c70a88',
|
||||
steel: '#077288',
|
||||
taupe: '#cb0b6b',
|
||||
teal: '#077288',
|
||||
ultramarine: '#0d59f2',
|
||||
vermilion: '#c72a0a',
|
||||
violet: '#a20ced',
|
||||
wintergreen: '#067953',
|
||||
};
|
||||
})();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2014-2020 Signal Messenger, LLC
|
||||
// Copyright 2014-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global
|
||||
|
@ -115,6 +115,7 @@
|
|||
} else {
|
||||
this.setupLeftPane();
|
||||
this.setupCallManagerUI();
|
||||
this.setupGlobalModalContainer();
|
||||
}
|
||||
|
||||
Whisper.events.on('pack-install-failed', () => {
|
||||
|
@ -141,6 +142,18 @@
|
|||
});
|
||||
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;
|
||||
|
@ -182,6 +195,7 @@
|
|||
onEmpty() {
|
||||
this.setupLeftPane();
|
||||
this.setupCallManagerUI();
|
||||
this.setupGlobalModalContainer();
|
||||
|
||||
const view = this.appLoadingScreen;
|
||||
if (view) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue