@eohjsc/react-native-smart-city 0.2.72 → 0.2.76
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/index.js +2 -1
- package/package.json +2 -2
- package/src/Images/Common/disney.svg +20 -0
- package/src/Images/Common/home.svg +3 -0
- package/src/Images/Common/input.svg +3 -0
- package/src/Images/Common/keyboard_arrow_down.svg +3 -0
- package/src/Images/Common/keyboard_arrow_up.svg +3 -0
- package/src/Images/Common/keyboard_return.svg +3 -0
- package/src/Images/Common/netflix.svg +9 -0
- package/src/Images/Common/pause.svg +3 -0
- package/src/Images/Common/shadowButton.png +0 -0
- package/src/Images/Common/spotify.svg +5 -0
- package/src/Images/Common/volume_up.svg +3 -0
- package/src/Images/Common/youtube.svg +13 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +214 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplateStyles.js +69 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/CircleButton.test.js +129 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/ControlPlay.test.js +138 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/RectangleButton.test.js +110 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/SmartTiviActionTemplate.test.js +144 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +91 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButtonStyles.js +79 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +51 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlayStyles.js +24 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/Icon.js +25 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/RectangleButton.js +49 -0
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/RectangleButtonStyles.js +47 -0
- package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +1 -1
- package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +1 -1
- package/src/commons/ActionGroup/__test__/index.test.js +3 -3
- package/src/commons/ActionGroup/index.js +3 -0
- package/src/commons/ActionTemplate/__test__/index.test.js +2 -2
- package/src/commons/Automate/__test__/ItemAutomate.test.js +1 -1
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +1 -1
- package/src/commons/Device/HistoryChart.js +11 -7
- package/src/commons/Device/HorizontalBarChart.js +2 -1
- package/src/commons/Device/ItemDevice.js +17 -2
- package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +1 -1
- package/src/commons/Device/WindDirection/Compass/Compass.test.js +2 -2
- package/src/commons/Device/__test__/ConnectedViewHeader.test.js +2 -2
- package/src/commons/Device/__test__/DisconnectedView.test.js +5 -5
- package/src/commons/Explore/__test__/HeaderExplore.test.js +1 -1
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +1 -1
- package/src/commons/Modal/__test__/ModalBottom.test.js +2 -2
- package/src/commons/Sharing/__test__/MemberList.test.js +3 -3
- package/src/commons/Sharing/__test__/RowMember.test.js +2 -2
- package/src/commons/SubUnit/Favorites/index.js +32 -1
- package/src/commons/SubUnit/ShortDetail.js +33 -3
- package/src/commons/SubUnit/__test__/Favorites.test.js +1 -0
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +1 -0
- package/src/commons/Today/__test__/Today.test.js +1 -1
- package/src/configs/API.js +4 -0
- package/src/configs/Constants.js +23 -0
- package/src/configs/Images.js +1 -0
- package/src/context/SCContext.tsx +35 -2
- package/src/context/index.ts +6 -1
- package/src/navigations/UnitStack.js +1 -3
- package/src/screens/ActivityLog/__test__/index.test.js +10 -11
- package/src/screens/AddNewAction/Device/__test__/index.test.js +2 -2
- package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +1 -1
- package/src/screens/AddNewGateway/PlugAndPlay/ConnectWifiWarning.js +37 -50
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +1 -1
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/GatewayWifiList.test.js +1 -1
- package/src/screens/AddNewGateway/__test__/ConnectingGateway.test.js +1 -1
- package/src/screens/AddNewGateway/index.js +5 -1
- package/src/screens/ConfirmUnitDeletion/index.js +1 -1
- package/src/screens/Device/EditDevice/index.js +1 -1
- package/src/screens/Device/EditDevice/styles/EditDeviceStyles.js +2 -0
- package/src/screens/Notification/Monitor.js +12 -0
- package/src/screens/Notification/components/NotificationItem.js +11 -0
- package/src/screens/Notification/index.js +8 -0
- package/src/screens/PlayBackCamera/__test__/index.test.js +1 -1
- package/src/screens/Unit/Detail.js +2 -2
- package/src/screens/Unit/ManageUnit.js +9 -6
- package/src/screens/Unit/__test__/Detail.test.js +7 -1
- package/src/screens/Unit/components/MyUnitDevice/index.js +4 -1
- package/src/screens/Unit/components/__test__/Header.test.js +5 -5
- package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
- package/src/screens/UnitSummary/components/PowerConsumption/index.js +4 -2
- package/src/utils/I18n/translations/en.json +3 -1
- package/src/utils/I18n/translations/vi.json +3 -1
- package/src/utils/Pusher/index.js +36 -0
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"text_poor_level": "Kém",
|
|
233
233
|
"text_very_poor_level": "Rất kém",
|
|
234
234
|
"text_clo_low_range": "< 0.2 mg/l",
|
|
235
|
-
"text_clo_good_range": "
|
|
235
|
+
"text_clo_good_range": "0.2 - 0.5 mg/l",
|
|
236
236
|
"text_clo_high_range": "> 0.5 mg/l",
|
|
237
237
|
"turbidity_guide": "Độ đục",
|
|
238
238
|
"what_is_turbidity": "Độ đục của nước là gì?",
|
|
@@ -679,6 +679,7 @@
|
|
|
679
679
|
"text_notification_content_remove_unit_to_owner": "Địa điểm **%{unit_name}** vừa được xoá thành công.",
|
|
680
680
|
"text_notification_content_remove_unit_to_member": "Địa điểm **%{unit_name}** vừa được xoá bởi **%{unit_owner_name}**. Bạn không thể truy cập vào địa điểm này được nữa.",
|
|
681
681
|
"text_notification_content_remove_member": "Bạn vừa được xoá khỏi **%{unit_name}** bởi **%{unit_owner_name}**. Bạn không thể truy cập vào địa điểm này được nữa.",
|
|
682
|
+
"text_notification_content_member_leave_unit": "**%{member_name}** vừa rời khỏi **%{unit_name}**.",
|
|
682
683
|
"this_spot_does_not_exsit": "Vị trí đỗ này không tồn tại",
|
|
683
684
|
"please_scan_again_or_contact_the_parking_manager": "Vui lòng quét lại hoặc liên hệ với người quản lý bãi đậu xe",
|
|
684
685
|
"this_spot_does_not_support_to_scan": "Vị trí đỗ này không hỗ trợ quét",
|
|
@@ -754,6 +755,7 @@
|
|
|
754
755
|
"modbus_fail": "Modbus failrate",
|
|
755
756
|
"rssi_node": "RSSI Node",
|
|
756
757
|
"please_add_your_phone_number_and_chip_name": "Vui lòng thêm số điện thoại và tên chip của bạn",
|
|
758
|
+
"Please_add_gateway_name" : "Vui lòng thêm tên gateway",
|
|
757
759
|
"phone_number_of_data_sim": "Số điện thoại của dữ liệu sim",
|
|
758
760
|
"select_a_sub_unit": "Lựa chọn một khu vực mà bạn muốn thêm gateway",
|
|
759
761
|
"all_camera": "All Cameras",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { API } from '../../configs';
|
|
2
|
+
import Pusher from 'pusher-js/react-native';
|
|
3
|
+
import { SCConfig } from '../../configs/SCConfig';
|
|
4
|
+
import { axiosPost } from '../../utils/Apis/axios';
|
|
5
|
+
|
|
6
|
+
Pusher.logToConsole = true;
|
|
7
|
+
let pusher = null;
|
|
8
|
+
|
|
9
|
+
export const getPusher = () => {
|
|
10
|
+
if (!pusher) {
|
|
11
|
+
pusher = new Pusher(SCConfig.pusherAppKey, {
|
|
12
|
+
cluster: SCConfig.pusherAppCluste,
|
|
13
|
+
authorizer: function (channel, option) {
|
|
14
|
+
return {
|
|
15
|
+
// eslint-disable-next-line promise/prefer-await-to-callbacks
|
|
16
|
+
authorize: async function (socketId, callback) {
|
|
17
|
+
const { success, data } = await axiosPost(API.PUSHER.AUTH(), {
|
|
18
|
+
channel_name: channel.name,
|
|
19
|
+
socket_id: socketId,
|
|
20
|
+
});
|
|
21
|
+
if (success) {
|
|
22
|
+
// eslint-disable-next-line promise/prefer-await-to-callbacks
|
|
23
|
+
callback(null, data);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return pusher;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const destroyPusher = () => {
|
|
34
|
+
pusher.disconnect();
|
|
35
|
+
pusher = null;
|
|
36
|
+
};
|