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" />
-
- }
- type="ghost"
- title="Start Emulator / Simulator..."
- onClick={() => {
- showEmulatorLauncher(store);
- }}
+ {isArchived ? (
+
-
-
-
+ ) : (
+ } defaultValue="mysite" />
+ )}
+ {!isArchived && (
+
+
+
+
+ )}
{selectedDevice ? (
) : (
-
+
)}
diff --git a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx
index 5e5540d60..4183b6fba 100644
--- a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx
+++ b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx
@@ -59,6 +59,7 @@ export const PluginList = memo(function PluginList() {
plugins,
connections.userStarredPlugins,
]);
+ const isArchived = !!activeDevice?.isArchived;
const handleAppPluginClick = useCallback(
(pluginId) => {
@@ -122,20 +123,22 @@ export const PluginList = memo(function PluginList() {
))}
-
- {metroPlugins.map((plugin) => (
-
- ))}
-
+ {!isArchived && (
+
+ {metroPlugins.map((plugin) => (
+
+ ))}
+
+ )}
{enabledPlugins.map((plugin) => (
}
- />
+ isArchived ? null : (
+
+ }
+ />
+ )
}
/>
))}
-
- {disabledPlugins.map((plugin) => (
- }
- />
- }
- disabled
- />
- ))}
-
-
- {unavailablePlugins.map(([plugin, reason]) => (
- {reason}}
- />
- ))}
-
+ {!isArchived && (
+
+ {disabledPlugins.map((plugin) => (
+ }
+ />
+ }
+ disabled
+ />
+ ))}
+
+ )}
+ {!isArchived && (
+
+ {unavailablePlugins.map(([plugin, reason]) => (
+ {reason}}
+ />
+ ))}
+
+ )}
@@ -231,7 +242,7 @@ const PluginEntry = memo(function PluginEntry({
active?: boolean;
tooltip: string;
onClick?: (id: string) => void;
- actions?: React.ReactElement;
+ actions?: React.ReactElement | null;
}) {
const [hovering, setHovering] = useState(false);