move export links to help page

This commit is contained in:
proddy
2020-10-17 16:54:15 +02:00
parent d613e8ff9c
commit cafdb6f666
2 changed files with 33 additions and 11 deletions

View File

@@ -5,6 +5,12 @@ import { SectionContent } from '../components';
import CommentIcon from "@material-ui/icons/CommentTwoTone"; import CommentIcon from "@material-ui/icons/CommentTwoTone";
import MenuBookIcon from "@material-ui/icons/MenuBookTwoTone"; import MenuBookIcon from "@material-ui/icons/MenuBookTwoTone";
import GitHubIcon from "@material-ui/icons/GitHub"; import GitHubIcon from "@material-ui/icons/GitHub";
import StarIcon from "@material-ui/icons/Star";
import ImportExportIcon from "@material-ui/icons/ImportExport";
import BugReportIcon from "@material-ui/icons/BugReportTwoTone";
export const WebAPISystemInfo = window.location.origin + "/api?device=system&cmd=info";
export const WebAPISystemReport = window.location.origin + "/api?device=system&cmd=report";
class EMSESPHelp extends Component { class EMSESPHelp extends Component {
@@ -19,7 +25,7 @@ class EMSESPHelp extends Component {
<MenuBookIcon /> <MenuBookIcon />
</ListItemAvatar> </ListItemAvatar>
<ListItemText> <ListItemText>
For the latest news and updates go to the <Link href="https://emsesp.github.io/docs" color="primary">{'documentation'}&nbsp;website</Link>. For the latest news and updates go to the <Link href="https://emsesp.github.io/docs" color="primary">{'documentation'}&nbsp;website</Link>
</ListItemText> </ListItemText>
</ListItem> </ListItem>
@@ -28,7 +34,7 @@ class EMSESPHelp extends Component {
<CommentIcon /> <CommentIcon />
</ListItemAvatar> </ListItemAvatar>
<ListItemText> <ListItemText>
For live community chat visit our <Link href="https://gitter.im/EMS-ESP/community#" color="primary">{'Gitter'}&nbsp;channel</Link>. For live community chat visit our <Link href="https://gitter.im/EMS-ESP/community#" color="primary">{'Gitter'}&nbsp;channel</Link>
</ListItemText> </ListItemText>
</ListItem> </ListItem>
@@ -37,7 +43,26 @@ class EMSESPHelp extends Component {
<GitHubIcon /> <GitHubIcon />
</ListItemAvatar> </ListItemAvatar>
<ListItemText> <ListItemText>
To report an issue or feature request go to <Link href="https://github.com/proddy/EMS-ESP/issues/new/choose" color="primary">{'click here'}</Link>. To report an issue or feature request go to <Link href="https://github.com/proddy/EMS-ESP/issues/new/choose" color="primary">{'click here'}</Link>
</ListItemText>
</ListItem>
<ListItem>
<ListItemAvatar>
<ImportExportIcon />
</ListItemAvatar>
<ListItemText>
To export your system settings <Link target="_blank" href={WebAPISystemInfo} color="primary">{'click here'}</Link>
</ListItemText>
</ListItem>
<ListItem>
<ListItemAvatar>
<BugReportIcon />
</ListItemAvatar>
<ListItemText>
To create a report of the current EMS-ESP status (for troubleshooting) <Link target="_blank" href={WebAPISystemReport} color="primary">{'click here'}</Link>
</ListItemText> </ListItemText>
</ListItem> </ListItem>
@@ -46,7 +71,7 @@ class EMSESPHelp extends Component {
<Box bgcolor="info.main" border={1} p={3} mt={1} mb={0}> <Box bgcolor="info.main" border={1} p={3} mt={1} mb={0}>
<Typography variant="h6"> <Typography variant="h6">
EMS-ESP is free and open-source. EMS-ESP is free and open-source.
<br></br>Please consider supporting this project by giving it a star on our <Link href="https://github.com/proddy/EMS-ESP" color="primary">{'GitHub page'}</Link>. <br></br>Please consider supporting this project by giving it a <StarIcon style={{ color: '#fdff3a' }} /> on our <Link href="https://github.com/proddy/EMS-ESP" color="primary">{'GitHub page'}</Link>.
</Typography> </Typography>
</Box> </Box>
<br></br> <br></br>

View File

@@ -14,8 +14,6 @@ import { EMSESPSettings } from './EMSESPtypes';
export const EMSESP_SETTINGS_ENDPOINT = ENDPOINT_ROOT + "emsespSettings"; export const EMSESP_SETTINGS_ENDPOINT = ENDPOINT_ROOT + "emsespSettings";
export const WebAPISystemInfo = window.location.origin + "/api?device=system&cmd=info";
type EMSESPSettingsControllerProps = RestControllerProps<EMSESPSettings>; type EMSESPSettingsControllerProps = RestControllerProps<EMSESPSettings>;
class EMSESPSettingsController extends Component<EMSESPSettingsControllerProps> { class EMSESPSettingsController extends Component<EMSESPSettingsControllerProps> {
@@ -50,8 +48,7 @@ function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps)
<ValidatorForm onSubmit={saveData}> <ValidatorForm onSubmit={saveData}>
<Box bgcolor="info.main" p={2} mt={2} mb={2}> <Box bgcolor="info.main" p={2} mt={2} mb={2}>
<Typography variant="body1"> <Typography variant="body1">
Change the default settings for EMS-ESP. For help refer to the <Link target="_blank" href="https://emsesp.github.io/docs/#/Configure-firmware?id=settings" color="primary">{'documentation'}</Link>. Change the default settings on this page. For help refer to the <Link target="_blank" href="https://emsesp.github.io/docs/#/Configure-firmware?id=settings" color="primary">{'documentation'}</Link>.
<p>You can also <Link target="_blank" href={WebAPISystemInfo} color="primary">{'export'}</Link>&nbsp; the complete system settings to keep an offline backup.</p>
</Typography> </Typography>
</Box> </Box>
<br></br> <br></br>