Skip to content

Commit e00eb8e

Browse files
committed
3.6.4
2 parents f41bb36 + ba21293 commit e00eb8e

16 files changed

+186
-208
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Writeable Text entities have moved from type `sensor` to `text` in Home Assistan
3434
- fixed helper text in Web Device Entity dialog box for numerical ranges
3535
- MQTT base with paths not working in HA [#1393](https://github.com/emsesp/EMS-ESP32/issues/1393)
3636
- 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)
37+
- some setting commands for ems-boiler have used wrong ems+ telegram in 3.6.3
3738

3839
## Changed
3940

CHANGELOG_LATEST.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [3.6.4]
3+
## [3.6.5]
44

55
## **IMPORTANT! BREAKING CHANGES**
66

interface/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "EMS-ESP",
3-
"version": "3.6.4",
3+
"version": "3.6.5",
44
"description": "build EMS-ESP WebUI",
55
"homepage": "https://emsesp.github.io/docs",
66
"author": "proddy",
@@ -29,7 +29,7 @@
2929
"@table-library/react-table-library": "4.1.7",
3030
"@types/imagemin": "^8.0.5",
3131
"@types/lodash-es": "^4.17.12",
32-
"@types/node": "^20.9.5",
32+
"@types/node": "^20.10.0",
3333
"@types/react": "^18.2.38",
3434
"@types/react-dom": "^18.2.17",
3535
"@types/react-router-dom": "^5.3.3",
@@ -68,7 +68,7 @@
6868
"eslint-plugin-react-hooks": "^4.6.0",
6969
"preact": "^10.19.2",
7070
"prettier": "^3.1.0",
71-
"rollup-plugin-visualizer": "^5.9.2",
71+
"rollup-plugin-visualizer": "^5.9.3",
7272
"terser": "^5.24.0",
7373
"vite": "^5.0.2",
7474
"vite-plugin-imagemin": "^0.6.1",
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { useMatch, useResolvedPath } from 'react-router-dom';
1+
import { useLocation } from 'react-router-dom';
22

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

7-
const routerTab = routerTabPathMatch?.params?.tab || false;
87
return { routerTab } as const;
98
};

interface/src/framework/ap/AccessPoint.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ const AccessPoint: FC = () => {
2222
return (
2323
<>
2424
<RouterTabs value={routerTab}>
25-
<Tab value="status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
26-
<Tab value="settings" label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))} disabled={!authenticatedContext.me.admin} />
25+
<Tab value="/ap/status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
26+
<Tab
27+
value="/ap/settings"
28+
label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))}
29+
disabled={!authenticatedContext.me.admin}
30+
/>
2731
</RouterTabs>
2832
<Routes>
2933
<Route path="status" element={<APStatusForm />} />
@@ -36,7 +40,7 @@ const AccessPoint: FC = () => {
3640
</RequireAdmin>
3741
}
3842
/>
39-
<Route path="/*" element={<Navigate replace to="status" />} />
43+
<Route path="*" element={<Navigate replace to="/ap/status" />} />
4044
</Routes>
4145
</>
4246
);

interface/src/framework/mqtt/Mqtt.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const Mqtt: FC = () => {
2121
return (
2222
<>
2323
<RouterTabs value={routerTab}>
24-
<Tab value="status" label={LL.STATUS_OF('MQTT')} />
25-
<Tab value="settings" label={LL.SETTINGS_OF('MQTT')} disabled={!authenticatedContext.me.admin} />
24+
<Tab value="/mqtt/status" label={LL.STATUS_OF('MQTT')} />
25+
<Tab value="/mqtt/settings" label={LL.SETTINGS_OF('MQTT')} disabled={!authenticatedContext.me.admin} />
2626
</RouterTabs>
2727
<Routes>
2828
<Route path="status" element={<MqttStatusForm />} />
@@ -34,7 +34,7 @@ const Mqtt: FC = () => {
3434
</RequireAdmin>
3535
}
3636
/>
37-
<Route path="/*" element={<Navigate replace to="status" />} />
37+
<Route path="*" element={<Navigate replace to="/mqtt/status" />} />
3838
</Routes>
3939
</>
4040
);

interface/src/framework/network/NetworkConnection.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ const NetworkConnection: FC = () => {
4444
}}
4545
>
4646
<RouterTabs value={routerTab}>
47-
<Tab value="status" label={LL.STATUS_OF(LL.NETWORK(1))} />
48-
<Tab value="scan" label={LL.NETWORK_SCAN()} disabled={!authenticatedContext.me.admin} />
49-
<Tab value="settings" label={LL.SETTINGS_OF(LL.NETWORK(1))} disabled={!authenticatedContext.me.admin} />
47+
<Tab value="/network/status" label={LL.STATUS_OF(LL.NETWORK(1))} />
48+
<Tab value="/network/scan" label={LL.NETWORK_SCAN()} disabled={!authenticatedContext.me.admin} />
49+
<Tab
50+
value="/network/settings"
51+
label={LL.SETTINGS_OF(LL.NETWORK(1))}
52+
disabled={!authenticatedContext.me.admin}
53+
/>
5054
</RouterTabs>
5155
<Routes>
5256
<Route path="status" element={<NetworkStatusForm />} />
@@ -66,7 +70,7 @@ const NetworkConnection: FC = () => {
6670
</RequireAdmin>
6771
}
6872
/>
69-
<Route path="/*" element={<Navigate replace to="status" />} />
73+
<Route path="*" element={<Navigate replace to="/network/status" />} />
7074
</Routes>
7175
</WiFiConnectionContext.Provider>
7276
);

