mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
auto formatting
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name":"EMS-ESP",
|
"name": "EMS-ESP",
|
||||||
"icons":[
|
"icons": [
|
||||||
{
|
{
|
||||||
"src":"/app/icon.png",
|
"src": "/app/icon.png",
|
||||||
"sizes":"48x48 72x72 96x96 128x128 256x256"
|
"sizes": "48x48 72x72 96x96 128x128 256x256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start_url":"/",
|
"start_url": "/",
|
||||||
"display":"fullscreen",
|
"display": "fullscreen",
|
||||||
"orientation":"any"
|
"orientation": "any"
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ import { Paper, Typography, Fab } from '@material-ui/core';
|
|||||||
import ForwardIcon from '@material-ui/icons/Forward';
|
import ForwardIcon from '@material-ui/icons/Forward';
|
||||||
|
|
||||||
import { withAuthenticationContext, AuthenticationContextProps } from './authentication/AuthenticationContext';
|
import { withAuthenticationContext, AuthenticationContextProps } from './authentication/AuthenticationContext';
|
||||||
import {PasswordValidator} from './components';
|
import { PasswordValidator } from './components';
|
||||||
import { PROJECT_NAME, SIGN_IN_ENDPOINT } from './api';
|
import { PROJECT_NAME, SIGN_IN_ENDPOINT } from './api';
|
||||||
|
|
||||||
const styles = (theme: Theme) => createStyles({
|
const styles = (theme: Theme) => createStyles({
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { AP_SETTINGS_ENDPOINT } from '../api';
|
import { AP_SETTINGS_ENDPOINT } from '../api';
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
|
|
||||||
import APSettingsForm from './APSettingsForm';
|
import APSettingsForm from './APSettingsForm';
|
||||||
import { APSettings } from './types';
|
import { APSettings } from './types';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { AP_STATUS_ENDPOINT } from '../api';
|
import { AP_STATUS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import APStatusForm from './APStatusForm';
|
import APStatusForm from './APStatusForm';
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export function fetchLoginRedirect(features: Features): H.LocationDescriptorObje
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wraps the normal fetch routene with one with provides the access token if present.
|
* Wraps the normal fetch routine with one with provides the access token if present.
|
||||||
*/
|
*/
|
||||||
export function authorizedFetch(url: RequestInfo, params?: RequestInit): Promise<Response> {
|
export function authorizedFetch(url: RequestInfo, params?: RequestInit): Promise<Response> {
|
||||||
const accessToken = getStorage().getItem(ACCESS_TOKEN);
|
const accessToken = getStorage().getItem(ACCESS_TOKEN);
|
||||||
@@ -55,8 +55,8 @@ export function authorizedFetch(url: RequestInfo, params?: RequestInit): Promise
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* fetch() does not yet support upload progress, this wrapper allows us to configure the xhr request
|
* fetch() does not yet support upload progress, this wrapper allows us to configure the xhr request
|
||||||
* for a single file upload and takes care of adding the Authroization header and redirecting on
|
* for a single file upload and takes care of adding the Authorization header and redirecting on
|
||||||
* authroization errors as we do for normal fetch operations.
|
* authorization errors as we do for normal fetch operations.
|
||||||
*/
|
*/
|
||||||
export function redirectingAuthorizedUpload(xhr: XMLHttpRequest, url: string, file: File, onProgress: (event: ProgressEvent<EventTarget>) => void): Promise<void> {
|
export function redirectingAuthorizedUpload(xhr: XMLHttpRequest, url: string, file: File, onProgress: (event: ProgressEvent<EventTarget>) => void): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { TextValidator, ValidatorComponentProps } from 'react-material-ui-form-v
|
|||||||
|
|
||||||
import { withStyles, WithStyles, createStyles } from '@material-ui/core/styles';
|
import { withStyles, WithStyles, createStyles } from '@material-ui/core/styles';
|
||||||
import { InputAdornment, IconButton } from '@material-ui/core';
|
import { InputAdornment, IconButton } from '@material-ui/core';
|
||||||
import {Visibility,VisibilityOff } from '@material-ui/icons';
|
import { Visibility, VisibilityOff } from '@material-ui/icons';
|
||||||
|
|
||||||
const styles = createStyles({
|
const styles = createStyles({
|
||||||
input: {
|
input: {
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ import App from './App';
|
|||||||
|
|
||||||
render((
|
render((
|
||||||
<Router history={history}>
|
<Router history={history}>
|
||||||
<App/>
|
<App />
|
||||||
</Router>
|
</Router>
|
||||||
), document.getElementById("root"))
|
), document.getElementById("root"))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { MQTT_SETTINGS_ENDPOINT } from '../api';
|
import { MQTT_SETTINGS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import MqttSettingsForm from './MqttSettingsForm';
|
import MqttSettingsForm from './MqttSettingsForm';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { MQTT_STATUS_ENDPOINT } from '../api';
|
import { MQTT_STATUS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import MqttStatusForm from './MqttStatusForm';
|
import MqttStatusForm from './MqttStatusForm';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import NetworkStatusForm from './NetworkStatusForm';
|
import NetworkStatusForm from './NetworkStatusForm';
|
||||||
import { NETWORK_STATUS_ENDPOINT } from '../api';
|
import { NETWORK_STATUS_ENDPOINT } from '../api';
|
||||||
import { NetworkStatus } from './types';
|
import { NetworkStatus } from './types';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { NTP_SETTINGS_ENDPOINT } from '../api';
|
import { NTP_SETTINGS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import NTPSettingsForm from './NTPSettingsForm';
|
import NTPSettingsForm from './NTPSettingsForm';
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const busStatus = ({ status }: EMSESPStatus) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const qualityHighlight = ( value: number, theme: Theme) => {
|
export const qualityHighlight = (value: number, theme: Theme) => {
|
||||||
if (value >= 95) {
|
if (value >= 95) {
|
||||||
return theme.palette.success.main;
|
return theme.palette.success.main;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { SECURITY_SETTINGS_ENDPOINT } from '../api';
|
import { SECURITY_SETTINGS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import ManageUsersForm from './ManageUsersForm';
|
import ManageUsersForm from './ManageUsersForm';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { SECURITY_SETTINGS_ENDPOINT } from '../api';
|
import { SECURITY_SETTINGS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import SecuritySettingsForm from './SecuritySettingsForm';
|
import SecuritySettingsForm from './SecuritySettingsForm';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { OTA_SETTINGS_ENDPOINT } from '../api';
|
import { OTA_SETTINGS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import OTASettingsForm from './OTASettingsForm';
|
import OTASettingsForm from './OTASettingsForm';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
import { restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
||||||
import { SYSTEM_STATUS_ENDPOINT } from '../api';
|
import { SYSTEM_STATUS_ENDPOINT } from '../api';
|
||||||
|
|
||||||
import SystemStatusForm from './SystemStatusForm';
|
import SystemStatusForm from './SystemStatusForm';
|
||||||
|
|||||||
Reference in New Issue
Block a user