mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 05:09:58 -05:00
Showing loader when saving settings. Adding HelpPopup when hotspot and power-save are disabled.
This commit is contained in:
parent
c681c500e8
commit
25e638ed10
2 changed files with 62 additions and 42 deletions
|
|
@ -3,7 +3,7 @@ import {
|
|||
Button,
|
||||
Checkbox,
|
||||
Confirm,
|
||||
Container,
|
||||
Container, Dimmer,
|
||||
Divider,
|
||||
Form,
|
||||
Header,
|
||||
|
|
@ -44,6 +44,7 @@ class Settings extends React.Component {
|
|||
this.state = {
|
||||
disabled: false,
|
||||
hotspot_encryption: 'WPA',
|
||||
pending: false,
|
||||
qrCodeValue: '',
|
||||
qrOpen: false,
|
||||
ready: false,
|
||||
|
|
@ -84,6 +85,7 @@ class Settings extends React.Component {
|
|||
|
||||
async handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
this.setState({disabled: true, pending: true});
|
||||
let settings = {
|
||||
download_on_startup: this.state.download_on_startup,
|
||||
hotspot_on_startup: this.state.hotspot_on_startup,
|
||||
|
|
@ -93,6 +95,7 @@ class Settings extends React.Component {
|
|||
timezone: this.state.timezone.value,
|
||||
}
|
||||
await saveSettings(settings);
|
||||
this.setState({disabled: false, pending: false});
|
||||
}
|
||||
|
||||
handleInputChange = async (e, name, value) => {
|
||||
|
|
@ -120,6 +123,7 @@ class Settings extends React.Component {
|
|||
hotspot_on_startup,
|
||||
hotspot_password,
|
||||
hotspot_ssid,
|
||||
pending,
|
||||
qrCodeValue,
|
||||
throttle_on_startup,
|
||||
timezone,
|
||||
|
|
@ -211,6 +215,10 @@ class Settings extends React.Component {
|
|||
Save
|
||||
</Button>
|
||||
|
||||
<Dimmer active={pending} inverted>
|
||||
<Loader active={pending} size='large'/>
|
||||
</Dimmer>
|
||||
|
||||
</Form>
|
||||
</Container>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue