Configs are displayed in new ConfigsPage under Admin.

- Configs can be imported and saved.
- Configs are validated before imported.
- API will refuse to save a config if it was not imported successfully.
This commit is contained in:
Roland 2024-09-28 17:28:33 -06:00
parent d34301a085
commit acf3dee179
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
22 changed files with 767 additions and 157 deletions

View file

@ -297,8 +297,17 @@ export class SettingsPage extends React.Component {
}
render() {
const controlSegment = <Segment>
<Header as='h3'>Control WROLPi</Header>
<RestartButton/>
<ShutdownButton/>
</Segment>;
if (this.state.ready === false) {
return <Loader active inline='centered'/>
return <>
<Loader active inline='centered'/>
{controlSegment}
</>
} else if (this.state.ready === undefined) {
return <ErrorMessage>Unable to fetch settings</ErrorMessage>
}
@ -539,11 +548,7 @@ export class SettingsPage extends React.Component {
</Form>
</Segment>
<Segment>
<Header as='h3'>Control WROLPi</Header>
<RestartButton/>
<ShutdownButton/>
</Segment>
{controlSegment}
</Container>;
}
}</SettingsContext.Consumer>