diff --git a/desktop/app/src/sandy-chrome/LeftRail.tsx b/desktop/app/src/sandy-chrome/LeftRail.tsx index bf0606dfa..34d90d4c9 100644 --- a/desktop/app/src/sandy-chrome/LeftRail.tsx +++ b/desktop/app/src/sandy-chrome/LeftRail.tsx @@ -19,6 +19,7 @@ import { SettingOutlined, QuestionCircleOutlined, MedicineBoxOutlined, + RocketOutlined, } from '@ant-design/icons'; import {SidebarLeft, SidebarRight} from './SandyIcons'; import {useDispatch, useStore} from '../utils/useStore'; @@ -37,6 +38,8 @@ import {useValue} from 'flipper-plugin'; import {logout} from '../reducers/user'; import config from '../fb-stubs/config'; import styled from '@emotion/styled'; +import {showEmulatorLauncher} from './appinspect/LaunchEmulator'; +import {useStore as useReduxStore} from 'react-redux'; const LeftRailButtonElem = styled(Button)<{kind?: 'small'}>(({kind}) => ({ width: kind === 'small' ? 32 : 36, @@ -128,6 +131,7 @@ export function LeftRail({ /> + @@ -223,6 +227,21 @@ function DebugLogsButton({ ); } +function LaunchEmulatorButton() { + const store = useReduxStore(); + + return ( + } + title="Start Emulator / Simulator" + onClick={() => { + showEmulatorLauncher(store); + }} + small + /> + ); +} + function SetupDoctorButton() { const [visible, setVisible] = useState(false); const result = useStore( diff --git a/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx b/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx index f1c5f633a..ac01dec99 100644 --- a/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx @@ -8,13 +8,11 @@ */ import React from 'react'; -import {Alert, Button, Input} from 'antd'; +import {Alert, Input} from 'antd'; import {LeftSidebar, SidebarTitle, InfoIcon} from '../LeftSidebar'; -import {SettingOutlined, RocketOutlined} from '@ant-design/icons'; +import {SettingOutlined} from '@ant-design/icons'; import {Layout, Link, styled} from '../../ui'; import {theme} from 'flipper-plugin'; -import {useStore as useReduxStore} from 'react-redux'; -import {showEmulatorLauncher} from './LaunchEmulator'; import {AppSelector} from './AppSelector'; import {useStore} from '../../utils/useStore'; import {PluginList} from './PluginList'; @@ -33,8 +31,8 @@ const appTooltip = ( ); export function AppInspect() { - const store = useReduxStore(); const selectedDevice = useStore((state) => state.connections.selectedDevice); + const isArchived = !!selectedDevice?.isArchived; return ( @@ -45,26 +43,27 @@ export function AppInspect() { - } defaultValue="mysite" /> - -