app inspect button
Reviewed By: elboman Differential Revision: D47438914 fbshipit-source-id: 297fba476e348dee89fa723db5303f0342b331c2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1463620c28
commit
af73e5a2b4
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import React, {cloneElement, useState, useCallback} from 'react';
|
import React, {cloneElement, useState, useCallback} from 'react';
|
||||||
import {Button, Divider, Badge, Tooltip, Menu, Modal} from 'antd';
|
import {Button, Divider, Badge, Tooltip, Menu, Modal} from 'antd';
|
||||||
import {MobileFilled, SettingOutlined, BugOutlined} from '@ant-design/icons';
|
import {SettingOutlined, BugOutlined} from '@ant-design/icons';
|
||||||
import {useStore} from '../utils/useStore';
|
import {useStore} from '../utils/useStore';
|
||||||
import {
|
import {
|
||||||
theme,
|
theme,
|
||||||
@@ -20,7 +20,6 @@ import {
|
|||||||
} from 'flipper-plugin';
|
} from 'flipper-plugin';
|
||||||
import SettingsSheet from '../chrome/SettingsSheet';
|
import SettingsSheet from '../chrome/SettingsSheet';
|
||||||
import WelcomeScreen from './WelcomeScreen';
|
import WelcomeScreen from './WelcomeScreen';
|
||||||
import {ToplevelProps} from './SandyApp';
|
|
||||||
import config from '../fb-stubs/config';
|
import config from '../fb-stubs/config';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import {setStaticView} from '../reducers/connections';
|
import {setStaticView} from '../reducers/connections';
|
||||||
@@ -119,10 +118,7 @@ const LeftRailDivider = styled(Divider)({
|
|||||||
});
|
});
|
||||||
LeftRailDivider.displayName = 'LeftRailDividier';
|
LeftRailDivider.displayName = 'LeftRailDividier';
|
||||||
|
|
||||||
export const LeftRail = withTrackingScope(function LeftRail({
|
export const LeftRail = withTrackingScope(function LeftRail() {
|
||||||
toplevelSelection,
|
|
||||||
setToplevelSelection,
|
|
||||||
}: ToplevelProps) {
|
|
||||||
return (
|
return (
|
||||||
<Layout.Container
|
<Layout.Container
|
||||||
borderRight
|
borderRight
|
||||||
@@ -130,25 +126,12 @@ export const LeftRail = withTrackingScope(function LeftRail({
|
|||||||
padv={12}
|
padv={12}
|
||||||
width={48}
|
width={48}
|
||||||
style={{background: theme.backgroundDefault}}>
|
style={{background: theme.backgroundDefault}}>
|
||||||
<Layout.Bottom style={{overflow: 'visible'}}>
|
|
||||||
<Layout.Container center gap={10} padh={6}>
|
|
||||||
<LeftRailButton
|
|
||||||
icon={<MobileFilled />}
|
|
||||||
title="App Inspect"
|
|
||||||
selected={toplevelSelection === 'appinspect'}
|
|
||||||
onClick={() => {
|
|
||||||
setToplevelSelection('appinspect');
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<LeftRailDivider />
|
|
||||||
</Layout.Container>
|
|
||||||
<Layout.Container center gap={10} padh={6}>
|
<Layout.Container center gap={10} padh={6}>
|
||||||
<UpdateIndicator />
|
<UpdateIndicator />
|
||||||
<SandyRatingButton />
|
<SandyRatingButton />
|
||||||
<ExportEverythingEverywhereAllAtOnceButton />
|
<ExportEverythingEverywhereAllAtOnceButton />
|
||||||
<ExtrasMenu />
|
<ExtrasMenu />
|
||||||
</Layout.Container>
|
</Layout.Container>
|
||||||
</Layout.Bottom>
|
|
||||||
</Layout.Container>
|
</Layout.Container>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import {
|
|||||||
LayoutOutlined,
|
LayoutOutlined,
|
||||||
LoginOutlined,
|
LoginOutlined,
|
||||||
MedicineBoxOutlined,
|
MedicineBoxOutlined,
|
||||||
|
MobileOutlined,
|
||||||
QuestionCircleOutlined,
|
QuestionCircleOutlined,
|
||||||
RocketOutlined,
|
RocketOutlined,
|
||||||
VideoCameraOutlined,
|
VideoCameraOutlined,
|
||||||
@@ -70,6 +71,15 @@ export const Navbar = withTrackingScope(function Navbar({
|
|||||||
}}>
|
}}>
|
||||||
<Layout.Horizontal style={{gap: 4}}>
|
<Layout.Horizontal style={{gap: 4}}>
|
||||||
<LeftSidebarToggleButton />
|
<LeftSidebarToggleButton />
|
||||||
|
<NavbarButton
|
||||||
|
icon={MobileOutlined}
|
||||||
|
label="App Inspect"
|
||||||
|
toggled={toplevelSelection === 'appinspect'}
|
||||||
|
onClick={() => {
|
||||||
|
setToplevelSelection('appinspect');
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
<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} />
|
||||||
|
|||||||
@@ -175,10 +175,7 @@ export function SandyApp() {
|
|||||||
/>
|
/>
|
||||||
<Layout.Left>
|
<Layout.Left>
|
||||||
<Layout.Horizontal>
|
<Layout.Horizontal>
|
||||||
<LeftRail
|
<LeftRail />
|
||||||
toplevelSelection={toplevelSelection}
|
|
||||||
setToplevelSelection={setToplevelSelection}
|
|
||||||
/>
|
|
||||||
<_Sidebar width={250} minWidth={220} maxWidth={800} gutter>
|
<_Sidebar width={250} minWidth={220} maxWidth={800} gutter>
|
||||||
{leftMenuContent && (
|
{leftMenuContent && (
|
||||||
<TrackingScope scope={toplevelSelection!}>
|
<TrackingScope scope={toplevelSelection!}>
|
||||||
|
|||||||
Reference in New Issue
Block a user