mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
added dashboard and settings pages to web
This commit is contained in:
@@ -7,7 +7,6 @@ import { PROJECT_PATH } from '../api';
|
||||
import { MenuAppBar } from '../components';
|
||||
import { AuthenticatedRoute } from '../authentication';
|
||||
|
||||
import EMSESPSettingsController from './EMSESPSettingsController';
|
||||
import EMSESPStatusController from './EMSESPStatusController';
|
||||
import EMSESPDevicesController from './EMSESPDevicesController';
|
||||
|
||||
@@ -19,16 +18,14 @@ class EMSESP extends Component<RouteComponentProps> {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<MenuAppBar sectionTitle="EMS-ESP">
|
||||
<MenuAppBar sectionTitle="Dashboard">
|
||||
<Tabs value={this.props.match.url} onChange={this.handleTabChange} variant="fullWidth">
|
||||
<Tab value={`/${PROJECT_PATH}/status`} label="EMS-ESP Status" />
|
||||
<Tab value={`/${PROJECT_PATH}/devices`} label="EMS Devices" />
|
||||
<Tab value={`/${PROJECT_PATH}/settings`} label="EMS-ESP Settings" />
|
||||
</Tabs>
|
||||
<Switch>
|
||||
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/status`} component={EMSESPStatusController} />
|
||||
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/devices`} component={EMSESPDevicesController} />
|
||||
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/settings`} component={EMSESPSettingsController} />
|
||||
<Redirect to={`/${PROJECT_PATH}/status`} />
|
||||
</Switch>
|
||||
</MenuAppBar>
|
||||
|
||||
Reference in New Issue
Block a user