Visual changes to let the user easily know what release channel they are using
Summary: 1. Added a text label similar to the launch screen that tells user the release channel they are using. 2. Show a different coloured logo when the user is using the "Insiders" channel. I have tried to keep the style as similar to the launch screen as possible for consistency. Reviewed By: passy Differential Revision: D32169268 fbshipit-source-id: f119a379fce983d9df765ede94148a4deaa31c9c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9d41c3c44c
commit
2f471cc2b2
@@ -21,8 +21,10 @@ import {Layout, theme, Tracked, TrackingScope} from 'flipper-plugin';
|
|||||||
const {Text, Title} = Typography;
|
const {Text, Title} = Typography;
|
||||||
|
|
||||||
import constants from '../fb-stubs/constants';
|
import constants from '../fb-stubs/constants';
|
||||||
|
import config from '../fb-stubs/config';
|
||||||
import isProduction from '../utils/isProduction';
|
import isProduction from '../utils/isProduction';
|
||||||
import {getAppVersion} from '../utils/info';
|
import {getAppVersion} from '../utils/info';
|
||||||
|
import ReleaseChannel from '../ReleaseChannel';
|
||||||
import {getFlipperLib} from 'flipper-plugin';
|
import {getFlipperLib} from 'flipper-plugin';
|
||||||
|
|
||||||
const RowContainer = styled(FlexRow)({
|
const RowContainer = styled(FlexRow)({
|
||||||
@@ -136,14 +138,41 @@ export function WelcomeScreenStaticView() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function WelcomeScreenContent() {
|
function WelcomeScreenContent() {
|
||||||
|
function isInsidersChannel() {
|
||||||
|
return config.getReleaseChannel() === ReleaseChannel.INSIDERS;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TrackingScope scope="welcomescreen">
|
<TrackingScope scope="welcomescreen">
|
||||||
<Space
|
<Space
|
||||||
direction="vertical"
|
direction="vertical"
|
||||||
size="middle"
|
size="middle"
|
||||||
style={{width: '100%', padding: '0 32px 32px', alignItems: 'center'}}>
|
style={{width: '100%', padding: '0 32px 32px', alignItems: 'center'}}>
|
||||||
<Image width={125} height={125} src="./icon.png" preview={false} />
|
<Image
|
||||||
|
style={{
|
||||||
|
filter: isInsidersChannel() ? 'hue-rotate(230deg)' : 'none',
|
||||||
|
}}
|
||||||
|
width={125}
|
||||||
|
height={125}
|
||||||
|
src="./icon.png"
|
||||||
|
preview={false}
|
||||||
|
/>
|
||||||
<Title level={1}>Welcome to Flipper</Title>
|
<Title level={1}>Welcome to Flipper</Title>
|
||||||
|
<Text>
|
||||||
|
Using release channel{' '}
|
||||||
|
<code
|
||||||
|
style={{
|
||||||
|
margin: 0,
|
||||||
|
padding: 0,
|
||||||
|
border: 'none',
|
||||||
|
background: 'none',
|
||||||
|
color: isInsidersChannel() ? 'rgb(62, 124, 66)' : '#000',
|
||||||
|
textTransform: 'capitalize',
|
||||||
|
fontWeight: isInsidersChannel() ? 'bold' : 'normal',
|
||||||
|
}}>
|
||||||
|
{config.getReleaseChannel()}
|
||||||
|
</code>
|
||||||
|
</Text>
|
||||||
<Text style={{color: theme.textColorPlaceholder}}>
|
<Text style={{color: theme.textColorPlaceholder}}>
|
||||||
{isProduction() ? `Version ${getAppVersion()}` : 'Development Mode'}
|
{isProduction() ? `Version ${getAppVersion()}` : 'Development Mode'}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user