Make sure Lite app uses FB branding

Summary: Fixes https://fb.workplace.com/groups/flippersupport/permalink/1038883216592336/

Reviewed By: passy

Differential Revision: D25557366

fbshipit-source-id: 7b821ad7cd52454294482a00c5dc59c57b85f757
This commit is contained in:
Michel Weststrate
2020-12-15 08:21:10 -08:00
committed by Facebook GitHub Bot
parent d08aa5d33e
commit 658b3e8a91
2 changed files with 5 additions and 3 deletions

View File

@@ -138,20 +138,20 @@ const AppInspectButton = styled(Button)({
}); });
function AppIcon({appname}: {appname?: string}) { function AppIcon({appname}: {appname?: string}) {
const invert = appname?.endsWith('Lite') ?? false;
const brandName = appname?.replace(/ Lite$/, ''); const brandName = appname?.replace(/ Lite$/, '');
const color = brandName const color = brandName
? getColorByApp(brandName) ? getColorByApp(brandName)
: theme.backgroundTransparentHover; : theme.backgroundTransparentHover;
const icon = brandName && (brandIcons as any)[brandName]; const icon = brandName && (brandIcons as any)[brandName];
return ( return (
<AppIconContainer <AppIconContainer style={{background: invert ? 'white' : color}}>
style={{background: brandName != appname ? 'white' : color}}>
{icon && ( {icon && (
<Glyph <Glyph
name={icon} name={icon}
size={24} size={24}
variant="outline" variant="outline"
color={brandName != appname ? color : 'white'} color={invert ? color : 'white'}
/> />
)} )}
</AppIconContainer> </AppIconContainer>

View File

@@ -278,6 +278,7 @@ export const darkColors = {
export const brandColors = { export const brandColors = {
Facebook: '#0D7BED', Facebook: '#0D7BED',
Lite: '#0D7BED',
Messenger: '#0088FA', Messenger: '#0088FA',
Instagram: '#E61E68', Instagram: '#E61E68',
WhatsApp: '#25D366', WhatsApp: '#25D366',
@@ -289,6 +290,7 @@ export const brandColors = {
// https://www.internalfb.com/intern/assets/set/facebook_icons/ // https://www.internalfb.com/intern/assets/set/facebook_icons/
export const brandIcons = { export const brandIcons = {
Facebook: 'app-facebook-f', Facebook: 'app-facebook-f',
Lite: 'app-facebook-f',
Messenger: 'app-messenger', Messenger: 'app-messenger',
Instagram: 'app-instagram', Instagram: 'app-instagram',
WhatsApp: 'app-whatsapp', WhatsApp: 'app-whatsapp',