diff --git a/js/background.js b/js/background.js index 68df6a812..81cbf9de8 100644 --- a/js/background.js +++ b/js/background.js @@ -766,6 +766,7 @@ if (firstRun === true && deviceId !== '1') { const hasThemeSetting = Boolean(storage.get('theme-setting')); if (!hasThemeSetting && textsecure.storage.get('userAgent') === 'OWI') { + storage.put('theme-setting', 'ios'); onChangeTheme(); } const syncRequest = new textsecure.SyncRequest( diff --git a/js/models/conversations.js b/js/models/conversations.js index a7652b810..ca2c8c168 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1374,6 +1374,10 @@ }, getColor() { + if (!this.isPrivate()) { + return null; + } + const { migrateColor } = Util; return migrateColor(this.get('color')); }, diff --git a/js/models/messages.js b/js/models/messages.js index a1e848137..2beca3b94 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -393,6 +393,7 @@ const contact = this.findAndFormatContact(phoneNumber); const contactModel = this.findContact(phoneNumber); + const authorColor = contactModel ? contactModel.getColor() : null; const authorAvatarPath = contactModel ? contactModel.getAvatarPath() : null; @@ -406,7 +407,6 @@ const conversation = this.getConversation(); const isGroup = conversation && !conversation.isPrivate(); - const conversationColor = conversation && conversation.getColor(); const attachments = this.get('attachments'); const firstAttachment = attachments && attachments[0]; @@ -418,10 +418,10 @@ timestamp: this.get('sent_at'), status: this.getMessagePropStatus(), contact: this.getPropsForEmbeddedContact(), + authorColor, authorName: contact.name, authorProfileName: contact.profileName, authorPhoneNumber: contact.phoneNumber, - conversationColor, conversationType: isGroup ? 'group' : 'direct', attachment: this.getPropsForAttachment(firstAttachment), quote: this.getPropsForQuote(), @@ -534,9 +534,9 @@ const { format } = PhoneNumber; const regionCode = storage.get('regionCode'); - const conversation = this.getConversation(); const { author, id, referencedMessageNotFound } = quote; const contact = author && ConversationController.get(author); + const authorColor = contact ? contact.getColor() : 'grey'; const authorPhoneNumber = format(author, { ourRegionCode: regionCode, @@ -563,7 +563,7 @@ authorPhoneNumber, authorProfileName, authorName, - conversationColor: conversation && conversation.getColor(), + authorColor, onClick, referencedMessageNotFound, }; diff --git a/js/views/app_view.js b/js/views/app_view.js index 65dc701c3..1db6314e3 100644 --- a/js/views/app_view.js +++ b/js/views/app_view.js @@ -21,11 +21,18 @@ openInbox: 'openInbox', }, applyTheme() { + const iOS = storage.get('userAgent') === 'OWI'; const theme = storage.get('theme-setting') || 'light'; 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); diff --git a/stylesheets/_ios.scss b/stylesheets/_ios.scss new file mode 100644 index 000000000..e10e76b25 --- /dev/null +++ b/stylesheets/_ios.scss @@ -0,0 +1,291 @@ +// When paired with an iOS device, this stylesheet will apply + +.ios-theme { + // _modules + + .module-message__container--outgoing { + background-color: $color-signal-blue; + color: $color-white; + } + + .module-message__container--incoming { + background-color: $color-light-10; + color: $color-gray-90; + } + + .module-message__author { + color: $color-gray-90; + } + + .module-message__text { + color: $color-white; + font-size: 14px; + a { + text-decoration: underline; + color: $color-white; + } + } + + .module-message__text--incoming { + color: $color-gray-90; + a { + text-decoration: underline; + color: $color-gray-90; + } + } + + .module-message__metadata__date { + color: $color-white-08; + } + .module-message__metadata__date--incoming { + color: $color-gray-60; + } + .module-message__metadata__date--with-image-no-caption { + color: $color-white; + } + + .module-message__metadata__status-icon--sending { + @include color-svg('../images/sending.svg', $color-white); + } + + .module-message__metadata__status-icon--sent { + @include color-svg('../images/check-circle-outline.svg', $color-white-08); + } + .module-message__metadata__status-icon--delivered { + @include color-svg('../images/double-check.svg', $color-white-08); + } + .module-message__metadata__status-icon--read { + @include color-svg('../images/read.svg', $color-white-08); + } + + .module-message__metadata__status-icon--with-image-no-caption { + background-color: $color-white; + } + + .module-message__generic-attachment__file-name { + color: $color-white; + } + + .module-message__generic-attachment__file-name--incoming { + color: $color-gray-90; + } + + .module-message__generic-attachment__file-size { + color: $color-white; + } + + .module-message__generic-attachment__file-size--incoming { + color: $color-gray-90; + } + + .module-expire-timer { + background-color: $color-white-08; + } + + .module-expire-timer--incoming { + background-color: $color-gray-60; + } + + .module-quote--outgoing { + border-left-color: $color-white; + background-color: $color-white-06; + } + + .module-quote--incoming { + background-color: $color-signal-blue-025; + border-left-color: $color-signal-blue; + } + + .module-quote__reference-warning--incoming { + background-color: $color-signal-blue-mix; + } + + // When you're composing a new quote + .bottom-bar { + .module-quote { + background-color: $color-signal-blue-025; + border-left-color: $color-signal-blue; + } + } + + .module-embedded-contact__contact-name { + color: $color-white; + } + + .module-embedded-contact__contact-method { + color: $color-white-07; + } + + .module-embedded-contact__contact-name--incoming { + color: $color-gray-90; + } + + .module-embedded-contact__contact-method--incoming { + color: $color-light-60; + } + + &.dark-theme { + // _modules + + .module-message__container--outgoing { + background-color: $color-signal-blue; + color: $color-gray-05; + } + + .module-message__container--incoming { + background-color: $color-gray-75; + color: $color-gray-05; + } + + .module-message__author { + color: $color-gray-05; + } + + .module-message__text--incoming { + color: $color-gray-05; + a { + text-decoration: underline; + color: $color-gray-05; + } + } + + .module-message__metadata__status-icon--sending { + @include color-svg('../images/sending.svg', $color-white); + } + + .module-message__metadata__status-icon--sent { + @include color-svg('../images/check-circle-outline.svg', $color-white-08); + } + .module-message__metadata__status-icon--delivered { + @include color-svg('../images/double-check.svg', $color-white-08); + } + .module-message__metadata__status-icon--read { + @include color-svg('../images/read.svg', $color-white-08); + } + + .module-message__metadata__date { + color: $color-white-08; + } + + .module-message__metadata__date--incoming { + color: $color-gray-25; + } + + .module-message__generic-attachment__file-name--incoming { + color: $color-gray-25; + } + .module-message__generic-attachment__file-size--incoming { + color: $color-gray-25; + } + + .module-expire-timer { + background-color: $color-white-08; + } + + .module-expire-timer--incoming { + background-color: $color-gray-25; + } + + .module-quote--outgoing { + border-left-color: $color-black; + background-color: $color-conversation-blue-shade; + } + + .module-quote--incoming { + background-color: $color-conversation-blue-shade; + border-left-color: $color-signal-blue; + } + + .module-quote__primary__author { + color: $color-gray-05; + } + + .module-quote__primary__text { + color: $color-gray-05; + a { + color: $color-gray-05; + } + } + + .module-quote__primary__type-label { + color: $color-gray-05; + } + + .module-quote__primary__type-label--incoming { + color: $color-gray-05; + } + + .module-quote__primary__author--incoming { + color: $color-gray-05; + } + + .module-quote__primary__text--incoming { + color: $color-gray-05; + a { + color: $color-gray-05; + } + } + + .module-quote__generic-file__text { + color: $color-gray-05; + } + + .module-quote__generic-file__text--incoming { + color: $color-gray-05; + } + + .module-quote__reference-warning { + background-color: $color-white-04; + } + + .module-quote__reference-warning--incoming { + background-color: $color-signal-blue-050; + } + + .module-quote__reference-warning__text { + color: $color-gray-90; + } + + .module-quote__reference-warning__text--incoming { + color: $color-gray-05; + } + + .module-quote__reference-warning__icon { + @include color-svg('../images/broken-link.svg', $color-signal-blue); + } + + .module-quote__reference-warning__icon--incoming { + @include color-svg('../images/broken-link.svg', $color-gray-75); + } + + // When you're composing a new quote + .bottom-bar { + .module-quote__primary__author { + color: $color-gray-05; + } + + .module-quote__primary__type-label { + color: $color-gray-05; + } + + .module-quote__generic-file__text { + color: $color-gray-05; + } + + .module-quote__primary__text { + color: $color-gray-05; + a { + color: $color-gray-05; + } + } + } + + .module-embedded-contact__contact-name--incoming { + color: $color-gray-05; + } + + .module-embedded-contact__contact-method--incoming { + color: $color-gray-25; + } + } +} diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index f004fa8c9..56a130585 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -76,7 +76,7 @@ cursor: pointer; @include color-svg('../images/download.svg', $color-light-45); &:hover { - @include color-svg('../images/download.svg', $color-light-90); + @include color-svg('../images/download.svg', $color-gray-90); } } @@ -94,7 +94,7 @@ cursor: pointer; @include color-svg('../images/reply.svg', $color-light-45); &:hover { - @include color-svg('../images/reply.svg', $color-light-90); + @include color-svg('../images/reply.svg', $color-gray-90); } } @@ -112,7 +112,7 @@ cursor: pointer; @include color-svg('../images/ellipsis.svg', $color-light-45); &:hover { - @include color-svg('../images/ellipsis.svg', $color-light-90); + @include color-svg('../images/ellipsis.svg', $color-gray-90); } } @@ -157,46 +157,46 @@ min-width: 0px; } -.module-message__container--incoming { +.module-message__container--outgoing { background-color: $color-light-10; } // In case the color gets messed up -.module-message__container--outgoing { +.module-message__container--incoming { background-color: $color-conversation-grey; } -.module-message__container--outgoing-red { +.module-message__container--incoming-red { background-color: $color-conversation-red; } -.module-message__container--outgoing-deep_orange { +.module-message__container--incoming-deep_orange { background-color: $color-conversation-deep_orange; } -.module-message__container--outgoing-brown { +.module-message__container--incoming-brown { background-color: $color-conversation-brown; } -.module-message__container--outgoing-pink { +.module-message__container--incoming-pink { background-color: $color-conversation-pink; } -.module-message__container--outgoing-purple { +.module-message__container--incoming-purple { background-color: $color-conversation-purple; } -.module-message__container--outgoing-indigo { +.module-message__container--incoming-indigo { background-color: $color-conversation-indigo; } -.module-message__container--outgoing-blue { +.module-message__container--incoming-blue { background-color: $color-conversation-blue; } -.module-message__container--outgoing-teal { +.module-message__container--incoming-teal { background-color: $color-conversation-teal; } -.module-message__container--outgoing-green { +.module-message__container--incoming-green { background-color: $color-conversation-green; } -.module-message__container--outgoing-light_green { +.module-message__container--incoming-light_green { background-color: $color-conversation-light_green; } -.module-message__container--outgoing-blue_grey { +.module-message__container--incoming-blue_grey { background-color: $color-conversation-blue_grey; } @@ -400,7 +400,7 @@ white-space: nowrap; text-overflow: clip; - color: $color-light-90; + color: $color-gray-90; } .module-message__generic-attachment__text { @@ -411,7 +411,7 @@ } .module-message__generic-attachment__file-name { - color: $color-white; + color: $color-gray-90; font-size: 14px; line-height: 18px; font-weight: 300; @@ -424,11 +424,11 @@ } .module-message__generic-attachment__file-name--incoming { - color: $color-light-90; + color: $color-white; } .module-message__generic-attachment__file-size { - color: $color-white; + color: $color-gray-90; font-size: 11px; line-height: 16px; letter-spacing: 0.3px; @@ -436,11 +436,11 @@ } .module-message__generic-attachment__file-size--incoming { - color: $color-light-90; + color: $color-white; } .module-message__author { - color: $color-light-90; + color: $color-white; font-size: 13px; font-weight: 300; line-height: 18px; @@ -456,7 +456,7 @@ } .module-message__text { - color: $color-white; + color: $color-gray-90; font-size: 14px; line-height: 18px; text-align: start; @@ -468,15 +468,15 @@ a { text-decoration: underline; - color: $color-white; + color: $color-gray-90; } } .module-message__text--incoming { - color: $color-light-90; + color: $color-white; a { text-decoration: underline; - color: $color-light-90; + color: $color-white; } } @@ -508,11 +508,11 @@ font-size: 11px; line-height: 16px; letter-spacing: 0.3px; - color: $color-white-08; + color: $color-gray-60; text-transform: uppercase; } .module-message__metadata__date--incoming { - color: $color-light-60; + color: $color-white-08; } .module-message__metadata__date--with-image-no-caption { color: $color-white; @@ -531,7 +531,7 @@ } .module-message__metadata__status-icon--sending { - @include color-svg('../images/sending.svg', $color-white-08); + @include color-svg('../images/sending.svg', $color-gray-60); animation: module-message__metdata__status-icon--spinning 4s linear infinite; } @@ -543,14 +543,14 @@ } .module-message__metadata__status-icon--sent { - @include color-svg('../images/check-circle-outline.svg', $color-white-08); + @include color-svg('../images/check-circle-outline.svg', $color-gray-60); } .module-message__metadata__status-icon--delivered { - @include color-svg('../images/double-check.svg', $color-white-08); + @include color-svg('../images/double-check.svg', $color-gray-60); width: 18px; } .module-message__metadata__status-icon--read { - @include color-svg('../images/read.svg', $color-white-08); + @include color-svg('../images/read.svg', $color-gray-60); width: 18px; } @@ -595,48 +595,48 @@ display: inline-block; margin-left: 6px; margin-bottom: 2px; - @include color-svg('../images/timer-60.svg', $color-white-08); + @include color-svg('../images/timer-60.svg', $color-gray-60); } .module-expire-timer--55 { - @include color-svg('../images/timer-55.svg', $color-white-08); + @include color-svg('../images/timer-55.svg', $color-gray-60); } .module-expire-timer--50 { - @include color-svg('../images/timer-50.svg', $color-white-08); + @include color-svg('../images/timer-50.svg', $color-gray-60); } .module-expire-timer--45 { - @include color-svg('../images/timer-45.svg', $color-white-08); + @include color-svg('../images/timer-45.svg', $color-gray-60); } .module-expire-timer--40 { - @include color-svg('../images/timer-40.svg', $color-white-08); + @include color-svg('../images/timer-40.svg', $color-gray-60); } .module-expire-timer--35 { - @include color-svg('../images/timer-35.svg', $color-white-08); + @include color-svg('../images/timer-35.svg', $color-gray-60); } .module-expire-timer--30 { - @include color-svg('../images/timer-30.svg', $color-white-08); + @include color-svg('../images/timer-30.svg', $color-gray-60); } .module-expire-timer--25 { - @include color-svg('../images/timer-25.svg', $color-white-08); + @include color-svg('../images/timer-25.svg', $color-gray-60); } .module-expire-timer--20 { - @include color-svg('../images/timer-20.svg', $color-white-08); + @include color-svg('../images/timer-20.svg', $color-gray-60); } .module-expire-timer--15 { - @include color-svg('../images/timer-15.svg', $color-white-08); + @include color-svg('../images/timer-15.svg', $color-gray-60); } .module-expire-timer--10 { - @include color-svg('../images/timer-10.svg', $color-white-08); + @include color-svg('../images/timer-10.svg', $color-gray-60); } .module-expire-timer--05 { - @include color-svg('../images/timer-05.svg', $color-white-08); + @include color-svg('../images/timer-05.svg', $color-gray-60); } .module-expire-timer--00 { - @include color-svg('../images/timer-00.svg', $color-white-08); + @include color-svg('../images/timer-00.svg', $color-gray-60); } .module-expire-timer--incoming { - background-color: $color-gray-60; + background-color: $color-white-08; } // When status indicators are overlaid on top of an image, they use different colors @@ -687,90 +687,90 @@ border-bottom-right-radius: 0px; } -.module-quote--incoming { +.module-quote--outgoing { border-left-color: $color-conversation-grey; background-color: $color-conversation-grey-tint; } -.module-quote--incoming-red { +.module-quote--outgoing-red { border-left-color: $color-conversation-red; background-color: $color-conversation-red-tint; } -.module-quote--incoming-deep_orange { +.module-quote--outgoing-deep_orange { border-left-color: $color-conversation-deep_orange; background-color: $color-conversation-deep_orange-tint; } -.module-quote--incoming-brown { +.module-quote--outgoing-brown { border-left-color: $color-conversation-brown; background-color: $color-conversation-brown-tint; } -.module-quote--incoming-pink { +.module-quote--outgoing-pink { border-left-color: $color-conversation-pink; background-color: $color-conversation-pink-tint; } -.module-quote--incoming-purple { +.module-quote--outgoing-purple { border-left-color: $color-conversation-purple; background-color: $color-conversation-purple-tint; } -.module-quote--incoming-indigo { +.module-quote--outgoing-indigo { border-left-color: $color-conversation-indigo; background-color: $color-conversation-indigo-tint; } -.module-quote--incoming-blue { +.module-quote--outgoing-blue { border-left-color: $color-conversation-blue; background-color: $color-conversation-blue-tint; } -.module-quote--incoming-teal { +.module-quote--outgoing-teal { border-left-color: $color-conversation-teal; background-color: $color-conversation-teal-tint; } -.module-quote--incoming-green { +.module-quote--outgoing-green { border-left-color: $color-conversation-green; background-color: $color-conversation-green-tint; } -.module-quote--incoming-light_green { +.module-quote--outgoing-light_green { border-left-color: $color-conversation-light_green; background-color: $color-conversation-light_green-tint; } -.module-quote--incoming-blue_grey { +.module-quote--outgoing-blue_grey { border-left-color: $color-conversation-blue_grey; background-color: $color-conversation-blue_grey-tint; } -.module-quote--outgoing { +.module-quote--incoming { border-left-color: $color-white; background-color: $color-conversation-grey-tint; } -.module-quote--outgoing-red { +.module-quote--incoming-red { background-color: $color-conversation-red-tint; } -.module-quote--outgoing-deep_orange { +.module-quote--incoming-deep_orange { background-color: $color-conversation-deep_orange-tint; } -.module-quote--outgoing-brown { +.module-quote--incoming-brown { background-color: $color-conversation-brown-tint; } -.module-quote--outgoing-pink { +.module-quote--incoming-pink { background-color: $color-conversation-pink-tint; } -.module-quote--outgoing-purple { +.module-quote--incoming-purple { background-color: $color-conversation-purple-tint; } -.module-quote--outgoing-indigo { +.module-quote--incoming-indigo { background-color: $color-conversation-indigo-tint; } -.module-quote--outgoing-blue { +.module-quote--incoming-blue { background-color: $color-conversation-blue-tint; } -.module-quote--outgoing-teal { +.module-quote--incoming-teal { background-color: $color-conversation-teal-tint; } -.module-quote--outgoing-green { +.module-quote--incoming-green { background-color: $color-conversation-green-tint; } -.module-quote--outgoing-light_green { +.module-quote--incoming-light_green { background-color: $color-conversation-light_green-tint; } -.module-quote--outgoing-blue_grey { +.module-quote--incoming-blue_grey { background-color: $color-conversation-blue_grey-tint; } @@ -788,7 +788,7 @@ font-size: 13px; line-height: 18px; font-weight: 300; - color: $color-light-90; + color: $color-gray-90; overflow-x: hidden; white-space: nowrap; @@ -802,10 +802,10 @@ .module-quote__primary__text { font-size: 14px; line-height: 18px; - color: $color-light-90; + color: $color-gray-90; a { - color: $color-light-90; + color: $color-gray-90; } overflow-wrap: break-word; @@ -827,7 +827,7 @@ .module-quote__primary__type-label { font-style: italic; - color: $color-light-90; + color: $color-gray-90; font-size: 13px; line-height: 18px; } @@ -930,7 +930,7 @@ .module-quote__generic-file__text { font-size: 14px; line-height: 18px; - color: $color-light-90; + color: $color-gray-90; max-width: calc(100% - 26px); overflow-x: hidden; @@ -954,12 +954,12 @@ .module-quote__reference-warning__icon { height: 16px; width: 16px; - @include color-svg('../images/broken-link.svg', $color-light-60); + @include color-svg('../images/broken-link.svg', $color-gray-60); } .module-quote__reference-warning__text { margin-left: 6px; - color: $color-light-90; + color: $color-gray-90; font-size: 13px; line-height: 18px; } @@ -994,7 +994,7 @@ line-height: 18px; font-weight: 300; margin-top: 6px; - color: $color-white; + color: $color-gray-90; max-width: 100%; white-space: nowrap; @@ -1003,7 +1003,7 @@ } .module-embedded-contact__contact-name--incoming { - color: $color-light-90; + color: $color-white; } .module-embedded-contact__contact-method { @@ -1011,7 +1011,7 @@ line-height: 16px; letter-spacing: 0.3px; margin-top: 3px; - color: $color-white-07; + color: $color-gray-60; max-width: 100%; white-space: nowrap; @@ -1020,7 +1020,7 @@ } .module-embedded-contact__contact-method--incoming { - color: $color-light-60; + color: $color-white-07; } // Module: Contact Detail @@ -1098,7 +1098,7 @@ font-size: 14px; line-height: 20px; letter-spacing: 0.3px; - color: $color-light-60; + color: $color-gray-60; text-align: center; } @@ -1117,7 +1117,7 @@ font-size: 14px; line-height: 20px; letter-spacing: 0.3px; - color: $color-light-60; + color: $color-gray-60; text-align: center; } @@ -1134,14 +1134,14 @@ margin-left: auto; margin-right: auto; margin-bottom: 7px; - @include color-svg('../images/shield.svg', $color-light-60); + @include color-svg('../images/shield.svg', $color-gray-60); } .module-safety-number-notification__text { font-size: 14px; line-height: 20px; letter-spacing: 0.3px; - color: $color-light-60; + color: $color-gray-60; } .module-safety-number-notification__contact { @@ -1168,7 +1168,7 @@ font-size: 14px; line-height: 20px; letter-spacing: 0.3px; - color: $color-light-60; + color: $color-gray-60; text-align: center; } @@ -1182,7 +1182,7 @@ margin-left: auto; margin-right: auto; margin-bottom: 4px; - @include color-svg('../images/verified-check.svg', $color-light-60); + @include color-svg('../images/verified-check.svg', $color-gray-60); } .module-verification-notification__icon--mark-not-verified { @@ -1191,7 +1191,7 @@ margin-left: auto; margin-right: auto; margin-bottom: 7px; - @include color-svg('../images/shield.svg', $color-light-60); + @include color-svg('../images/shield.svg', $color-gray-60); } // Module: Timer Notification @@ -1201,7 +1201,7 @@ font-size: 14px; line-height: 20px; letter-spacing: 0.3px; - color: $color-light-60; + color: $color-gray-60; text-align: center; } @@ -1218,11 +1218,11 @@ height: 20px; width: 20px; display: inline-block; - @include color-svg('../images/timer.svg', $color-light-60); + @include color-svg('../images/timer.svg', $color-gray-60); } .module-timer-notification__icon--disabled { - @include color-svg('../images/timer-disabled.svg', $color-light-60); + @include color-svg('../images/timer-disabled.svg', $color-gray-60); } .module-timer-notification__icon-label { @@ -1262,7 +1262,7 @@ flex-direction: row; align-items: center; - color: $color-light-60; + color: $color-gray-60; } .module-contact-list-item--with-click-handler { @@ -1288,7 +1288,7 @@ } .module-contact-list-item__text__verified-icon { - @include color-svg('../images/verified-check.svg', $color-light-60); + @include color-svg('../images/verified-check.svg', $color-gray-60); display: inline-block; width: 18px; height: 18px; @@ -1308,14 +1308,14 @@ align-items: center; height: $header-height; - color: $color-light-90; + color: $color-gray-90; background-color: $color-white; border-bottom: 1px solid $color-black-02; } .module-conversation-header__back-icon { - @include color-svg('../images/back.svg', $color-light-90); + @include color-svg('../images/back.svg', $color-gray-90); display: inline-block; margin-left: -10px; margin-right: -2px; @@ -1357,7 +1357,7 @@ font-size: 16px; line-height: 24px; font-weight: 300; - color: $color-light-90; + color: $color-gray-90; // width of avatar (28px) and our 8px left margin max-width: calc(100% - 36px); @@ -1373,7 +1373,7 @@ } .module-conversation-header__title__verified-icon { - @include color-svg('../images/verified-check.svg', $color-light-90); + @include color-svg('../images/verified-check.svg', $color-gray-90); display: inline-block; width: 1.25em; height: 1.25em; @@ -1389,7 +1389,7 @@ } .module-conversation-header__expiration__clock-icon { - @include color-svg('../images/timer.svg', $color-light-60); + @include color-svg('../images/timer.svg', $color-gray-60); height: 20px; width: 20px; display: inline-block; @@ -1401,7 +1401,7 @@ } .module-conversation-header__gear-icon { - @include color-svg('../images/gear.svg', $color-light-60); + @include color-svg('../images/gear.svg', $color-gray-60); height: 20px; width: 20px; margin-left: 4px; @@ -1487,7 +1487,7 @@ } .module-message-detail__contact__status-icon--sending { - @include color-svg('../images/sending.svg', $color-light-60); + @include color-svg('../images/sending.svg', $color-gray-60); animation: module-message-detail__contact__status-icon--spinning 4s linear infinite; } @@ -1882,7 +1882,7 @@ } .module-conversation-list-item__message__status-icon--sending { - @include color-svg('../images/sending.svg', $color-light-60); + @include color-svg('../images/sending.svg', $color-gray-60); animation: module-conversation-list-item__message__status-icon--spinning 4s linear infinite; } @@ -2086,7 +2086,7 @@ line-height: 24px; font-weight: 300; margin-left: 32px; - color: $color-light-90; + color: $color-gray-90; } // Third-party module: react-contextmenu @@ -2108,7 +2108,7 @@ } .react-contextmenu-item { - color: $color-light-90; + color: $color-gray-90; cursor: pointer; font-size: 13px; @@ -2126,7 +2126,7 @@ display: inline-block; position: absolute; right: 7px; - color: $color-light-90; + color: $color-gray-90; } .react-contextmenu-item.react-contextmenu-submenu { @@ -2143,7 +2143,7 @@ display: inline-block; position: absolute; right: 7px; - color: $color-light-90; + color: $color-gray-90; } .react-contextmenu-item.react-contextmenu-item--active, diff --git a/stylesheets/_theme_dark.scss b/stylesheets/_theme_dark.scss index 74ddb148f..6f6a4ce83 100644 --- a/stylesheets/_theme_dark.scss +++ b/stylesheets/_theme_dark.scss @@ -617,46 +617,46 @@ body.dark-theme { @include color-svg('../images/error.svg', $color-core-red); } - .module-message__container--incoming { + .module-message__container--outgoing { background-color: $color-dark-70; } // In case the color gets messed up - .module-message__container--outgoing { + .module-message__container--incoming { background-color: $color-conversation-grey; } - .module-message__container--outgoing-red { + .module-message__container--incoming-red { background-color: $color-conversation-red; } - .module-message__container--outgoing-deep_orange { + .module-message__container--incoming-deep_orange { background-color: $color-conversation-deep_orange; } - .module-message__container--outgoing-brown { + .module-message__container--incoming-brown { background-color: $color-conversation-brown; } - .module-message__container--outgoing-pink { + .module-message__container--incoming-pink { background-color: $color-conversation-pink; } - .module-message__container--outgoing-purple { + .module-message__container--incoming-purple { background-color: $color-conversation-purple; } - .module-message__container--outgoing-indigo { + .module-message__container--incoming-indigo { background-color: $color-conversation-indigo; } - .module-message__container--outgoing-blue { + .module-message__container--incoming-blue { background-color: $color-conversation-blue; } - .module-message__container--outgoing-teal { + .module-message__container--incoming-teal { background-color: $color-conversation-teal; } - .module-message__container--outgoing-green { + .module-message__container--incoming-green { background-color: $color-conversation-green; } - .module-message__container--outgoing-light_green { + .module-message__container--incoming-light_green { background-color: $color-conversation-light_green; } - .module-message__container--outgoing-blue_grey { + .module-message__container--incoming-blue_grey { background-color: $color-conversation-blue_grey; } @@ -847,90 +847,90 @@ body.dark-theme { // Module: Quoted Reply - .module-quote--incoming { + .module-quote--outgoing { border-left-color: $color-conversation-grey; background-color: $color-conversation-grey-shade; } - .module-quote--incoming-red { + .module-quote--outgoing-red { border-left-color: $color-conversation-red; background-color: $color-conversation-red-shade; } - .module-quote--incoming-deep_orange { + .module-quote--outgoing-deep_orange { border-left-color: $color-conversation-deep_orange; background-color: $color-conversation-deep_orange-shade; } - .module-quote--incoming-brown { + .module-quote--outgoing-brown { border-left-color: $color-conversation-brown; background-color: $color-conversation-brown-shade; } - .module-quote--incoming-pink { + .module-quote--outgoing-pink { border-left-color: $color-conversation-pink; background-color: $color-conversation-pink-shade; } - .module-quote--incoming-purple { + .module-quote--outgoing-purple { border-left-color: $color-conversation-purple; background-color: $color-conversation-purple-shade; } - .module-quote--incoming-indigo { + .module-quote--outgoing-indigo { border-left-color: $color-conversation-indigo; background-color: $color-conversation-indigo-shade; } - .module-quote--incoming-blue { + .module-quote--outgoing-blue { border-left-color: $color-conversation-blue; background-color: $color-conversation-blue-shade; } - .module-quote--incoming-teal { + .module-quote--outgoing-teal { border-left-color: $color-conversation-teal; background-color: $color-conversation-teal-shade; } - .module-quote--incoming-green { + .module-quote--outgoing-green { border-left-color: $color-conversation-green; background-color: $color-conversation-green-shade; } - .module-quote--incoming-light_green { + .module-quote--outgoing-light_green { border-left-color: $color-conversation-light_green; background-color: $color-conversation-light_green-shade; } - .module-quote--incoming-blue_grey { + .module-quote--outgoing-blue_grey { border-left-color: $color-conversation-blue_grey; background-color: $color-conversation-blue_grey-shade; } - .module-quote--outgoing { + .module-quote--incoming { border-left-color: $color-black; background-color: $color-conversation-grey-shade; } - .module-quote--outgoing-red { + .module-quote--incoming-red { background-color: $color-conversation-red-shade; } - .module-quote--outgoing-deep_orange { + .module-quote--incoming-deep_orange { background-color: $color-conversation-deep_orange-shade; } - .module-quote--outgoing-brown { + .module-quote--incoming-brown { background-color: $color-conversation-brown-shade; } - .module-quote--outgoing-pink { + .module-quote--incoming-pink { background-color: $color-conversation-pink-shade; } - .module-quote--outgoing-purple { + .module-quote--incoming-purple { background-color: $color-conversation-purple-shade; } - .module-quote--outgoing-indigo { + .module-quote--incoming-indigo { background-color: $color-conversation-indigo-shade; } - .module-quote--outgoing-blue { + .module-quote--incoming-blue { background-color: $color-conversation-blue-shade; } - .module-quote--outgoing-teal { + .module-quote--incoming-teal { background-color: $color-conversation-teal-shade; } - .module-quote--outgoing-green { + .module-quote--incoming-green { background-color: $color-conversation-green-shade; } - .module-quote--outgoing-light_green { + .module-quote--incoming-light_green { background-color: $color-conversation-light_green-shade; } - .module-quote--outgoing-blue_grey { + .module-quote--incoming-blue_grey { background-color: $color-conversation-blue_grey-shade; } diff --git a/stylesheets/_variables.scss b/stylesheets/_variables.scss index 0371ea162..320d4af9f 100644 --- a/stylesheets/_variables.scss +++ b/stylesheets/_variables.scss @@ -40,7 +40,7 @@ $color-gray-05: #eeefef; $color-gray-15: #d5d6d6; $color-gray-25: #bbbdbe; $color-gray-45: #898a8c; -$color-gray-60: #636467; +$color-gray-60: #6b6d70; $color-gray-75: #3d3e44; $color-gray-85: #23252a; $color-gray-90: #17191d; diff --git a/stylesheets/manifest.scss b/stylesheets/manifest.scss index 94c566e75..33a4b8ff2 100644 --- a/stylesheets/manifest.scss +++ b/stylesheets/manifest.scss @@ -17,6 +17,7 @@ @import 'conversation'; // Themes +@import 'ios'; @import 'theme_dark'; // New CSS diff --git a/ts/components/conversation/EmbeddedContact.md b/ts/components/conversation/EmbeddedContact.md index bf4842b37..1e0d07471 100644 --- a/ts/components/conversation/EmbeddedContact.md +++ b/ts/components/conversation/EmbeddedContact.md @@ -22,10 +22,10 @@ const contact = { onSendMessage: () => console.log('onSendMessage'), hasSignalAccount: true, }; - +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • console.log('onDownload')} @@ -22,7 +22,7 @@ Note that timestamp and status can be hidden with the `collapseMetadata` boolean console.log('onDownload')} @@ -36,7 +36,7 @@ Note that timestamp and status can be hidden with the `collapseMetadata` boolean collapseMetadata direction="incoming" timestamp={Date.now()} - conversationColor="red" + authorColor="red" text="Hello there from the new world!" i18n={util.i18n} onDownload={() => console.log('onDownload')} @@ -49,7 +49,7 @@ Note that timestamp and status can be hidden with the `collapseMetadata` boolean console.log('onDownload')} @@ -61,7 +61,7 @@ Note that timestamp and status can be hidden with the `collapseMetadata` boolean
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • @@ -2127,11 +2127,11 @@ Note that the author avatar goes away if `collapseMetadata` is set. @@ -2139,7 +2139,7 @@ Note that the author avatar goes away if `collapseMetadata` is set.
  • void; referencedMessageNotFound: boolean; }; @@ -556,13 +557,7 @@ export class Message extends React.Component { } public renderQuote() { - const { - conversationType, - conversationColor, - direction, - i18n, - quote, - } = this.props; + const { conversationType, direction, i18n, quote } = this.props; if (!quote) { return null; @@ -581,7 +576,7 @@ export class Message extends React.Component { authorPhoneNumber={quote.authorPhoneNumber} authorProfileName={quote.authorProfileName} authorName={quote.authorName} - conversationColor={conversationColor} + authorColor={quote.authorColor} referencedMessageNotFound={quote.referencedMessageNotFound} isFromMe={quote.isFromMe} withContentAbove={withContentAbove} @@ -644,7 +639,7 @@ export class Message extends React.Component { authorPhoneNumber, authorProfileName, collapseMetadata, - conversationColor, + authorColor, conversationType, direction, i18n, @@ -662,7 +657,7 @@ export class Message extends React.Component {
    { public render() { const { authorPhoneNumber, - conversationColor, + authorColor, direction, id, timestamp, @@ -899,8 +894,8 @@ export class Message extends React.Component { className={classNames( 'module-message__container', `module-message__container--${direction}`, - direction === 'outgoing' - ? `module-message__container--outgoing-${conversationColor}` + direction === 'incoming' + ? `module-message__container--incoming-${authorColor}` : null )} > diff --git a/ts/components/conversation/MessageDetail.md b/ts/components/conversation/MessageDetail.md index c14c72817..b88034de7 100644 --- a/ts/components/conversation/MessageDetail.md +++ b/ts/components/conversation/MessageDetail.md @@ -6,7 +6,7 @@ disableMenu: true, direction: 'incoming', timestamp: Date.now(), - conversationColor: 'pink', + authorColor: 'pink', text: 'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.', onDelete: () => console.log('onDelete'), @@ -31,7 +31,7 @@ disableMenu: true, direction: 'outgoing', timestamp: Date.now(), - conversationColor: 'pink', + authorColor: 'pink', text: 'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.', status: 'read', @@ -68,7 +68,7 @@ disableMenu: true, direction: 'outgoing', timestamp: Date.now(), - conversationColor: 'pink', + authorColor: 'pink', text: 'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.', status: 'sending', @@ -94,7 +94,7 @@ disableMenu: true, direction: 'outgoing', timestamp: Date.now(), - conversationColor: 'pink', + authorColor: 'pink', text: 'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.', status: 'error', diff --git a/ts/components/conversation/Quote.md b/ts/components/conversation/Quote.md index a5cc2cd23..ad65338bf 100644 --- a/ts/components/conversation/Quote.md +++ b/ts/components/conversation/Quote.md @@ -3,15 +3,16 @@ #### Plain text ```jsx - +
  • console.log('onClick'), @@ -23,10 +24,11 @@ direction="outgoing" timestamp={Date.now()} status="sending" - conversationColor="green" + authorColor="green" text="About six" i18n={util.i18n} quote={{ + authorColor: 'purple', text: 'How many ferrets do you have?', authorPhoneNumber: '(202) 555-0011', onClick: () => console.log('onClick'), @@ -39,15 +41,16 @@ #### Name variations ```jsx - +
  • +
  • +
  • +
  • ``` -#### Referenced message not found +#### All colors ```jsx - +
  • console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
  • + console.log('onClick'), + }} + /> +
  • +
    +``` + +#### Referenced message not found + +```jsx + +
  • + +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
    +
    +
    +
    +
    +
    +
    +
    { public render() { const { - conversationColor, + authorColor, isIncoming, onClick, referencedMessageNotFound, @@ -343,8 +343,8 @@ export class Quote extends React.Component { 'module-quote', isIncoming ? 'module-quote--incoming' : 'module-quote--outgoing', isIncoming - ? `module-quote--incoming-${conversationColor}` - : `module-quote--outgoing-${conversationColor}`, + ? `module-quote--incoming-${authorColor}` + : `module-quote--outgoing-${authorColor}`, !onClick ? 'module-quote--no-click' : null, withContentAbove ? 'module-quote--with-content-above' : null, referencedMessageNotFound diff --git a/ts/components/conversation/Timestamp.md b/ts/components/conversation/Timestamp.md index 2d94b0d9e..94b817831 100644 --- a/ts/components/conversation/Timestamp.md +++ b/ts/components/conversation/Timestamp.md @@ -18,12 +18,12 @@ function getDecember1159() { return getJanuary1201() - 2 * 60 * 1000; } - +
  • { public render() { - const { theme, type } = this.props; + const { ios, theme, type } = this.props; return ( -
    +
      {this.props.children}
    diff --git a/ts/styleguide/StyleGuideUtil.ts b/ts/styleguide/StyleGuideUtil.ts index a7679c0aa..96c71e02a 100644 --- a/ts/styleguide/StyleGuideUtil.ts +++ b/ts/styleguide/StyleGuideUtil.ts @@ -83,6 +83,7 @@ export { const query = window.location.search.replace(/^\?/, ''); const urlOptions = QueryString.parse(query); const theme = urlOptions.theme || 'light-theme'; +const ios = urlOptions.ios || false; const locale = urlOptions.locale || 'en'; // @ts-ignore @@ -92,7 +93,7 @@ import localeMessages from '../../_locales/en/messages.json'; import { setup } from '../../js/modules/i18n'; const i18n = setup(locale, localeMessages); -export { theme, locale, i18n }; +export { theme, ios, locale, i18n }; // Telling Lodash to relinquish _ for use by underscore // @ts-ignore