start emulator button
Reviewed By: elboman Differential Revision: D47400275 fbshipit-source-id: 38a0090283e8fc7207b643411246b15a3659616d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a7d3c265c6
commit
5647b9a4b8
@@ -15,7 +15,6 @@ import {
|
|||||||
FileExclamationOutlined,
|
FileExclamationOutlined,
|
||||||
SettingOutlined,
|
SettingOutlined,
|
||||||
MedicineBoxOutlined,
|
MedicineBoxOutlined,
|
||||||
RocketOutlined,
|
|
||||||
BugOutlined,
|
BugOutlined,
|
||||||
ApiOutlined,
|
ApiOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
@@ -37,7 +36,6 @@ import {ToplevelProps} from './SandyApp';
|
|||||||
import {useValue} from 'flipper-plugin';
|
import {useValue} from 'flipper-plugin';
|
||||||
import config from '../fb-stubs/config';
|
import config from '../fb-stubs/config';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {showEmulatorLauncher} from './appinspect/LaunchEmulator';
|
|
||||||
import {setStaticView} from '../reducers/connections';
|
import {setStaticView} from '../reducers/connections';
|
||||||
import {SandyRatingButton} from '../chrome/RatingButton';
|
import {SandyRatingButton} from '../chrome/RatingButton';
|
||||||
import {filterNotifications} from './notification/notificationUtils';
|
import {filterNotifications} from './notification/notificationUtils';
|
||||||
@@ -185,7 +183,6 @@ export const LeftRail = withTrackingScope(function LeftRail({
|
|||||||
)}
|
)}
|
||||||
<UpdateIndicator />
|
<UpdateIndicator />
|
||||||
<SandyRatingButton />
|
<SandyRatingButton />
|
||||||
<LaunchEmulatorButton />
|
|
||||||
<SetupDoctorButton />
|
<SetupDoctorButton />
|
||||||
<RightSidebarToggleButton />
|
<RightSidebarToggleButton />
|
||||||
<ExportEverythingEverywhereAllAtOnceButton />
|
<ExportEverythingEverywhereAllAtOnceButton />
|
||||||
@@ -532,21 +529,6 @@ function ExportEverythingEverywhereAllAtOnceButton() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function LaunchEmulatorButton() {
|
|
||||||
const store = useStore();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<LeftRailButton
|
|
||||||
icon={<RocketOutlined />}
|
|
||||||
title="Start Emulator / Simulator"
|
|
||||||
onClick={() => {
|
|
||||||
showEmulatorLauncher(store);
|
|
||||||
}}
|
|
||||||
small
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetupDoctorButton() {
|
function SetupDoctorButton() {
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const result = useStore(
|
const result = useStore(
|
||||||
|
|||||||
@@ -24,11 +24,13 @@ import {
|
|||||||
LoginOutlined,
|
LoginOutlined,
|
||||||
MedicineBoxOutlined,
|
MedicineBoxOutlined,
|
||||||
QuestionCircleOutlined,
|
QuestionCircleOutlined,
|
||||||
|
RocketOutlined,
|
||||||
VideoCameraOutlined,
|
VideoCameraOutlined,
|
||||||
WarningOutlined,
|
WarningOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import {toggleLeftSidebarVisible} from '../reducers/application';
|
import {toggleLeftSidebarVisible} from '../reducers/application';
|
||||||
import PluginManager from '../chrome/plugin-manager/PluginManager';
|
import PluginManager from '../chrome/plugin-manager/PluginManager';
|
||||||
|
import {showEmulatorLauncher} from './appinspect/LaunchEmulator';
|
||||||
|
|
||||||
export function Navbar() {
|
export function Navbar() {
|
||||||
return (
|
return (
|
||||||
@@ -47,6 +49,7 @@ export function Navbar() {
|
|||||||
<button>device picker</button>
|
<button>device picker</button>
|
||||||
<NavbarButton label="Screenshot" icon={CameraOutlined} />
|
<NavbarButton label="Screenshot" icon={CameraOutlined} />
|
||||||
<NavbarButton label="Record" icon={VideoCameraOutlined} />
|
<NavbarButton label="Record" icon={VideoCameraOutlined} />
|
||||||
|
<LaunchEmulatorButton />
|
||||||
</Layout.Horizontal>
|
</Layout.Horizontal>
|
||||||
<Layout.Horizontal style={{gap: 4, alignItems: 'center'}}>
|
<Layout.Horizontal style={{gap: 4, alignItems: 'center'}}>
|
||||||
<NavbarButton
|
<NavbarButton
|
||||||
@@ -85,6 +88,20 @@ function LeftSidebarToggleButton() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function LaunchEmulatorButton() {
|
||||||
|
const store = useStore();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<NavbarButton
|
||||||
|
icon={RocketOutlined}
|
||||||
|
label="Start [E/Si]mulator"
|
||||||
|
onClick={() => {
|
||||||
|
showEmulatorLauncher(store);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function NavbarButton({
|
function NavbarButton({
|
||||||
icon: Icon,
|
icon: Icon,
|
||||||
label,
|
label,
|
||||||
|
|||||||
Reference in New Issue
Block a user