interface/src/framework/ntp/NetworkTime.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const NetworkTime: FC = () => {
2020
return (
2121
<>
2222
<RouterTabs value={routerTab}>
23-
<Tab value="status" label={LL.STATUS_OF('NTP')} />
24-
<Tab value="settings" label={LL.SETTINGS_OF('NTP')} disabled={!authenticatedContext.me.admin} />
23+
<Tab value="/ntp/status" label={LL.STATUS_OF('NTP')} />
24+
<Tab value="/ntp/settings" label={LL.SETTINGS_OF('NTP')} disabled={!authenticatedContext.me.admin} />
2525
</RouterTabs>
2626
<Routes>
2727
<Route path="status" element={<NTPStatusForm />} />
@@ -33,7 +33,7 @@ const NetworkTime: FC = () => {
3333
</RequireAdmin>
3434
}
3535
/>
36-
<Route path="/*" element={<Navigate replace to="status" />} />
36+
<Route path="*" element={<Navigate replace to="/ntp/status" />} />
3737
</Routes>
3838
</>
3939
);

interface/src/framework/security/Security.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ const Security: FC = () => {
1717
return (
1818
<>
1919
<RouterTabs value={routerTab}>
20-
<Tab value="users" label={LL.MANAGE_USERS()} />
21-
<Tab value="settings" label={LL.SETTINGS_OF(LL.SECURITY(1))} />
20+
<Tab value="/security/users" label={LL.MANAGE_USERS()} />
21+
<Tab value="/security/settings" label={LL.SETTINGS_OF(LL.SECURITY(1))} />
2222
</RouterTabs>
2323
<Routes>
2424
<Route path="users" element={<ManageUsersForm />} />
2525
<Route path="settings" element={<SecuritySettingsForm />} />
26-
<Route path="/*" element={<Navigate replace to="users" />} />
26+
<Route path="*" element={<Navigate replace to="/security/users" />} />
2727
</Routes>
2828
</>
2929
);

interface/src/framework/system/System.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const System: FC = () => {
2323
return (
2424
<>
2525
<RouterTabs value={routerTab}>
26-
<Tab value="status" label={LL.STATUS_OF(LL.SYSTEM(1))} />
27-
<Tab value="log" label={LL.LOG_OF(LL.SYSTEM(2))} />
28-
<Tab value="ota" label={LL.SETTINGS_OF('OTA')} disabled={!me.admin} />
29-
<Tab value="upload" label={LL.UPLOAD_DOWNLOAD()} disabled={!me.admin} />
26+
<Tab value="/system/status" label={LL.STATUS_OF(LL.SYSTEM(1))} />
27+
<Tab value="/system/log" label={LL.LOG_OF(LL.SYSTEM(2))} />
28+
<Tab value="/system/ota" label={LL.SETTINGS_OF('OTA')} disabled={!me.admin} />
29+
<Tab value="/system/upload" label={LL.UPLOAD_DOWNLOAD()} disabled={!me.admin} />
3030
</RouterTabs>
3131
<Routes>
3232
<Route path="status" element={<SystemStatusForm />} />
@@ -47,7 +47,7 @@ const System: FC = () => {
4747
</RequireAdmin>
4848
}
4949
/>
50-
<Route path="/*" element={<Navigate replace to="status" />} />
50+
<Route path="*" element={<Navigate replace to="/system/status" />} />
5151
</Routes>
5252
</>
5353
);

interface/src/project/Dashboard.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ const Dashboard: FC = () => {
2020
return (
2121
<>
2222
<RouterTabs value={routerTab}>
23-
<Tab value="devices" label={LL.DEVICES()} />
24-
<Tab value="sensors" label={LL.SENSORS()} />
25-
<Tab value="status" label="Status" />
23+
<Tab value="/dashboard/devices" label={LL.DEVICES()} />
24+
<Tab value="/dashboard/sensors" label={LL.SENSORS()} />
25+
<Tab value="/dashboard/status" label="Status" />
2626
</RouterTabs>
2727
<Routes>
2828
<Route path="devices" element={<DashboardDevices />} />
2929
<Route path="sensors" element={<DashboardSensors />} />
3030
<Route path="status" element={<DashboardStatus />} />
31-
<Route path="/*" element={<Navigate replace to="devices" />} />
31+
<Route path="*" element={<Navigate replace to="/dashboard/devices" />} />
3232
</Routes>
3333
</>
3434
);

interface/src/project/Help.tsx

+72-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,83 @@
1-
import { Tab } from '@mui/material';
2-
import { Navigate, Route, Routes } from 'react-router-dom';
3-
import HelpInformation from './HelpInformation';
1+
import CommentIcon from '@mui/icons-material/CommentTwoTone';
2+
import EastIcon from '@mui/icons-material/East';
3+
import GitHubIcon from '@mui/icons-material/GitHub';
4+
import MenuBookIcon from '@mui/icons-material/MenuBookTwoTone';
5+
import { Box, List, ListItem, ListItemAvatar, ListItemText, Link, Typography } from '@mui/material';
46
import type { FC } from 'react';
5-
6-
import { RouterTabs, useRouterTab, useLayoutTitle } from 'components';
7-
7+
import { SectionContent, useLayoutTitle } from 'components';
88
import { useI18nContext } from 'i18n/i18n-react';
99

1010
const Help: FC = () => {
1111
const { LL } = useI18nContext();
12-
const { routerTab } = useRouterTab();
13-
1412
useLayoutTitle(LL.HELP_OF(''));
1513

14+
const uploadURL = window.location.origin + '/system/upload';
15+
1616
return (
17-
<>
18-
<RouterTabs value={routerTab}>
19-
<Tab value="information" label={LL.HELP_OF('EMS-ESP')} />
20-
</RouterTabs>
21-
<Routes>
22-
<Route path="information" element={<HelpInformation />} />
23-
<Route path="/*" element={<Navigate replace to="information" />} />
24-
</Routes>
25-
</>
17+
<SectionContent title={LL.SUPPORT_INFORMATION()} titleGutter>
18+
<List>
19+
<ListItem>
20+
<ListItemAvatar>
21+
<MenuBookIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
22+
</ListItemAvatar>
23+
<ListItemText>
24+
{LL.HELP_INFORMATION_1()}&nbsp;
25+
<EastIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
26+
&nbsp;
27+
<Link target="_blank" href="https://emsesp.github.io/docs" color="primary">
28+
{LL.CLICK_HERE()}
29+
</Link>
30+
</ListItemText>
31+
</ListItem>
32+
33+
<ListItem>
34+
<ListItemAvatar>
35+
<CommentIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
36+
</ListItemAvatar>
37+
<ListItemText>
38+
{LL.HELP_INFORMATION_2()}&nbsp;
39+
<EastIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
40+
&nbsp;
41+
<Link target="_blank" href="https://discord.gg/3J3GgnzpyT" color="primary">
42+
{LL.CLICK_HERE()}
43+
</Link>
44+
</ListItemText>
45+
</ListItem>
46+
47+
<ListItem>
48+
<ListItemAvatar>
49+
<GitHubIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
50+
</ListItemAvatar>
51+
<ListItemText>
52+
{LL.HELP_INFORMATION_3()}&nbsp;
53+
<EastIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
54+
<Link target="_blank" href="https://github.com/emsesp/EMS-ESP32/issues/new/choose" color="primary">
55+
{LL.CLICK_HERE()}
56+
</Link>
57+
<br />
58+
<i>({LL.HELP_INFORMATION_4()}</i>&nbsp;
59+
<Link href={uploadURL} color="primary">
60+
{LL.UPLOAD()}
61+
</Link>
62+
)
63+
</ListItemText>
64+
</ListItem>
65+
</List>
66+
67+
<Box border={1} p={1} mt={4} color="orange">
68+
<Typography align="center" variant="subtitle1" color="orange">
69+
<b>{LL.HELP_INFORMATION_5()}</b>
70+
</Typography>
71+
<Typography align="center">
72+
<Link target="_blank" href="https://github.com/emsesp/EMS-ESP32" color="primary">
73+
{'github.com/emsesp/EMS-ESP32'}
74+
</Link>
75+
</Typography>
76+
<Typography color="white" align="center">
77+
@proddy @MichaelDvP
78+
</Typography>
79+
</Box>
80+
</SectionContent>
2681
);
2782
};
2883

interface/src/project/HelpInformation.tsx

-85
This file was deleted.

0 commit comments

Comments
 (0)