diff --git a/desktop/app/src/chrome/JSEmulatorLauncherSheet.tsx b/desktop/app/src/chrome/JSEmulatorLauncherSheet.tsx index 4f646e949..a24b562d8 100644 --- a/desktop/app/src/chrome/JSEmulatorLauncherSheet.tsx +++ b/desktop/app/src/chrome/JSEmulatorLauncherSheet.tsx @@ -23,6 +23,8 @@ import {State as Store} from '../reducers'; import {launchJsEmulator} from '../utils/js-client-server-utils/serverUtils'; import {updateSettings, Action} from '../reducers/settings'; import {Settings} from '../reducers/settings'; +import {Collapse, Form, Input as AntInput} from 'antd'; +import {Html5Outlined} from '@ant-design/icons'; const Container = styled(FlexColumn)({ padding: 20, @@ -48,6 +50,7 @@ const TitleInput = styled(Input)({ type OwnProps = { onHide: () => void; + useSandy?: boolean; }; type StateFromProps = { @@ -93,7 +96,24 @@ class JSEmulatorLauncherSheet extends Component { render() { const {url, height, width} = this.state; - return ( + return this.props.useSandy ? ( +
+ + + + + + + + + + + + +
+ ) : ( Launch Web App @@ -118,9 +138,24 @@ class JSEmulatorLauncherSheet extends Component { } } -export default connect( +const Launcher = connect( ({settingsState}) => ({ settings: settingsState, }), {updateSettings}, )(JSEmulatorLauncherSheet); + +export default Launcher; + +export function JSEmulatorLauncherSheetSandy({onClose}: {onClose(): void}) { + return ( + + } + header="Launch JS Web App" + key="launch-js-web-app"> + + + + ); +} diff --git a/desktop/app/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/app/src/sandy-chrome/appinspect/LaunchEmulator.tsx index c21ab7479..3f4b70ba8 100644 --- a/desktop/app/src/sandy-chrome/appinspect/LaunchEmulator.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/LaunchEmulator.tsx @@ -20,6 +20,8 @@ import { getSimulators, IOSDeviceParams, } from '../../dispatcher/iOSDevice'; +import GK from '../../fb-stubs/GK'; +import {JSEmulatorLauncherSheetSandy} from '../../chrome/JSEmulatorLauncherSheet'; export function showEmulatorLauncher(store: Store) { renderReactRoot((unmount) => ( @@ -94,6 +96,15 @@ export const LaunchEmulatorDialog = withTrackingScope( )), ]; + // Launch JS emulator + if (GK.get('flipper_js_client_emulator')) { + items.push( + , + ); + } return (