Support ultramarine convo colors from Android linked devices

This commit is contained in:
Josh Perez 2020-04-15 17:39:48 -04:00 committed by GitHub
parent 14b11041ea
commit d88c21e5b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 3 deletions

View file

@ -51,6 +51,7 @@
'green', 'green',
'light_green', 'light_green',
'blue_grey', 'blue_grey',
'ultramarine',
]; ];
Whisper.Conversation = Backbone.Model.extend({ Whisper.Conversation = Backbone.Model.extend({

View file

@ -54,5 +54,6 @@
light_green: '#1c8260', light_green: '#1c8260',
blue_grey: '#895d66', blue_grey: '#895d66',
grey: '#6b6b78', grey: '#6b6b78',
ultramarine: '#2c6bed',
}; };
})(); })();

View file

@ -100,6 +100,7 @@ $color-conversation-green: $color-forest;
$color-conversation-light_green: $color-wintergreen; $color-conversation-light_green: $color-wintergreen;
$color-conversation-blue_grey: $color-taupe; $color-conversation-blue_grey: $color-taupe;
$color-conversation-grey: $color-steel; $color-conversation-grey: $color-steel;
$color-conversation-ultramarine: $ultramarine-ui-light;
$color-conversation-red-tint: $color-crimson-tint; $color-conversation-red-tint: $color-crimson-tint;
$color-conversation-deep_orange-tint: $color-vermilion-tint; $color-conversation-deep_orange-tint: $color-vermilion-tint;
@ -113,6 +114,7 @@ $color-conversation-green-tint: $color-forest-tint;
$color-conversation-light_green-tint: $color-wintergreen-tint; $color-conversation-light_green-tint: $color-wintergreen-tint;
$color-conversation-blue_grey-tint: $color-taupe-tint; $color-conversation-blue_grey-tint: $color-taupe-tint;
$color-conversation-grey-tint: $color-steel-tint; $color-conversation-grey-tint: $color-steel-tint;
$color-conversation-ultramarine-tint: $color-ios-blue-tint;
$color-conversation-red-shade: $color-crimson-shade; $color-conversation-red-shade: $color-crimson-shade;
$color-conversation-deep_orange-shade: $color-vermilion-shade; $color-conversation-deep_orange-shade: $color-vermilion-shade;
@ -126,6 +128,7 @@ $color-conversation-green-shade: $color-forest-shade;
$color-conversation-light_green-shade: $color-wintergreen-shade; $color-conversation-light_green-shade: $color-wintergreen-shade;
$color-conversation-blue_grey-shade: $color-taupe-shade; $color-conversation-blue_grey-shade: $color-taupe-shade;
$color-conversation-grey-shade: $color-steel-shade; $color-conversation-grey-shade: $color-steel-shade;
$color-conversation-ultramarine-shade: $ultramarine-brand-dark;
// Maps for easy manipulation // Maps for easy manipulation
@ -141,6 +144,7 @@ $conversation-colors: (
'green': $color-conversation-green, 'green': $color-conversation-green,
'light_green': $color-conversation-light_green, 'light_green': $color-conversation-light_green,
'blue_grey': $color-conversation-blue_grey, 'blue_grey': $color-conversation-blue_grey,
'ultramarine': $color-conversation-ultramarine,
); );
$conversation-colors-tint: ( $conversation-colors-tint: (
'red': $color-conversation-red-tint, 'red': $color-conversation-red-tint,
@ -154,6 +158,7 @@ $conversation-colors-tint: (
'green': $color-conversation-green-tint, 'green': $color-conversation-green-tint,
'light_green': $color-conversation-light_green-tint, 'light_green': $color-conversation-light_green-tint,
'blue_grey': $color-conversation-blue_grey-tint, 'blue_grey': $color-conversation-blue_grey-tint,
'ultramarine': $color-conversation-ultramarine-tint,
); );
$conversation-colors-shade: ( $conversation-colors-shade: (
'red': $color-conversation-red-shade, 'red': $color-conversation-red-shade,
@ -167,6 +172,7 @@ $conversation-colors-shade: (
'green': $color-conversation-green-shade, 'green': $color-conversation-green-shade,
'light_green': $color-conversation-light_green-shade, 'light_green': $color-conversation-light_green-shade,
'blue_grey': $color-conversation-blue_grey-shade, 'blue_grey': $color-conversation-blue_grey-shade,
'ultramarine': $color-conversation-ultramarine-shade,
); );
// -- Non-V3 colors // -- Non-V3 colors

View file

@ -15,4 +15,5 @@ export type ColorType =
| 'pink' | 'pink'
| 'purple' | 'purple'
| 'red' | 'red'
| 'teal'; | 'teal'
| 'ultramarine';

View file

@ -19,7 +19,8 @@ type OldColor =
| 'purple' | 'purple'
| 'red' | 'red'
| 'teal' | 'teal'
| 'yellow'; | 'yellow'
| 'ultramarine';
type NewColor = type NewColor =
| 'red' | 'red'
@ -33,7 +34,8 @@ type NewColor =
| 'green' | 'green'
| 'light_green' | 'light_green'
| 'blue_grey' | 'blue_grey'
| 'grey'; | 'grey'
| 'ultramarine';
export function migrateColor(color: OldColor): NewColor { export function migrateColor(color: OldColor): NewColor {
switch (color) { switch (color) {
@ -70,6 +72,7 @@ export function migrateColor(color: OldColor): NewColor {
case 'light_green': case 'light_green':
case 'blue_grey': case 'blue_grey':
case 'grey': case 'grey':
case 'ultramarine':
return color; return color;
// Can uncomment this to ensure that we've covered all potential cases // Can uncomment this to ensure that we've covered all potential cases