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`
46
46
}
47
47
` ;
48
48
49
+ const Footer = styled . p `
50
+ font-size: 85%;
51
+ font-style: italic;
52
+ ` ;
49
53
50
54
@inject ( 'proxyStore' )
51
55
@inject ( 'rulesStore' )
@@ -81,12 +85,35 @@ class AndroidAdbConfig extends React.Component<{
81
85
82
86
render ( ) {
83
87
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
+ </ > }
90
117
91
118
< InterceptionTargetList
92
119
spinnerText = 'Waiting for Android devices to intercept...'
@@ -110,6 +137,12 @@ class AndroidAdbConfig extends React.Component<{
110
137
interceptTarget = { this . interceptDevice }
111
138
ellipseDirection = 'right'
112
139
/>
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 >
113
146
</ ConfigContainer > ;
114
147
}
115
148
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ import { Button } from '../../common/inputs';
9
9
10
10
const SpinnerBlock = styled . div `
11
11
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;
12
19
` ;
13
20
14
21
const Spinner = styled ( Icon ) . attrs ( ( ) => ( {
@@ -24,6 +31,8 @@ const ListScrollContainer = styled.div`
24
31
max-height: 279px;
25
32
overflow-y: auto;
26
33
margin: 10px -15px;
34
+ flex-grow: 1;
35
+ flex-shrink: 1;
27
36
` ;
28
37
29
38
const TargetList = styled . ul `
You can’t perform that action at this time.
0 commit comments