@eohjsc/react-native-smart-city 0.3.48 → 0.3.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/Images/DevMode/file_copy.svg +3 -0
- package/src/Images/DevMode/inforCode.png +0 -0
- package/src/Images/DevMode/inforCode@2x.png +0 -0
- package/src/Images/DevMode/inforCode@3x.png +0 -0
- package/src/commons/Action/__test__/ItemQuickAction.test.js +0 -7
- package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +1 -8
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +1 -1
- package/src/commons/ActionGroup/__test__/SliderRangeTemplate.test.js +1 -8
- package/src/commons/ActionTemplate/__test__/index.test.js +0 -7
- package/src/commons/Dashboard/MyPinnedSharedUnit/index.js +3 -3
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +1 -1
- package/src/commons/Dashboard/MyUnit/index.js +30 -4
- package/src/commons/DevMode/Styles/ItemStyles.js +1 -1
- package/src/commons/Device/PMSensor/PMSensorIndicatior.js +2 -1
- package/src/commons/FourButtonFilterHistory/__test__/FourButtonFilterHistory.test.js +0 -7
- package/src/commons/Header/HeaderCustom.js +13 -6
- package/src/commons/MediaPlayer/__test__/index.test.js +0 -7
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +0 -1
- package/src/commons/MenuActionMore/index.js +4 -1
- package/src/commons/NavBar/index.js +1 -1
- package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +1 -1
- package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +0 -7
- package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +0 -7
- package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +0 -7
- package/src/commons/RowItem/index.js +6 -1
- package/src/commons/SelectUnit/index.js +4 -1
- package/src/commons/StatusBox/styles.js +8 -3
- package/src/commons/SubUnit/__test__/Favorites.test.js +0 -7
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +0 -7
- package/src/commons/Tabbar/__test__/index.test.js +0 -7
- package/src/commons/Unit/__test__/HeaderUnit.test.js +0 -5
- package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +0 -7
- package/src/configs/API.js +28 -0
- package/src/configs/AccessibilityLabel.js +13 -0
- package/src/configs/Colors.js +4 -0
- package/src/configs/Constants.js +6 -0
- package/src/configs/Images.js +1 -0
- package/src/context/actionType.ts +8 -1
- package/src/context/mockStore.ts +8 -2
- package/src/context/reducer.ts +27 -4
- package/src/hooks/IoT/__test__/useWatchConfigs.test.js +46 -0
- package/src/hooks/IoT/useBluetoothConnection.js +78 -4
- package/src/hooks/IoT/useBluetoothDeviceConnected.js +1 -1
- package/src/iot/RemoteControl/Bluetooth.js +0 -16
- package/src/iot/RemoteControl/__test__/Bluetooth.test.js +0 -25
- package/src/navigations/Main.js +39 -0
- package/src/navigations/UnitStack.js +18 -5
- package/src/screens/ActivityLog/__test__/FilterPopup.test.js +0 -7
- package/src/screens/ActivityLog/__test__/ItemLog.test.js +0 -7
- package/src/screens/ActivityLog/__test__/index.test.js +0 -7
- package/src/screens/AddLocationMaps/__test__/index.test.js +0 -7
- package/src/screens/AddNewAction/SelectAction.js +22 -18
- package/src/screens/AddNewAction/__test__/SelectAction.test.js +35 -16
- package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +0 -7
- package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +0 -4
- package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +17 -4
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +4 -7
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +0 -7
- package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +0 -4
- package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +0 -4
- package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +0 -7
- package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +0 -1
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +0 -7
- package/src/screens/Device/__test__/detail.test.js +1 -1
- package/src/screens/Device/detail.js +11 -3
- package/src/screens/Device/hooks/useDisconnectedDevice.js +26 -7
- package/src/screens/EmergencyContacts/__test__/hooks.test.js +79 -0
- package/src/screens/Gateway/DetailConfigActionModbus/__test__/index.test.js +138 -0
- package/src/screens/Gateway/DetailConfigActionModbus/index.js +180 -0
- package/src/screens/Gateway/DetailConfigActionModbus/styles.js +9 -0
- package/src/screens/Gateway/DetailConfigActionZigbee/__test__/index.test.js +73 -0
- package/src/screens/Gateway/DetailConfigActionZigbee/index.js +62 -0
- package/src/screens/Gateway/DetailConfigActionZigbee/styles.js +9 -0
- package/src/screens/Gateway/DeviceGatewayInfo/__test__/index.test.js +73 -0
- package/src/screens/Gateway/DeviceGatewayInfo/index.js +96 -0
- package/src/screens/Gateway/DeviceGatewayInfo/styles.js +9 -0
- package/src/screens/Gateway/DeviceModbusDetail/__test__/index.test.js +393 -0
- package/src/screens/Gateway/DeviceModbusDetail/index.js +176 -0
- package/src/screens/Gateway/DeviceModbusDetail/styles.js +12 -0
- package/src/screens/Gateway/DeviceZigbeeDetail/__test__/index.test.js +265 -0
- package/src/screens/Gateway/DeviceZigbeeDetail/index.js +148 -0
- package/src/screens/Gateway/DeviceZigbeeDetail/styles.js +12 -0
- package/src/screens/Gateway/GatewayConnectionMethods/__test__/index.test.js +37 -0
- package/src/screens/Gateway/GatewayConnectionMethods/index.js +73 -0
- package/src/screens/Gateway/GatewayConnectionMethods/styles.js +45 -0
- package/src/screens/Gateway/GatewayDetail/__test__/index.test.js +298 -0
- package/src/screens/Gateway/GatewayDetail/index.js +148 -0
- package/src/screens/Gateway/GatewayDetail/styles.js +12 -0
- package/src/screens/Gateway/GatewayInfo/__test__/index.test.js +137 -0
- package/src/screens/Gateway/GatewayInfo/index.js +115 -0
- package/src/screens/Gateway/GatewayInfo/styles.js +9 -0
- package/src/screens/Gateway/__test__/index.test.js +58 -0
- package/src/screens/Gateway/components/Detail/__test__/index.test.js +46 -0
- package/src/screens/Gateway/components/Detail/index.js +62 -0
- package/src/screens/Gateway/components/Detail/styles.js +27 -0
- package/src/screens/Gateway/components/DetailActionModbus/__test__/index.test.js +49 -0
- package/src/screens/Gateway/components/DetailActionModbus/index.js +52 -0
- package/src/screens/Gateway/components/DetailActionModbus/styles.js +32 -0
- package/src/screens/Gateway/components/DetailConfigAction/__test__/index.test.js +59 -0
- package/src/screens/Gateway/components/DetailConfigAction/index.js +69 -0
- package/src/screens/Gateway/components/DetailConfigAction/styles.js +21 -0
- package/src/screens/Gateway/components/GatewayItem/__test__/index.test.js +1 -1
- package/src/screens/Gateway/components/GatewayItem/styles.js +4 -33
- package/src/screens/Gateway/components/Information/__test__/index.test.js +70 -0
- package/src/screens/Gateway/components/Information/index.js +116 -0
- package/src/screens/Gateway/components/Information/styles.js +59 -0
- package/src/screens/Gateway/components/RowItem/__test__/index.test.js +67 -0
- package/src/screens/Gateway/components/RowItem/index.js +65 -0
- package/src/screens/Gateway/components/RowItem/styles.js +25 -0
- package/src/screens/Gateway/components/TabPaneCT/__test__/index.test.js +98 -0
- package/src/screens/Gateway/components/TabPaneCT/index.js +134 -0
- package/src/screens/Gateway/components/TabPaneCT/styles.js +58 -0
- package/src/screens/Gateway/hooks/__test__/index.test.js +93 -0
- package/src/screens/Gateway/hooks/useGateway.js +110 -16
- package/src/screens/Gateway/index.js +19 -3
- package/src/screens/Gateway/styles.js +6 -8
- package/src/screens/Gateway/utils/index.js +16 -0
- package/src/screens/GuestInfo/__test__/index.test.js +0 -7
- package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +0 -7
- package/src/screens/HanetCamera/__test__/Detail.test.js +0 -7
- package/src/screens/HanetCamera/__test__/ManageAccess.test.js +0 -7
- package/src/screens/HanetCamera/__test__/MemberInfo.test.js +0 -7
- package/src/screens/ManageAccess/__test__/ManageAccess.test.js +0 -6
- package/src/screens/ManageAccess/hooks/__test__/useManageAccess.test.js +0 -7
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +0 -7
- package/src/screens/Notification/__test__/Notification.test.js +0 -7
- package/src/screens/PlayBackCamera/__test__/index.test.js +0 -1
- package/src/screens/ScriptDetail/__test__/index.test.js +0 -7
- package/src/screens/SelectUnit/__test__/index.test.js +0 -1
- package/src/screens/SetSchedule/__test__/index.test.js +0 -7
- package/src/screens/Sharing/Components/__test__/DeviceItem.test.js +0 -7
- package/src/screens/Sharing/Components/__test__/ItemChangeRole.test.js +0 -7
- package/src/screens/Sharing/Components/__test__/TitleCheckBox.test.js +0 -7
- package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +0 -6
- package/src/screens/Sharing/hooks/__test__/index.test.js +80 -0
- package/src/screens/SmartAccount/ListDevice/__test__/DeviceItem.test.js +0 -7
- package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +0 -6
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +1 -6
- package/src/screens/SmartIr/__test__/SelectBrand.test.js +1 -6
- package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +1 -6
- package/src/screens/SubUnit/AddSubUnit.js +1 -0
- package/src/screens/SubUnit/ManageSubUnit.js +4 -1
- package/src/screens/SubUnit/hooks/__test__/useEmergencyContacts.test.js +34 -0
- package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +0 -7
- package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +0 -7
- package/src/screens/Unit/__test__/AddMenu.test.js +0 -7
- package/src/screens/Unit/__test__/CheckSendEmail.test.js +1 -1
- package/src/screens/Unit/__test__/ChooseLocation.test.js +0 -7
- package/src/screens/Unit/__test__/Detail.test.js +1 -8
- package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +0 -7
- package/src/screens/Unit/__test__/SelectAddress.test.js +0 -7
- package/src/screens/Unit/__test__/SmartAccount.test.js +0 -7
- package/src/screens/Unit/__test__/SmartAccountItem.test.js +0 -7
- package/src/screens/Unit/__test__/Summaries.test.js +0 -7
- package/src/screens/Unit/hook/useUnitConnectRemoteDevices.js +4 -3
- package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +2 -2
- package/src/utils/I18n/translations/en.json +28 -0
- package/src/utils/I18n/translations/vi.json +28 -0
- package/src/utils/Route/index.js +8 -0
|
@@ -23,12 +23,7 @@ jest.mock('@react-navigation/native', () => {
|
|
|
23
23
|
}),
|
|
24
24
|
};
|
|
25
25
|
});
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
...jest.requireActual('react'),
|
|
29
|
-
memo: (x) => x,
|
|
30
|
-
};
|
|
31
|
-
});
|
|
26
|
+
|
|
32
27
|
describe('Test GroupButtonByType', () => {
|
|
33
28
|
let tree;
|
|
34
29
|
it('render GroupButtonByType', async () => {
|
|
@@ -21,12 +21,7 @@ jest.mock('@react-navigation/native', () => {
|
|
|
21
21
|
}),
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
...jest.requireActual('react'),
|
|
27
|
-
memo: (x) => x,
|
|
28
|
-
};
|
|
29
|
-
});
|
|
24
|
+
|
|
30
25
|
describe('Test SelectBrand', () => {
|
|
31
26
|
let tree;
|
|
32
27
|
it('render SelectBrand', async () => {
|
|
@@ -74,7 +74,10 @@ const ManageSubUnit = memo((props) => {
|
|
|
74
74
|
}, [onRefresh, isFocused]);
|
|
75
75
|
|
|
76
76
|
return (
|
|
77
|
-
<View
|
|
77
|
+
<View
|
|
78
|
+
style={styles.wrap}
|
|
79
|
+
accessibilityLabel={AccessibilityLabel.MANAGE_SUB_UNIT}
|
|
80
|
+
>
|
|
78
81
|
<WrapHeaderScrollable
|
|
79
82
|
title={t('manage_sub_unit')}
|
|
80
83
|
headerAniStyle={styles.headerAniStyle}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { act, renderHook } from '@testing-library/react-hooks';
|
|
2
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
3
|
+
import { useEmeragencyContacts } from '../useEmergencyContacts';
|
|
4
|
+
import API from '../../../../configs/API';
|
|
5
|
+
import api from '../../../../utils/Apis/axios';
|
|
6
|
+
|
|
7
|
+
const mock = new MockAdapter(api.axiosInstance);
|
|
8
|
+
|
|
9
|
+
describe('Test useEmergencyContacts', () => {
|
|
10
|
+
it('render useEmergencyContacts listContacts []', async () => {
|
|
11
|
+
const { result } = renderHook(() => useEmeragencyContacts());
|
|
12
|
+
expect(result.current.listContacts).toEqual([]);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('Test useEmergencyContacts getListContacts', async () => {
|
|
16
|
+
const { result } = renderHook(() => useEmeragencyContacts());
|
|
17
|
+
mock
|
|
18
|
+
.onGet(API.EMERGENCY_BUTTON.CONTACTS(), {
|
|
19
|
+
params: {
|
|
20
|
+
group: 1,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
.reply(200, [
|
|
24
|
+
{
|
|
25
|
+
id: 1,
|
|
26
|
+
name: 'contact 1',
|
|
27
|
+
},
|
|
28
|
+
]);
|
|
29
|
+
await act(async () => {
|
|
30
|
+
result.current.getListContacts(1);
|
|
31
|
+
});
|
|
32
|
+
expect(result.current.listContacts).toEqual([{ id: 1, name: 'contact 1' }]);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -7,13 +7,6 @@ import api from '../../../../utils/Apis/axios';
|
|
|
7
7
|
const mockRoute = jest.fn();
|
|
8
8
|
const mock = new MockAdapter(api.axiosInstance);
|
|
9
9
|
|
|
10
|
-
jest.mock('react', () => {
|
|
11
|
-
return {
|
|
12
|
-
...jest.requireActual('react'),
|
|
13
|
-
memo: (x) => x,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
|
|
17
10
|
jest.mock('@react-navigation/native', () => {
|
|
18
11
|
return {
|
|
19
12
|
...jest.requireActual('@react-navigation/native'),
|
|
@@ -30,13 +30,6 @@ jest.mock('@react-navigation/native', () => {
|
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
jest.mock('react', () => {
|
|
34
|
-
return {
|
|
35
|
-
...jest.requireActual('react'),
|
|
36
|
-
memo: (x) => x,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
|
|
40
33
|
const wrapComponent = (route) => (
|
|
41
34
|
<SCProvider initState={mockSCStore({})}>
|
|
42
35
|
<AddLGDevice route={route} />
|
|
@@ -31,13 +31,6 @@ jest.mock('@react-navigation/native', () => {
|
|
|
31
31
|
};
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
jest.mock('react', () => {
|
|
35
|
-
return {
|
|
36
|
-
...jest.requireActual('react'),
|
|
37
|
-
memo: (x) => x,
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
|
|
41
34
|
describe('Test AddMenu Unit', () => {
|
|
42
35
|
let tree;
|
|
43
36
|
it('render AddMenu without route', async () => {
|
|
@@ -26,13 +26,6 @@ jest.mock('@react-navigation/native', () => {
|
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
jest.mock('react', () => {
|
|
30
|
-
return {
|
|
31
|
-
...jest.requireActual('react'),
|
|
32
|
-
memo: (x) => x,
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
|
|
36
29
|
jest.mock('react-native-maps', () => {
|
|
37
30
|
const { forwardRef } = require('react');
|
|
38
31
|
const { View } = require('react-native');
|
|
@@ -25,13 +25,6 @@ const wrapComponent = (route, account) => (
|
|
|
25
25
|
</SCProvider>
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
-
jest.mock('react', () => {
|
|
29
|
-
return {
|
|
30
|
-
...jest.requireActual('react'),
|
|
31
|
-
memo: (x) => x,
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
|
|
35
28
|
jest.mock('react-redux', () => {
|
|
36
29
|
return {
|
|
37
30
|
...jest.requireActual('react-redux'),
|
|
@@ -354,7 +347,7 @@ describe('Test UnitDetail', () => {
|
|
|
354
347
|
el.props.accessibilityLabel ===
|
|
355
348
|
AccessibilityLabel.NAVBAR_MENU_ACTION_MORE
|
|
356
349
|
);
|
|
357
|
-
expect(menu).toHaveLength(
|
|
350
|
+
expect(menu).toHaveLength(4);
|
|
358
351
|
expect(menu[0].props.isVisible).toEqual(true);
|
|
359
352
|
});
|
|
360
353
|
|
|
@@ -30,13 +30,6 @@ jest.mock('@react-navigation/native', () => {
|
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
jest.mock('react', () => {
|
|
34
|
-
return {
|
|
35
|
-
...jest.requireActual('react'),
|
|
36
|
-
memo: (x) => x,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
|
|
40
33
|
describe('Test SelectAddToFavorites', () => {
|
|
41
34
|
let tree, route;
|
|
42
35
|
let dataDevice = [
|
|
@@ -40,13 +40,6 @@ jest.mock('@react-navigation/native', () => {
|
|
|
40
40
|
};
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
jest.mock('react', () => {
|
|
44
|
-
return {
|
|
45
|
-
...jest.requireActual('react'),
|
|
46
|
-
memo: (x) => x,
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
|
|
50
43
|
jest.mock('react-native-maps', () => {
|
|
51
44
|
const { forwardRef } = require('react');
|
|
52
45
|
const { View } = require('react-native');
|
|
@@ -30,13 +30,6 @@ jest.mock('@react-navigation/native', () => {
|
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
jest.mock('react', () => {
|
|
34
|
-
return {
|
|
35
|
-
...jest.requireActual('react'),
|
|
36
|
-
memo: (x) => x,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
|
|
40
33
|
describe('Test SmartAccountItem', () => {
|
|
41
34
|
let tree;
|
|
42
35
|
it('test render SmartAccountItem', async () => {
|
|
@@ -18,13 +18,6 @@ const wrapComponent = (props) => (
|
|
|
18
18
|
</SCProvider>
|
|
19
19
|
);
|
|
20
20
|
|
|
21
|
-
jest.mock('react', () => {
|
|
22
|
-
return {
|
|
23
|
-
...jest.requireActual('react'),
|
|
24
|
-
memo: (x) => x,
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
|
|
28
21
|
const mockedNavigate = jest.fn();
|
|
29
22
|
jest.mock('@react-navigation/native', () => {
|
|
30
23
|
return {
|
|
@@ -11,7 +11,7 @@ export const useUnitConnectRemoteDevices = (unit) => {
|
|
|
11
11
|
(state) => state.app.isNetworkConnected
|
|
12
12
|
);
|
|
13
13
|
const isBluetoothEnabled = useSCContextSelector((state) => {
|
|
14
|
-
return state.
|
|
14
|
+
return state.bluetooth.isEnabled;
|
|
15
15
|
});
|
|
16
16
|
const lqthinqUnitConnected = useSCContextSelector(
|
|
17
17
|
(state) => state.iot.lgthinq.unitConnected
|
|
@@ -20,7 +20,8 @@ export const useUnitConnectRemoteDevices = (unit) => {
|
|
|
20
20
|
|
|
21
21
|
const { connectHomeAssistant } = useHomeAssistantConnection();
|
|
22
22
|
|
|
23
|
-
const { bluetoothScanDevices } =
|
|
23
|
+
const { permissionsGranted: bluetoothPermGranted, bluetoothScanDevices } =
|
|
24
|
+
useBluetoothConnection();
|
|
24
25
|
|
|
25
26
|
let lgThinqConnected = false;
|
|
26
27
|
|
|
@@ -46,7 +47,7 @@ export const useUnitConnectRemoteDevices = (unit) => {
|
|
|
46
47
|
bluetoothScanDevices(unit.remote_control_options.bluetooth);
|
|
47
48
|
}
|
|
48
49
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
|
-
}, [unit, isBluetoothEnabled]);
|
|
50
|
+
}, [unit, isBluetoothEnabled, bluetoothPermGranted]);
|
|
50
51
|
|
|
51
52
|
useEffect(() => {
|
|
52
53
|
if (unit?.remote_control_options?.googlehome && isNetworkConnected) {
|
|
@@ -77,7 +77,7 @@ describe('test RunningDevices', () => {
|
|
|
77
77
|
});
|
|
78
78
|
const instance = tree.root;
|
|
79
79
|
const texts = instance.findAllByType(ItemDevice);
|
|
80
|
-
expect(texts.length).toEqual(
|
|
80
|
+
expect(texts.length).toEqual(1);
|
|
81
81
|
|
|
82
82
|
const button = instance.findAllByType(TouchableOpacity);
|
|
83
83
|
await act(async () => {
|
|
@@ -116,7 +116,7 @@ describe('test RunningDevices', () => {
|
|
|
116
116
|
});
|
|
117
117
|
const instance = tree.root;
|
|
118
118
|
const texts = instance.findAllByType(ItemDevice);
|
|
119
|
-
expect(texts.length).toEqual(
|
|
119
|
+
expect(texts.length).toEqual(1);
|
|
120
120
|
|
|
121
121
|
const button = instance.findAllByType(TouchableOpacity);
|
|
122
122
|
await act(async () => {
|
|
@@ -261,6 +261,8 @@
|
|
|
261
261
|
"camera_rationale_message": "EoH only uses your camera to take photo",
|
|
262
262
|
"photo_rationale_title": "Photo Permission Required",
|
|
263
263
|
"photo_rationale_message": "EoH only uses your photo to upload",
|
|
264
|
+
"bluetooth_rationale_title": "Bluetooth Permission Required",
|
|
265
|
+
"bluetooth_rationale_message": "EoH only uses Bluetooth to scan and control devices",
|
|
264
266
|
"recommendations": "Recommendations",
|
|
265
267
|
"Open windows for more fresh air": "Open windows for more fresh air",
|
|
266
268
|
"notify_new_version_title": "Update available",
|
|
@@ -1050,6 +1052,31 @@
|
|
|
1050
1052
|
"need_add_gateway_before_add_device": "You need to add a new Gateway before adding the device.",
|
|
1051
1053
|
"fail_to_discover_device_wifi": "Fail to discover device wifi",
|
|
1052
1054
|
"try_to_turn_on_device_or_try_again": "Try to turn on device or Try again",
|
|
1055
|
+
"go_to_eoh_web_to_see_firmware": "Go to EoH web to see firmware configuration",
|
|
1056
|
+
"general_information":"General information",
|
|
1057
|
+
"connection_methods": "Connection methods",
|
|
1058
|
+
"delete_gateway":"Delete gateway",
|
|
1059
|
+
"connection_time":"Connection time",
|
|
1060
|
+
"device_id":"Device id",
|
|
1061
|
+
"auth_token":"Auth token",
|
|
1062
|
+
"activate_date":"Activate date",
|
|
1063
|
+
"warranty_expiration_date":"Warranty expiration date",
|
|
1064
|
+
"firmware_version":"Firmware version",
|
|
1065
|
+
"visit_eoh_web_to_set_up_other_connection": "Visit EoH Web to set up other connection options.",
|
|
1066
|
+
"delete_successfully":"Delete successfully!",
|
|
1067
|
+
"message_delete_gateway": "Are you sure you want to delete gateway \"{name}\" ?",
|
|
1068
|
+
"baud_speed": "Baud speed",
|
|
1069
|
+
"zigbee_method": "Zigbee method",
|
|
1070
|
+
"modbus_method": "Modbus method",
|
|
1071
|
+
"delete_device": "Delete device",
|
|
1072
|
+
"device_information": "Device information",
|
|
1073
|
+
"config_name": "Config name",
|
|
1074
|
+
"action_name": "Action name",
|
|
1075
|
+
"control_payload": "Control payload",
|
|
1076
|
+
"key": "Key",
|
|
1077
|
+
"config": "Config",
|
|
1078
|
+
"config_write": "Config write",
|
|
1079
|
+
"config_read": "Config read",
|
|
1053
1080
|
"click_on_box_to_rename_device": "Click on the box to rename your device",
|
|
1054
1081
|
"cannot_connect_to_device_wifi": "Cannot connect to device's wifi",
|
|
1055
1082
|
"try_turn_on_device_or_try_again": "Try turn on device or try again",
|
|
@@ -1064,5 +1091,6 @@
|
|
|
1064
1091
|
"wrong_wifi_password": "Wrong wifi's password",
|
|
1065
1092
|
"fail_add_modbus_device": "Fail to add modbus device",
|
|
1066
1093
|
"fail_add_zigbee_device": "Fail to add zigbee device",
|
|
1094
|
+
"no_zigbee_device_join_timeout": "No zigbee device join network after 2 minutes",
|
|
1067
1095
|
"click_here_to_setup_device": "Click here to setup device"
|
|
1068
1096
|
}
|
|
@@ -296,6 +296,8 @@
|
|
|
296
296
|
"camera_rationale_message": "EoH chỉ sử dụng máy ảnh của bạn",
|
|
297
297
|
"photo_rationale_title": "Yêu cầu cho phép truy cập ảnh",
|
|
298
298
|
"photo_rationale_message": "EoH chỉ sử dụng thư viện ảnh để upload",
|
|
299
|
+
"bluetooth_rationale_title": "Yêu cầu cho phép sử dụng Bluetooth",
|
|
300
|
+
"bluetooth_rationale_message": "EoH sử dụng Bluetooth để quét và điều khiển thiết bị",
|
|
299
301
|
"recommendations": "Đề xuất",
|
|
300
302
|
"Open windows for more fresh air": "Mở cửa sổ để đưa không khí sạch vào nhà",
|
|
301
303
|
"notify_new_version_title": "Có bản cập nhật!",
|
|
@@ -1048,6 +1050,31 @@
|
|
|
1048
1050
|
"need_add_gateway_before_add_device": "Bạn cần thêm mới 1 Gateway trước khi thêm thiết bị.",
|
|
1049
1051
|
"fail_to_discover_device_wifi": "Không phát hiện được wifi của thiết bị",
|
|
1050
1052
|
"try_to_turn_on_device_or_try_again": "Thử bật thiết bị hoặc Thử lại",
|
|
1053
|
+
"go_to_eoh_web_to_see_firmware": "Vào web EoH để xem cấu hình firmware",
|
|
1054
|
+
"general_information":"Thông tin chung",
|
|
1055
|
+
"connection_methods": "Các phương thức kết nối",
|
|
1056
|
+
"delete_gateway":"Xoá cửa ngõ",
|
|
1057
|
+
"connection_time":"Thời gian kết nối",
|
|
1058
|
+
"device_id":"ID thiết bị",
|
|
1059
|
+
"auth_token":"Mã xác thực",
|
|
1060
|
+
"activate_date":"Ngày kích hoạt",
|
|
1061
|
+
"warranty_expiration_date":"Ngày hết hạn bảo hành",
|
|
1062
|
+
"firmware_version":"Phiên bản phần mềm",
|
|
1063
|
+
"visit_eoh_web_to_set_up_other_connection": "Truy cập EoH Web để thiết lập các tùy chọn kết nối khác.",
|
|
1064
|
+
"delete_successfully":"Xoá thành công!",
|
|
1065
|
+
"message_delete_gateway": "Bạn có chắc chắn muốn xóa cổng \"{name}\" không?",
|
|
1066
|
+
"baud_speed": "Tốc độ Baud",
|
|
1067
|
+
"zigbee_method": "Phương thức Zigbee",
|
|
1068
|
+
"modbus_method": "Phương thức Modbus",
|
|
1069
|
+
"delete_device": "Xoá thiết bị",
|
|
1070
|
+
"device_information": "Thông tin thiết bị",
|
|
1071
|
+
"config_name": "Tên cấu hình",
|
|
1072
|
+
"action_name": "Tên hành động",
|
|
1073
|
+
"control_payload": "Điểu khiển khối hàng",
|
|
1074
|
+
"key": "Chìa khoá",
|
|
1075
|
+
"config": "Cấu hình",
|
|
1076
|
+
"config_write": "Cấu hình ghi",
|
|
1077
|
+
"config_read": "Cấu hình đọc",
|
|
1051
1078
|
"click_on_box_to_rename_device": "Nhấp vào ô để đổi tên thiết bị của bạn",
|
|
1052
1079
|
"cannot_connect_to_device_wifi": "Không thể kết nối với wifi của thiết bị",
|
|
1053
1080
|
"try_turn_on_device_or_try_again": "Hãy thử bật thiết bị hoặc thử lại",
|
|
@@ -1062,5 +1089,6 @@
|
|
|
1062
1089
|
"wrong_wifi_password": "Sai mật khẩu wifi",
|
|
1063
1090
|
"fail_add_modbus_device": "Không thêm được thiết bị modbus",
|
|
1064
1091
|
"fail_add_zigbee_device": "Không thêm được thiết bị zigbee",
|
|
1092
|
+
"no_zigbee_device_join_timeout": "Không có thiết bị zigbee nào được thêm vào sau 2 phút",
|
|
1065
1093
|
"click_here_to_setup_device": "Chọn thiết bị thêm vào phòng"
|
|
1066
1094
|
}
|
package/src/utils/Route/index.js
CHANGED
|
@@ -161,6 +161,14 @@ const Routes = {
|
|
|
161
161
|
TemplateDetail: 'TemplateDetail',
|
|
162
162
|
Gateway: 'Gateway',
|
|
163
163
|
GatewayDetail: 'GatewayDetail',
|
|
164
|
+
GatewayInfo: 'GatewayInfo',
|
|
165
|
+
DeviceGatewayInfo: 'DeviceGatewayInfo',
|
|
166
|
+
GatewayConnectionMethods: 'GatewayConnectionMethods',
|
|
167
|
+
DeviceZigbeeDetail: 'DeviceZigbeeDetail',
|
|
168
|
+
DeviceModbusDetail: 'DeviceModbusDetail',
|
|
169
|
+
DetailConfigActionZigbee: 'DetailConfigActionZigbee',
|
|
170
|
+
DetailConfigActionModbus: 'DetailConfigActionModbus',
|
|
171
|
+
DetailChildConfigActionModbus: 'DetailChildConfigActionModbus',
|
|
164
172
|
Smart: 'Smart',
|
|
165
173
|
TemplateStack: 'TemplateStack',
|
|
166
174
|
GatewayStack: 'GatewayStack',
|