Skip to content

Commit

Permalink
3.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Nov 26, 2023
2 parents f41bb36 + ba21293 commit e00eb8e
Show file tree
Hide file tree
Showing 16 changed files with 186 additions and 208 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Writeable Text entities have moved from type `sensor` to `text` in Home Assistan
- fixed helper text in Web Device Entity dialog box for numerical ranges
- MQTT base with paths not working in HA [#1393](https://github.com/emsesp/EMS-ESP32/issues/1393)
- set/read thermostat mode for RC100-RC300, [#1440](https://github.com/emsesp/EMS-ESP32/issues/1440) [#1442](https://github.com/emsesp/EMS-ESP32/issues/1442)
- some setting commands for ems-boiler have used wrong ems+ telegram in 3.6.3

## Changed

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [3.6.4]
## [3.6.5]

## **IMPORTANT! BREAKING CHANGES**

Expand Down
6 changes: 3 additions & 3 deletions interface/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EMS-ESP",
"version": "3.6.4",
"version": "3.6.5",
"description": "build EMS-ESP WebUI",
"homepage": "https://emsesp.github.io/docs",
"author": "proddy",
Expand Down Expand Up @@ -29,7 +29,7 @@
"@table-library/react-table-library": "4.1.7",
"@types/imagemin": "^8.0.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.9.5",
"@types/node": "^20.10.0",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@types/react-router-dom": "^5.3.3",
Expand Down Expand Up @@ -68,7 +68,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"preact": "^10.19.2",
"prettier": "^3.1.0",
"rollup-plugin-visualizer": "^5.9.2",
"rollup-plugin-visualizer": "^5.9.3",
"terser": "^5.24.0",
"vite": "^5.0.2",
"vite-plugin-imagemin": "^0.6.1",
Expand Down
7 changes: 3 additions & 4 deletions interface/src/components/routing/useRouterTab.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useMatch, useResolvedPath } from 'react-router-dom';
import { useLocation } from 'react-router-dom';

export const useRouterTab = () => {
const routerTabPath = useResolvedPath(':tab');
const routerTabPathMatch = useMatch(routerTabPath.pathname);
const loc = useLocation().pathname;
const routerTab = loc.substring(0, loc.lastIndexOf('/')) ? loc : false;

const routerTab = routerTabPathMatch?.params?.tab || false;
return { routerTab } as const;
};
10 changes: 7 additions & 3 deletions interface/src/framework/ap/AccessPoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ const AccessPoint: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
<Tab value="settings" label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))} disabled={!authenticatedContext.me.admin} />
<Tab value="/ap/status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
<Tab
value="/ap/settings"
label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))}
disabled={!authenticatedContext.me.admin}
/>
</RouterTabs>
<Routes>
<Route path="status" element={<APStatusForm />} />
Expand All @@ -36,7 +40,7 @@ const AccessPoint: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/ap/status" />} />
</Routes>
</>
);
Expand Down
6 changes: 3 additions & 3 deletions interface/src/framework/mqtt/Mqtt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const Mqtt: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF('MQTT')} />
<Tab value="settings" label={LL.SETTINGS_OF('MQTT')} disabled={!authenticatedContext.me.admin} />
<Tab value="/mqtt/status" label={LL.STATUS_OF('MQTT')} />
<Tab value="/mqtt/settings" label={LL.SETTINGS_OF('MQTT')} disabled={!authenticatedContext.me.admin} />
</RouterTabs>
<Routes>
<Route path="status" element={<MqttStatusForm />} />
Expand All @@ -34,7 +34,7 @@ const Mqtt: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/mqtt/status" />} />
</Routes>
</>
);
Expand Down
12 changes: 8 additions & 4 deletions interface/src/framework/network/NetworkConnection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ const NetworkConnection: FC = () => {
}}
>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF(LL.NETWORK(1))} />
<Tab value="scan" label={LL.NETWORK_SCAN()} disabled={!authenticatedContext.me.admin} />
<Tab value="settings" label={LL.SETTINGS_OF(LL.NETWORK(1))} disabled={!authenticatedContext.me.admin} />
<Tab value="/network/status" label={LL.STATUS_OF(LL.NETWORK(1))} />
<Tab value="/network/scan" label={LL.NETWORK_SCAN()} disabled={!authenticatedContext.me.admin} />
<Tab
value="/network/settings"
label={LL.SETTINGS_OF(LL.NETWORK(1))}
disabled={!authenticatedContext.me.admin}
/>
</RouterTabs>
<Routes>
<Route path="status" element={<NetworkStatusForm />} />
Expand All @@ -66,7 +70,7 @@ const NetworkConnection: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/network/status" />} />
</Routes>
</WiFiConnectionContext.Provider>
);
Expand Down
6 changes: 3 additions & 3 deletions interface/src/framework/ntp/NetworkTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const NetworkTime: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF('NTP')} />
<Tab value="settings" label={LL.SETTINGS_OF('NTP')} disabled={!authenticatedContext.me.admin} />
<Tab value="/ntp/status" label={LL.STATUS_OF('NTP')} />
<Tab value="/ntp/settings" label={LL.SETTINGS_OF('NTP')} disabled={!authenticatedContext.me.admin} />
</RouterTabs>
<Routes>
<Route path="status" element={<NTPStatusForm />} />
Expand All @@ -33,7 +33,7 @@ const NetworkTime: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/ntp/status" />} />
</Routes>
</>
);
Expand Down
6 changes: 3 additions & 3 deletions interface/src/framework/security/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ const Security: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="users" label={LL.MANAGE_USERS()} />
<Tab value="settings" label={LL.SETTINGS_OF(LL.SECURITY(1))} />
<Tab value="/security/users" label={LL.MANAGE_USERS()} />
<Tab value="/security/settings" label={LL.SETTINGS_OF(LL.SECURITY(1))} />
</RouterTabs>
<Routes>
<Route path="users" element={<ManageUsersForm />} />
<Route path="settings" element={<SecuritySettingsForm />} />
<Route path="/*" element={<Navigate replace to="users" />} />
<Route path="*" element={<Navigate replace to="/security/users" />} />
</Routes>
</>
);
Expand Down
10 changes: 5 additions & 5 deletions interface/src/framework/system/System.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const System: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF(LL.SYSTEM(1))} />
<Tab value="log" label={LL.LOG_OF(LL.SYSTEM(2))} />
<Tab value="ota" label={LL.SETTINGS_OF('OTA')} disabled={!me.admin} />
<Tab value="upload" label={LL.UPLOAD_DOWNLOAD()} disabled={!me.admin} />
<Tab value="/system/status" label={LL.STATUS_OF(LL.SYSTEM(1))} />
<Tab value="/system/log" label={LL.LOG_OF(LL.SYSTEM(2))} />
<Tab value="/system/ota" label={LL.SETTINGS_OF('OTA')} disabled={!me.admin} />
<Tab value="/system/upload" label={LL.UPLOAD_DOWNLOAD()} disabled={!me.admin} />
</RouterTabs>
<Routes>
<Route path="status" element={<SystemStatusForm />} />
Expand All @@ -47,7 +47,7 @@ const System: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/system/status" />} />
</Routes>
</>
);
Expand Down
8 changes: 4 additions & 4 deletions interface/src/project/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ const Dashboard: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="devices" label={LL.DEVICES()} />
<Tab value="sensors" label={LL.SENSORS()} />
<Tab value="status" label="Status" />
<Tab value="/dashboard/devices" label={LL.DEVICES()} />
<Tab value="/dashboard/sensors" label={LL.SENSORS()} />
<Tab value="/dashboard/status" label="Status" />
</RouterTabs>
<Routes>
<Route path="devices" element={<DashboardDevices />} />
<Route path="sensors" element={<DashboardSensors />} />
<Route path="status" element={<DashboardStatus />} />
<Route path="/*" element={<Navigate replace to="devices" />} />
<Route path="*" element={<Navigate replace to="/dashboard/devices" />} />
</Routes>
</>
);
Expand Down
89 changes: 72 additions & 17 deletions interface/src/project/Help.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,83 @@
import { Tab } from '@mui/material';
import { Navigate, Route, Routes } from 'react-router-dom';
import HelpInformation from './HelpInformation';
import CommentIcon from '@mui/icons-material/CommentTwoTone';
import EastIcon from '@mui/icons-material/East';
import GitHubIcon from '@mui/icons-material/GitHub';
import MenuBookIcon from '@mui/icons-material/MenuBookTwoTone';
import { Box, List, ListItem, ListItemAvatar, ListItemText, Link, Typography } from '@mui/material';
import type { FC } from 'react';

