File tree Expand file tree Collapse file tree 2 files changed +48
-6
lines changed
src/components/intercept/config Expand file tree Collapse file tree 2 files changed +48
-6
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ const ConfigContainer = styled.div`
4646 }
4747` ;
4848
49+ const Footer = styled . p `
50+ font-size: 85%;
51+ font-style: italic;
52+ ` ;
4953
5054@inject ( 'proxyStore' )
5155@inject ( 'rulesStore' )
@@ -81,12 +85,35 @@ class AndroidAdbConfig extends React.Component<{
8185
8286 render ( ) {
8387 return < ConfigContainer >
84- < p >
85- There are multiple ADB devices connected.
86- </ p >
87- < p >
88- Pick which device you'd like to intercept:
89- </ p >
88+ { this . deviceIds . length > 1
89+ ? < >
90+ < p >
91+ There are multiple ADB devices connected.
92+ </ p >
93+ < p >
94+ Pick which device you'd like to intercept:
95+ </ p >
96+ </ >
97+ : this . deviceIds . length === 1
98+ // Should only happen if a device disappears after UI opens, due to
99+ // componentDidMount auto-setup for the single-device case.
100+ ? < >
101+ < p >
102+ There is one ADB device connected.
103+ </ p >
104+ < p >
105+ Select the device below to begin setup:
106+ </ p >
107+ </ >
108+ // No devices connected:
109+ : < >
110+ < p >
111+ There are no ADB devices connected.
112+ </ p >
113+ < p >
114+ Connect an Android device to ADB to begin setup.
115+ </ p >
116+ </ > }
90117
91118 < InterceptionTargetList
92119 spinnerText = 'Waiting for Android devices to intercept...'
@@ -110,6 +137,12 @@ class AndroidAdbConfig extends React.Component<{
110137 interceptTarget = { this . interceptDevice }
111138 ellipseDirection = 'right'
112139 />
140+
141+ < Footer >
142+ Take a look at < a
143+ href = "https://httptoolkit.com/docs/guides/android/"
144+ > the Android docs</ a > for a detailed setup guide.
145+ </ Footer >
113146 </ ConfigContainer > ;
114147 }
115148
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ import { Button } from '../../common/inputs';
99
1010const SpinnerBlock = styled . div `
1111 text-align: center;
12+ flex-grow: 1;
13+ flex-shrink: 1;
14+
15+ display: flex;
16+ flex-direction: column;
17+ justify-content: center;
18+ align-items: center;
1219` ;
1320
1421const Spinner = styled ( Icon ) . attrs ( ( ) => ( {
@@ -24,6 +31,8 @@ const ListScrollContainer = styled.div`
2431 max-height: 279px;
2532 overflow-y: auto;
2633 margin: 10px -15px;
34+ flex-grow: 1;
35+ flex-shrink: 1;
2736` ;
2837
2938const TargetList = styled . ul `
You can’t perform that action at this time.
0 commit comments