Browse Source
Minor UI Updates (#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
master
rjwats
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with
21 additions and
20 deletions
.travis.yml
interface/src/ap/AccessPoint.tsx
interface/src/ntp/NTPSettingsForm.tsx
interface/src/ntp/NetworkTime.tsx
interface/src/security/ManageUsersForm.tsx
interface/src/security/Security.tsx
interface/src/security/UserForm.tsx
interface/src/system/System.tsx
interface/src/system/SystemStatusForm.tsx
interface/src/wifi/WiFiConnection.tsx
platformio.ini
@ -16,4 +16,4 @@ install:
- platformio update
script:
- platformio run
- platformio run -e esp12e -e node32s
@ -26,8 +26,8 @@ class AccessPoint extends Component<AccessPointProps> {
< Tab value = "/ap/settings" label = "Access Point Settings" disabled = { ! authenticatedContext . me . admin } / >
< / Tabs >
< Switch >
< AuthenticatedRoute exact = { true } path = "/ap/status" component = { APStatusController } / >
< AuthenticatedRoute exact = { true } path = "/ap/settings" component = { APSettingsController } / >
< AuthenticatedRoute exact path = "/ap/status" component = { APStatusController } / >
< AuthenticatedRoute exact path = "/ap/settings" component = { APSettingsController } / >
< Redirect to = "/ap/status" / >
< / Switch >
< / MenuAppBar >
@ -65,7 +65,7 @@ class NTPSettingsForm extends React.Component<NTPSettingsFormProps> {
onChange = { this . changeTimeZone }
margin = "normal"
>
< MenuItem disabled = { true } > Time zone . . . < / MenuItem >
< MenuItem disabled > Time zone . . . < / MenuItem >
{ timeZoneSelectItems ( ) }
< / SelectValidator >
< FormActions >
@ -26,8 +26,8 @@ class NetworkTime extends Component<NetworkTimeProps> {
< Tab value = "/ntp/settings" label = "NTP Settings" disabled = { ! authenticatedContext . me . admin } / >
< / Tabs >
< Switch >
< AuthenticatedRoute exact = { true } path = "/ntp/status" component = { NTPStatusController } / >
< AuthenticatedRoute exact = { true } path = "/ntp/settings" component = { NTPSettingsController } / >
< AuthenticatedRoute exact path = "/ntp/status" component = { NTPStatusController } / >
< AuthenticatedRoute exact path = "/ntp/settings" component = { NTPSettingsController } / >
< Redirect to = "/ntp/status" / >
< / Switch >
< / MenuAppBar >
@ -131,10 +131,10 @@ class ManageUsersForm extends React.Component<ManageUsersFormProps, ManageUsersF
}
< / TableCell >
< TableCell align = "center" >
< IconButton aria - label = "Delete" onClick = { ( ) = > this . removeUser ( user ) } >
< IconButton size = "small" aria - label = "Delete" onClick = { ( ) = > this . removeUser ( user ) } >
< DeleteIcon / >
< / IconButton >
< IconButton aria - label = "Edit" onClick = { ( ) = > this . startEditingUser ( user ) } >
< IconButton size = "small" aria - label = "Edit" onClick = { ( ) = > this . startEditingUser ( user ) } >
< EditIcon / >
< / IconButton >
< / TableCell >
@ -25,8 +25,8 @@ class Security extends Component<SecurityProps> {
< Tab value = "/security/settings" label = "Security Settings" / >
< / Tabs >
< Switch >
< AuthenticatedRoute exact = { true } path = "/security/users" component = { ManageUsersController } / >
< AuthenticatedRoute exact = { true } path = "/security/settings" component = { SecuritySettingsController } / >
< AuthenticatedRoute exact path = "/security/users" component = { ManageUsersController } / >
< AuthenticatedRoute exact path = "/security/settings" component = { SecuritySettingsController } / >
< Redirect to = "/security/users" / >
< / Switch >
< / MenuAppBar >
@ -33,9 +33,9 @@ class UserForm extends React.Component<UserFormProps> {
const { user , creating , handleValueChange , handleCheckboxChange , onDoneEditing , onCancelEditing } = this . props ;
return (
< ValidatorForm onSubmit = { onDoneEditing } ref = { this . formRef } >
< Dialog onClose = { onCancelEditing } aria - labelledby = "user-form-dialog-title" open = { true } >
< Dialog onClose = { onCancelEditing } aria - labelledby = "user-form-dialog-title" open >
< DialogTitle id = "user-form-dialog-title" > { creating ? 'Add' : 'Modify' } User < / DialogTitle >
< DialogContent dividers = { true } >
< DialogContent dividers >
< TextValidator
validators = { creating ? [ 'required' , 'uniqueUsername' , 'matchRegexp:^[a-zA-Z0-9_\\.]{1,24}$' ] : [ ] }
errorMessages = { creating ? [ 'Username is required' , "Username already exists" , "Must be 1-24 characters: alpha numeric, '_' or '.'" ] : [ ] }
@ -26,8 +26,8 @@ class System extends Component<SystemProps> {
< Tab value = "/system/ota" label = "OTA Settings" disabled = { ! authenticatedContext . me . admin } / >
< / Tabs >
< Switch >
< AuthenticatedRoute exact = { true } path = "/system/status" component = { SystemStatusController } / >
< AuthenticatedRoute exact = { true } path = "/system/ota" component = { OTASettingsController } / >
< AuthenticatedRoute exact path = "/system/status" component = { SystemStatusController } / >
< AuthenticatedRoute exact path = "/system/ota" component = { OTASettingsController } / >
< Redirect to = "/system/status" / >
< / Switch >
< / MenuAppBar >
@ -91,7 +91,7 @@ class SystemStatusForm extends Component<SystemStatusFormProps, SystemStatusForm
onClose = { this . onRestartRejected }
>
< DialogTitle > Confirm Restart < / DialogTitle >
< DialogContent dividers = { true } >
< DialogContent dividers >
Are you sure you want to restart the device ?
< / DialogContent >
< DialogActions >
@ -48,9 +48,9 @@ class WiFiConnection extends Component<WiFiConnectionProps, WiFiConnectionContex
< Tab value = "/wifi/settings" label = "WiFi Settings" disabled = { ! authenticatedContext . me . admin } / >
< / Tabs >
< Switch >
< AuthenticatedRoute exact = { true } path = "/wifi/status" component = { WiFiStatusController } / >
< AuthenticatedRoute exact = { true } path = "/wifi/scan" component = { WiFiNetworkScanner } / >
< AuthenticatedRoute exact = { true } path = "/wifi/settings" component = { WiFiSettingsController } / >
< AuthenticatedRoute exact path = "/wifi/status" component = { WiFiStatusController } / >
< AuthenticatedRoute exact path = "/wifi/scan" component = { WiFiNetworkScanner } / >
< AuthenticatedRoute exact path = "/wifi/settings" component = { WiFiSettingsController } / >
< Redirect to = "/wifi/status" / >
< / Switch >
< / MenuAppBar >
@ -11,6 +11,9 @@ build_flags=
; Uncomment PROGMEM_WWW to enable the storage of the WWW data in PROGMEM
;-D PROGMEM_WWW
; ensure transitive dependencies are included for correct platforms only
lib_compat_mode = strict
; Uncomment & modify the lines below in order to configure OTA updates
;upload_flags =
; --port=8266
@ -31,10 +34,8 @@ lib_deps =
platform = espressif8266
board = esp12e
board_build.f_cpu = 160000000L
lib_ignore = AsyncTCP
[env:node32s]
;board_build.partitions = min_spiffs.csv
platform = espressif32
board = node32s
lib_ignore = ESPAsyncTCP