import { RouterTabs, useRouterTab, useLayoutTitle } from 'components';

import { SectionContent, useLayoutTitle } from 'components';
import { useI18nContext } from 'i18n/i18n-react';

const Help: FC = () => {
const { LL } = useI18nContext();
const { routerTab } = useRouterTab();

useLayoutTitle(LL.HELP_OF(''));

const uploadURL = window.location.origin + '/system/upload';

return (
<>
<RouterTabs value={routerTab}>
<Tab value="information" label={LL.HELP_OF('EMS-ESP')} />
</RouterTabs>
<Routes>
<Route path="information" element={<HelpInformation />} />
<Route path="/*" element={<Navigate replace to="information" />} />
</Routes>
</>
<SectionContent title={LL.SUPPORT_INFORMATION()} titleGutter>
<List>
<ListItem>
<ListItemAvatar>
<MenuBookIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
</ListItemAvatar>
<ListItemText>
{LL.HELP_INFORMATION_1()}&nbsp;
<EastIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
&nbsp;
<Link target="_blank" href="https://emsesp.github.io/docs" color="primary">
{LL.CLICK_HERE()}
</Link>
</ListItemText>
</ListItem>

<ListItem>
<ListItemAvatar>
<CommentIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
</ListItemAvatar>
<ListItemText>
{LL.HELP_INFORMATION_2()}&nbsp;
<EastIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
&nbsp;
<Link target="_blank" href="https://discord.gg/3J3GgnzpyT" color="primary">
{LL.CLICK_HERE()}
</Link>
</ListItemText>
</ListItem>

<ListItem>
<ListItemAvatar>
<GitHubIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
</ListItemAvatar>
<ListItemText>
{LL.HELP_INFORMATION_3()}&nbsp;
<EastIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
<Link target="_blank" href="https://github.com/emsesp/EMS-ESP32/issues/new/choose" color="primary">
{LL.CLICK_HERE()}
</Link>
<br />
<i>({LL.HELP_INFORMATION_4()}</i>&nbsp;
<Link href={uploadURL} color="primary">
{LL.UPLOAD()}
</Link>
)
</ListItemText>
</ListItem>
</List>

<Box border={1} p={1} mt={4} color="orange">
<Typography align="center" variant="subtitle1" color="orange">
<b>{LL.HELP_INFORMATION_5()}</b>
</Typography>
<Typography align="center">
<Link target="_blank" href="https://github.com/emsesp/EMS-ESP32" color="primary">
{'github.com/emsesp/EMS-ESP32'}
</Link>
</Typography>
<Typography color="white" align="center">
@proddy @MichaelDvP
</Typography>
</Box>
</SectionContent>
);
};

Expand Down
85 changes: 0 additions & 85 deletions interface/src/project/HelpInformation.tsx

This file was deleted.

Loading

0 comments on commit e00eb8e

Please sign in to comment.