Skip to content

Commit a042633

Browse files
authored
Minor UI Updates (rjwats#93)
* simplify props set to constant true * reduce icon size in users table for better small screen compatibility * use lib_compat_mode property over library exclusion * get travis to build esp32 environment in addition to esp8266 during CI build
1 parent 245a713 commit a042633

11 files changed

+21
-20
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ install:
1616
- platformio update
1717

1818
script:
19-
- platformio run
19+
- platformio run -e esp12e -e node32s

interface/src/ap/AccessPoint.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class AccessPoint extends Component<AccessPointProps> {
2626
<Tab value="/ap/settings" label="Access Point Settings" disabled={!authenticatedContext.me.admin} />
2727
</Tabs>
2828
<Switch>
29-
<AuthenticatedRoute exact={true} path="/ap/status" component={APStatusController} />
30-
<AuthenticatedRoute exact={true} path="/ap/settings" component={APSettingsController} />
29+
<AuthenticatedRoute exact path="/ap/status" component={APStatusController} />
30+
<AuthenticatedRoute exact path="/ap/settings" component={APSettingsController} />
3131
<Redirect to="/ap/status" />
3232
</Switch>
3333
</MenuAppBar>

interface/src/ntp/NTPSettingsForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class NTPSettingsForm extends React.Component<NTPSettingsFormProps> {
6565
onChange={this.changeTimeZone}
6666
margin="normal"
6767
>
68-
<MenuItem disabled={true}>Time zone...</MenuItem>
68+
<MenuItem disabled>Time zone...</MenuItem>
6969
{timeZoneSelectItems()}
7070
</SelectValidator>
7171
<FormActions>

interface/src/ntp/NetworkTime.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class NetworkTime extends Component<NetworkTimeProps> {
2626
<Tab value="/ntp/settings" label="NTP Settings" disabled={!authenticatedContext.me.admin} />
2727
</Tabs>
2828
<Switch>
29-
<AuthenticatedRoute exact={true} path="/ntp/status" component={NTPStatusController} />
30-
<AuthenticatedRoute exact={true} path="/ntp/settings" component={NTPSettingsController} />
29+
<AuthenticatedRoute exact path="/ntp/status" component={NTPStatusController} />
30+
<AuthenticatedRoute exact path="/ntp/settings" component={NTPSettingsController} />
3131
<Redirect to="/ntp/status" />
3232
</Switch>
3333
</MenuAppBar>

interface/src/security/ManageUsersForm.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ class ManageUsersForm extends React.Component<ManageUsersFormProps, ManageUsersF
131131
}
132132
</TableCell>
133133
<TableCell align="center">
134-
<IconButton aria-label="Delete" onClick={() => this.removeUser(user)}>
134+
<IconButton size="small" aria-label="Delete" onClick={() => this.removeUser(user)}>
135135
<DeleteIcon />
136136
</IconButton>
137-
<IconButton aria-label="Edit" onClick={() => this.startEditingUser(user)}>
137+
<IconButton size="small" aria-label="Edit" onClick={() => this.startEditingUser(user)}>
138138
<EditIcon />
139139
</IconButton>
140140
</TableCell>

interface/src/security/Security.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class Security extends Component<SecurityProps> {
2525
<Tab value="/security/settings" label="Security Settings" />
2626
</Tabs>
2727
<Switch>
28-
<AuthenticatedRoute exact={true} path="/security/users" component={ManageUsersController} />
29-
<AuthenticatedRoute exact={true} path="/security/settings" component={SecuritySettingsController} />
28+
<AuthenticatedRoute exact path="/security/users" component={ManageUsersController} />
29+
<AuthenticatedRoute exact path="/security/settings" component={SecuritySettingsController} />
3030
<Redirect to="/security/users" />
3131
</Switch>
3232
</MenuAppBar>

interface/src/security/UserForm.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class UserForm extends React.Component<UserFormProps> {
3333
const { user, creating, handleValueChange, handleCheckboxChange, onDoneEditing, onCancelEditing } = this.props;
3434
return (
3535
<ValidatorForm onSubmit={onDoneEditing} ref={this.formRef}>
36-
<Dialog onClose={onCancelEditing} aria-labelledby="user-form-dialog-title" open={true}>
36+
<Dialog onClose={onCancelEditing} aria-labelledby="user-form-dialog-title" open>
3737
<DialogTitle id="user-form-dialog-title">{creating ? 'Add' : 'Modify'} User</DialogTitle>
38-
<DialogContent dividers={true}>
38+
<DialogContent dividers>
3939
<TextValidator
4040
validators={creating ? ['required', 'uniqueUsername', 'matchRegexp:^[a-zA-Z0-9_\\.]{1,24}$'] : []}
4141
errorMessages={creating ? ['Username is required', "Username already exists", "Must be 1-24 characters: alpha numeric, '_' or '.'"] : []}

interface/src/system/System.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class System extends Component<SystemProps> {
2626
<Tab value="/system/ota" label="OTA Settings" disabled={!authenticatedContext.me.admin} />
2727
</Tabs>
2828
<Switch>
29-
<AuthenticatedRoute exact={true} path="/system/status" component={SystemStatusController} />
30-
<AuthenticatedRoute exact={true} path="/system/ota" component={OTASettingsController} />
29+
<AuthenticatedRoute exact path="/system/status" component={SystemStatusController} />
30+
<AuthenticatedRoute exact path="/system/ota" component={OTASettingsController} />
3131
<Redirect to="/system/status" />
3232
</Switch>
3333
</MenuAppBar>

interface/src/system/SystemStatusForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class SystemStatusForm extends Component<SystemStatusFormProps, SystemStatusForm
9191
onClose={this.onRestartRejected}
9292
>
9393
<DialogTitle>Confirm Restart</DialogTitle>
94-
<DialogContent dividers={true}>
94+
<DialogContent dividers>
9595
Are you sure you want to restart the device?
9696
</DialogContent>
9797
<DialogActions>

interface/src/wifi/WiFiConnection.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class WiFiConnection extends Component<WiFiConnectionProps, WiFiConnectionContex
4848
<Tab value="/wifi/settings" label="WiFi Settings" disabled={!authenticatedContext.me.admin} />
4949
</Tabs>
5050
<Switch>
51-
<AuthenticatedRoute exact={true} path="/wifi/status" component={WiFiStatusController} />
52-
<AuthenticatedRoute exact={true} path="/wifi/scan" component={WiFiNetworkScanner} />
53-
<AuthenticatedRoute exact={true} path="/wifi/settings" component={WiFiSettingsController} />
51+
<AuthenticatedRoute exact path="/wifi/status" component={WiFiStatusController} />
52+
<AuthenticatedRoute exact path="/wifi/scan" component={WiFiNetworkScanner} />
53+
<AuthenticatedRoute exact path="/wifi/settings" component={WiFiSettingsController} />
5454
<Redirect to="/wifi/status" />
5555
</Switch>
5656
</MenuAppBar>

platformio.ini

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ build_flags=
1111
; Uncomment PROGMEM_WWW to enable the storage of the WWW data in PROGMEM
1212
;-D PROGMEM_WWW
1313

14+
; ensure transitive dependencies are included for correct platforms only
15+
lib_compat_mode = strict
16+
1417
; Uncomment & modify the lines below in order to configure OTA updates
1518
;upload_flags =
1619
; --port=8266
@@ -31,10 +34,8 @@ lib_deps =
3134
platform = espressif8266
3235
board = esp12e
3336
board_build.f_cpu = 160000000L
34-
lib_ignore = AsyncTCP
3537

3638
[env:node32s]
3739
;board_build.partitions = min_spiffs.csv
3840
platform = espressif32
3941
board = node32s
40-
lib_ignore = ESPAsyncTCP

0 commit comments

Comments
 (0)