@ledvance/group-ui-biz-bundle 1.0.109 → 1.0.110
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 +1 -1
- package/src/modules/biorhythm/BiorhythmPage.tsx +3 -2
- package/src/modules/childLock/ChildLockPage.tsx +4 -4
- package/src/modules/diyScene/DiyScenePage.tsx +3 -3
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +4 -4
- package/src/modules/fixedTimingForLight/FixedTimingForLightPage.tsx +7 -7
- package/src/modules/flags/FlagPage.tsx +16 -17
- package/src/modules/lightMode/LightModePage.tsx +3 -3
- package/src/modules/mood/MoodPage.tsx +2 -3
- package/src/modules/mood_new/MoodPage.tsx +22 -21
- package/src/modules/music/MusicPage.tsx +15 -15
- package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +3 -3
- package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +5 -5
- package/src/modules/randomTimingForLight/RandomTimingForLightPage.tsx +7 -7
- package/src/modules/remoteSwitch/RemoteSwitchPage.tsx +4 -4
- package/src/modules/sleepWakeUp/SleepWakeUpPage.tsx +28 -14
- package/src/modules/switchGradient/SwitchGradientPage.tsx +5 -5
- package/src/modules/swithInching/SwithInching.tsx +3 -3
- package/src/modules/timeSchedule/TimeSchedulePage.tsx +13 -18
- package/src/modules/timer/TimerPage.tsx +10 -10
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ import pIdList from './pIdList'
|
|
|
17
17
|
import {
|
|
18
18
|
useDeviceInfo,
|
|
19
19
|
useGroupDevices,
|
|
20
|
-
useSystemTimeFormate,
|
|
20
|
+
useSystemTimeFormate, useUAGroupInfo,
|
|
21
21
|
} from '@ledvance/base/src/models/modules/NativePropsSlice'
|
|
22
22
|
import I18n from '@ledvance/base/src/i18n'
|
|
23
23
|
import res from '@ledvance/base/src/res'
|
|
@@ -60,6 +60,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
60
60
|
const params = useParams<BiorhythmPageParams>()
|
|
61
61
|
const [biorhythm, setBiorhythm] = useBiorhythm()
|
|
62
62
|
const deviceInfo = useDeviceInfo()
|
|
63
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
63
64
|
const [groupDevices] = useGroupDevices()
|
|
64
65
|
const is24Hour = useSystemTimeFormate()
|
|
65
66
|
const { productId } = deviceInfo
|
|
@@ -245,7 +246,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
245
246
|
|
|
246
247
|
return (
|
|
247
248
|
<Page
|
|
248
|
-
backText={
|
|
249
|
+
backText={uaGroupInfo.name}
|
|
249
250
|
onBackClick={navigation.goBack}
|
|
250
251
|
headlineText={I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
251
252
|
headlineIconContent={<Switch
|
|
@@ -2,9 +2,9 @@ import React from 'react'
|
|
|
2
2
|
import {Utils} from "tuya-panel-kit";
|
|
3
3
|
import Page from "@ledvance/base/src/components/Page";
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n/index";
|
|
5
|
-
import {
|
|
5
|
+
import {useFeatureHook, useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
6
6
|
import {useReactive} from "ahooks";
|
|
7
|
-
import {
|
|
7
|
+
import {Image, StyleSheet, Text, View} from "react-native";
|
|
8
8
|
import {Result} from "@ledvance/base/src/models/modules/Result";
|
|
9
9
|
import res from "@ledvance/base/src/res";
|
|
10
10
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
@@ -23,7 +23,7 @@ export function useChildLock(): [boolean, (v: boolean, extraDps?: any, extraConf
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const ChildLockPage = (props: { theme?: ThemeType }) => {
|
|
26
|
-
const
|
|
26
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
27
27
|
const [childLock, setChildLock] = useChildLock()
|
|
28
28
|
const state = useReactive({
|
|
29
29
|
loading: false
|
|
@@ -44,7 +44,7 @@ const ChildLockPage = (props: { theme?: ThemeType }) => {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
return (<Page
|
|
47
|
-
backText={
|
|
47
|
+
backText={uaGroupInfo.name}
|
|
48
48
|
headlineText={I18n.getLang('sockets_specific_settings_child_lock')}
|
|
49
49
|
loading={state.loading}>
|
|
50
50
|
<View style={styles.tipInfoContainer}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useCallback, useEffect, useMemo} from 'react';
|
|
2
2
|
import Page from '@ledvance/base/src/components/Page';
|
|
3
3
|
import {Utils} from 'tuya-panel-kit';
|
|
4
|
-
import {
|
|
4
|
+
import {useUAGroupInfo} from '@ledvance/base/src/models/modules/NativePropsSlice';
|
|
5
5
|
import {useReactive, useUpdateEffect} from 'ahooks';
|
|
6
6
|
import I18n from '@ledvance/base/src/i18n';
|
|
7
7
|
import res from '@ledvance/base/src/res';
|
|
@@ -33,7 +33,7 @@ const { withTheme } = Utils.ThemeUtils
|
|
|
33
33
|
const MAX_MOOD_COUNT = 255;
|
|
34
34
|
|
|
35
35
|
const DiyScenePage = (props: { theme?: ThemeType }) => {
|
|
36
|
-
const
|
|
36
|
+
const uaGroupInfo = useUAGroupInfo();
|
|
37
37
|
const [switchLed] = useSwitchLed()
|
|
38
38
|
const [workMode, setWorkMode] = useWorkMode()
|
|
39
39
|
const [sceneStatusId, setSceneStatus] = useSceneStatus()
|
|
@@ -194,7 +194,7 @@ const DiyScenePage = (props: { theme?: ThemeType }) => {
|
|
|
194
194
|
return (
|
|
195
195
|
<>
|
|
196
196
|
<Page
|
|
197
|
-
backText={
|
|
197
|
+
backText={uaGroupInfo.name}
|
|
198
198
|
headlineText={I18n.getLang('mood_overview_headline_text')}
|
|
199
199
|
headlineIcon={state.originScenes.length < MAX_MOOD_COUNT ? res.add : undefined}
|
|
200
200
|
onHeadlineIconClick={() => {
|
|
@@ -4,13 +4,13 @@ import {useNavigation, useRoute} from '@react-navigation/native'
|
|
|
4
4
|
import Page from "@ledvance/base/src/components/Page";
|
|
5
5
|
import I18n from "@ledvance/base/src/i18n";
|
|
6
6
|
import res from "@ledvance/base/src/res";
|
|
7
|
-
import {
|
|
7
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
8
8
|
import {FixedTimeItem, FixedTimeParam, useFixedTime} from "./FixedTimeForPlugActon";
|
|
9
9
|
import {useReactive} from "ahooks";
|
|
10
10
|
import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
11
11
|
import {cloneDeep} from "lodash";
|
|
12
12
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
13
|
-
import {
|
|
13
|
+
import {Dialog, Utils} from "tuya-panel-kit";
|
|
14
14
|
import ItemCard from "./ItemCard";
|
|
15
15
|
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
16
16
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
@@ -21,7 +21,7 @@ const { withTheme } = Utils.ThemeUtils
|
|
|
21
21
|
const MAX_NUM = 10
|
|
22
22
|
|
|
23
23
|
const FixedTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
24
|
-
const
|
|
24
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
25
25
|
const navigation = useNavigation()
|
|
26
26
|
const params = useRoute().params as FixedTimeParam
|
|
27
27
|
const [fixedTimeList, setFixedTimeList] = useFixedTime()
|
|
@@ -209,7 +209,7 @@ const FixedTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
|
209
209
|
|
|
210
210
|
return (
|
|
211
211
|
<Page
|
|
212
|
-
backText={
|
|
212
|
+
backText={uaGroupInfo.name}
|
|
213
213
|
onBackClick={() => navigation.goBack()}
|
|
214
214
|
headlineText={I18n.getLang('fixedTimeCycle_socket_headline')}
|
|
215
215
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Page from "@ledvance/base/src/components/Page";
|
|
2
|
-
import {
|
|
2
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
3
3
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n/index";
|
|
5
5
|
import res from "@ledvance/base/src/res/index";
|
|
6
6
|
import {useReactive} from "ahooks";
|
|
7
7
|
import React, {useCallback, useMemo} from "react";
|
|
8
8
|
import {FlatList, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View} from "react-native";
|
|
9
|
-
import {
|
|
9
|
+
import {Dialog, Utils} from "tuya-panel-kit";
|
|
10
10
|
import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
11
11
|
import {FixedTimingItem, FixedTimingParam, useFixedTiming} from "./FixedTimingForLightAction";
|
|
12
12
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
@@ -14,14 +14,14 @@ import ItemCard from "./ItemCard";
|
|
|
14
14
|
import {cloneDeep} from "lodash";
|
|
15
15
|
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
16
16
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
17
|
-
import {
|
|
17
|
+
import {isConflictTask, showDialog} from "@ledvance/base/src/utils/common";
|
|
18
18
|
|
|
19
19
|
const {convertX: cx, topBarHeight} = Utils.RatioUtils;
|
|
20
20
|
const { withTheme } = Utils.ThemeUtils
|
|
21
21
|
const MAX_NUM = 4
|
|
22
22
|
|
|
23
23
|
const FixedTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
24
|
-
const
|
|
24
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
25
25
|
const navigation = useNavigation()
|
|
26
26
|
const params = useRoute().params as FixedTimingParam
|
|
27
27
|
const [fixedTimingList, setFixedTimingList] = useFixedTiming()
|
|
@@ -155,9 +155,9 @@ const FixedTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
155
155
|
subTitle: I18n.getLang('cancel_dialog_delete_item_fixedtimecycle_description'),
|
|
156
156
|
onConfirm: async (_, {close}) => {
|
|
157
157
|
close()
|
|
158
|
-
state.loading = true
|
|
158
|
+
state.loading = true
|
|
159
159
|
await onPost('del', item)
|
|
160
|
-
state.loading = false
|
|
160
|
+
state.loading = false
|
|
161
161
|
}
|
|
162
162
|
})
|
|
163
163
|
}}
|
|
@@ -213,7 +213,7 @@ const FixedTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
213
213
|
}
|
|
214
214
|
return (
|
|
215
215
|
<Page
|
|
216
|
-
backText={
|
|
216
|
+
backText={uaGroupInfo.name}
|
|
217
217
|
headlineText={I18n.getLang('fixedTimeCycle_socket_headline')}
|
|
218
218
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
219
219
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {useEffect} from "react";
|
|
2
2
|
import Page from "@ledvance/base/src/components/Page";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import {useFlags, useGroupDp, useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
4
|
+
import {FlatList, Image, TouchableOpacity, View} from "react-native";
|
|
5
5
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
6
|
-
import {
|
|
6
|
+
import {Utils} from "tuya-panel-kit";
|
|
7
7
|
import FlagItem from "./FlagItem";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import {def2Pids, def3Pids, FlagUiInfo} from "./FlagInfo";
|
|
9
|
+
import {getRemoteFlag, saveFlag, useFlag, useFlagMode, useWorkMode} from "./FlagActions";
|
|
10
|
+
import {useNavigation} from '@react-navigation/core'
|
|
11
11
|
import I18n from "@ledvance/base/src/i18n";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import {useReactive, useUpdateEffect} from "ahooks";
|
|
13
|
+
import {cloneDeep, difference, last, map, range} from "lodash";
|
|
14
|
+
import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
15
15
|
import res from "@ledvance/base/src/res";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import {hsv2Hex} from "@ledvance/base/src/utils";
|
|
17
|
+
import {SceneNodeTransitionMode} from "../mood/SceneInfo";
|
|
18
18
|
import TextField from "@ledvance/base/src/components/TextField";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
19
|
+
import {useParams} from "@ledvance/base/src/hooks/Hooks";
|
|
20
|
+
import {WorkMode} from "@ledvance/base/src/utils/interface";
|
|
21
|
+
import {showDialog} from "@ledvance/base/src/utils/common";
|
|
22
22
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
23
23
|
|
|
24
24
|
const cx = Utils.RatioUtils.convertX
|
|
@@ -38,7 +38,6 @@ export interface FlagPageProps {
|
|
|
38
38
|
|
|
39
39
|
const FlagPage = (props: { theme?: ThemeType }) => {
|
|
40
40
|
const params = useParams<FlagPageProps>()
|
|
41
|
-
const devInfo = useDeviceInfo()
|
|
42
41
|
const uaGroupInfo = useUAGroupInfo()
|
|
43
42
|
const navigation = useNavigation()
|
|
44
43
|
const [switch_led] = useGroupDp<boolean>(params.switchLedCode)
|
|
@@ -136,7 +135,7 @@ const FlagPage = (props: { theme?: ThemeType }) => {
|
|
|
136
135
|
return (
|
|
137
136
|
<Page
|
|
138
137
|
headlineText={I18n.getLang('Feature_devicepanel_flags')}
|
|
139
|
-
backText={
|
|
138
|
+
backText={uaGroupInfo.name}
|
|
140
139
|
headlineIcon={res.add}
|
|
141
140
|
onHeadlineIconClick={() => {
|
|
142
141
|
const useIds = map([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {PropsWithChildren} from 'react'
|
|
2
2
|
import {Image, ScrollView, StyleSheet, Text, TouchableOpacity, View, ViewProps} from 'react-native'
|
|
3
3
|
import Page from '@ledvance/base/src/components/Page'
|
|
4
|
-
import {useDeviceInfo, useFeatureHook} from '@ledvance/base/src/models/modules/NativePropsSlice'
|
|
4
|
+
import {useDeviceInfo, useFeatureHook, useUAGroupInfo} from '@ledvance/base/src/models/modules/NativePropsSlice'
|
|
5
5
|
import I18n from '@ledvance/base/src/i18n'
|
|
6
6
|
import {Utils} from 'tuya-panel-kit'
|
|
7
7
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
@@ -30,7 +30,7 @@ export function useLightMode(): [LightMode, (v: LightMode) => Promise<Result<any
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const LightModePage = (props: { theme?: ThemeType }) => {
|
|
33
|
-
const
|
|
33
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
34
34
|
const [lightMode, setLightMode] = useLightMode()
|
|
35
35
|
|
|
36
36
|
const state = useReactive({
|
|
@@ -110,7 +110,7 @@ const LightModePage = (props: { theme?: ThemeType }) => {
|
|
|
110
110
|
|
|
111
111
|
return (
|
|
112
112
|
<Page
|
|
113
|
-
backText={
|
|
113
|
+
backText={uaGroupInfo.name}
|
|
114
114
|
headlineText={I18n.getLang('matterplug_LED')}
|
|
115
115
|
loading={state.loading}>
|
|
116
116
|
<ScrollView style={styles.root} nestedScrollEnabled={true}>
|
|
@@ -4,7 +4,7 @@ import {Utils} from 'tuya-panel-kit'
|
|
|
4
4
|
import {SceneMode, ScenePageUIState, SceneUIState, StripSceneUIState} from './SceneInfo'
|
|
5
5
|
import {getRemoteSceneList, saveScene, useGroupDpScene, useScene, useSwitchLed, useWorkMode} from './SceneAction'
|
|
6
6
|
import {WorkMode} from '@ledvance/base/src/utils/interface'
|
|
7
|
-
import {
|
|
7
|
+
import {useFlagMode, useMoods, useUAGroupInfo} from '@ledvance/base/src/models/modules/NativePropsSlice'
|
|
8
8
|
import {useReactive} from 'ahooks'
|
|
9
9
|
import Strings from '@ledvance/base/src/i18n'
|
|
10
10
|
import res from '@ledvance/base/src/res'
|
|
@@ -52,7 +52,6 @@ const MoodPage = () => {
|
|
|
52
52
|
const params: MoodPageProps = {
|
|
53
53
|
...routeParams,
|
|
54
54
|
}
|
|
55
|
-
const deviceInfo = useDeviceInfo()
|
|
56
55
|
const uaGroupInfo = useUAGroupInfo()
|
|
57
56
|
const navigation = useNavigation()
|
|
58
57
|
const groupDpScene = useGroupDpScene({
|
|
@@ -256,7 +255,7 @@ const MoodPage = () => {
|
|
|
256
255
|
return (
|
|
257
256
|
<>
|
|
258
257
|
<Page
|
|
259
|
-
backText={
|
|
258
|
+
backText={uaGroupInfo.name}
|
|
260
259
|
headlineText={Strings.getLang('mood_overview_headline_text')}
|
|
261
260
|
headlineIcon={state.scenes.length < MAX_MOOD_COUNT ? res.add : undefined}
|
|
262
261
|
onHeadlineIconClick={() => {
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {useCallback, useEffect, useMemo} from 'react';
|
|
2
2
|
import Page from '@ledvance/base/src/components/Page';
|
|
3
|
-
import {
|
|
4
|
-
import { saveMoodList, useRgbicWorkMode, useSwitchLed, useWorkMode } from './MoodActions';
|
|
3
|
+
import {Utils} from 'tuya-panel-kit';
|
|
5
4
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
getRemoteMoodList,
|
|
6
|
+
saveMoodList,
|
|
7
|
+
useMoodScene,
|
|
8
|
+
useRgbicWorkMode,
|
|
9
|
+
useSwitchLed,
|
|
10
|
+
useWorkMode
|
|
11
|
+
} from './MoodActions';
|
|
12
|
+
import {useMoods, useUAGroupInfo,} from '@ledvance/base/src/models/modules/NativePropsSlice';
|
|
13
|
+
import {useReactive} from 'ahooks';
|
|
11
14
|
import Strings from '@ledvance/base/src/i18n';
|
|
15
|
+
import I18n from '@ledvance/base/src/i18n';
|
|
12
16
|
import res from '@ledvance/base/src/res';
|
|
13
|
-
import {
|
|
17
|
+
import {FlatList, Image, Platform, StyleSheet, TouchableOpacity, View} from 'react-native';
|
|
14
18
|
import Tag from '@ledvance/base/src/components/Tag';
|
|
15
19
|
import Spacer from '@ledvance/base/src/components/Spacer';
|
|
16
20
|
import InfoText from '@ledvance/base/src/components/InfoText';
|
|
17
21
|
import CustomListDialog from '@ledvance/base/src/components/CustomListDialog';
|
|
18
22
|
import MoodItem from './MoodItem';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { WorkMode } from '@ledvance/base/src/utils/interface';
|
|
23
|
+
import {useNavigation} from '@react-navigation/core';
|
|
24
|
+
import {MoodPageParams, MoodPageState, MoodUIInfo} from './Interface';
|
|
25
|
+
import {useParams} from '@ledvance/base/src/hooks/Hooks';
|
|
26
|
+
import {ui_biz_routerKey} from '../../navigation/Routers'
|
|
27
|
+
import {cloneDeep, filter, map} from 'lodash';
|
|
28
|
+
import {useFlagMode} from '../flags/FlagActions';
|
|
29
|
+
import {WorkMode} from '@ledvance/base/src/utils/interface';
|
|
27
30
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
28
|
-
import {
|
|
29
|
-
import I18n from '@ledvance/base/src/i18n';
|
|
31
|
+
import {showDialog} from '@ledvance/base/src/utils/common';
|
|
30
32
|
|
|
31
33
|
const cx = Utils.RatioUtils.convertX;
|
|
32
34
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -35,7 +37,6 @@ const MAX_MOOD_COUNT = 255;
|
|
|
35
37
|
|
|
36
38
|
const MoodPage = (props: {theme?: ThemeType}) => {
|
|
37
39
|
const params = useParams<MoodPageParams>();
|
|
38
|
-
const deviceInfo = useDeviceInfo();
|
|
39
40
|
const uaGroupInfo = useUAGroupInfo()
|
|
40
41
|
const navigation = useNavigation();
|
|
41
42
|
const [moodInfo, setMoodInfo] = useMoodScene(params);
|
|
@@ -285,7 +286,7 @@ const MoodPage = (props: {theme?: ThemeType}) => {
|
|
|
285
286
|
return (
|
|
286
287
|
<>
|
|
287
288
|
<Page
|
|
288
|
-
backText={
|
|
289
|
+
backText={uaGroupInfo.name}
|
|
289
290
|
headlineText={Strings.getLang('mood_overview_headline_text')}
|
|
290
291
|
headlineIcon={state.originMoods.length < MAX_MOOD_COUNT ? res.add : undefined}
|
|
291
292
|
onHeadlineIconClick={() => {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { StyleSheet,
|
|
3
|
-
import {
|
|
2
|
+
import {Image, StyleSheet, Text, View} from 'react-native'
|
|
3
|
+
import {useNavigation} from '@react-navigation/core'
|
|
4
4
|
import Page from '@ledvance/base/src/components/Page'
|
|
5
|
-
import {
|
|
5
|
+
import {putGroupTYDps, useGroupDp, useUAGroupInfo} from '@ledvance/base/src/models/modules/NativePropsSlice'
|
|
6
6
|
import I18n from '@ledvance/base/src/i18n'
|
|
7
7
|
import Img from './res'
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import {useDreamMusicData} from './MusicActions'
|
|
9
|
+
import {useReactive, useUpdateEffect} from 'ahooks'
|
|
10
|
+
import {musicTabs} from './MusicDataBean'
|
|
11
|
+
import {SwitchButton, TabBar, Utils} from 'tuya-panel-kit'
|
|
12
12
|
import * as MusicManager from './MusicManager'
|
|
13
13
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
14
14
|
import LdvSlider from '@ledvance/base/src/components/ldvSlider'
|
|
15
15
|
import TextFieldStyleButton from '@ledvance/base/src/components/TextFieldStyleButton'
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
16
|
+
import {SelectPageParams} from '../select/SelectPage'
|
|
17
|
+
import {ui_biz_routerKey} from '../../navigation/Routers'
|
|
18
|
+
import {cloneDeep} from 'lodash'
|
|
19
|
+
import {useParams} from '@ledvance/base/src/hooks/Hooks'
|
|
20
|
+
import {ColorParser} from '@ledvance/base/src/utils/ColorParser'
|
|
21
|
+
import {WorkMode} from '@ledvance/base/src/utils/interface'
|
|
22
22
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
23
23
|
|
|
24
24
|
const { convertX: cx } = Utils.RatioUtils
|
|
@@ -35,7 +35,7 @@ export interface MusicPageParams {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const MusicPage = (props: { theme?: ThemeType }) => {
|
|
38
|
-
const
|
|
38
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
39
39
|
const tyGroupId = useUAGroupInfo().tyGroupId
|
|
40
40
|
const params = useParams<MusicPageParams>()
|
|
41
41
|
const navigation = useNavigation()
|
|
@@ -120,7 +120,7 @@ const MusicPage = (props: { theme?: ThemeType }) => {
|
|
|
120
120
|
|
|
121
121
|
return (
|
|
122
122
|
<Page
|
|
123
|
-
backText={
|
|
123
|
+
backText={uaGroupInfo.name}
|
|
124
124
|
headlineText={I18n.getLang('devicemusic_headline_text')}
|
|
125
125
|
>
|
|
126
126
|
<View style={styles.content}>
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import {Utils} from "tuya-panel-kit";
|
|
3
3
|
import Page from "@ledvance/base/src/components/Page";
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n/index";
|
|
5
|
-
import {
|
|
5
|
+
import {useFeatureHook, useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
6
6
|
import {useReactive} from "ahooks";
|
|
7
7
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
8
8
|
import {StyleSheet, Text} from "react-native";
|
|
@@ -23,7 +23,7 @@ export function useOverchargeSwitch(): [boolean, (v: boolean) => Promise<Result<
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const OverchargeSwitchPage = (props: { theme?: ThemeType }) => {
|
|
26
|
-
const
|
|
26
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
27
27
|
const [overchargeSwitch, setOverchargeSwitch] = useOverchargeSwitch()
|
|
28
28
|
const state = useReactive({
|
|
29
29
|
loading: false
|
|
@@ -41,7 +41,7 @@ const OverchargeSwitchPage = (props: { theme?: ThemeType }) => {
|
|
|
41
41
|
})
|
|
42
42
|
|
|
43
43
|
return (<Page
|
|
44
|
-
backText={
|
|
44
|
+
backText={uaGroupInfo.name}
|
|
45
45
|
loading={state.loading}>
|
|
46
46
|
<Spacer height={cx(24)}/>
|
|
47
47
|
<Card style={{marginHorizontal: cx(24)}}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Page from "@ledvance/base/src/components/Page";
|
|
2
|
-
import {
|
|
2
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
3
3
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n/index";
|
|
5
5
|
import res from "@ledvance/base/src/res/index";
|
|
@@ -14,14 +14,14 @@ import ItemCard from "./ItemCard";
|
|
|
14
14
|
import {cloneDeep} from "lodash";
|
|
15
15
|
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
16
16
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
17
|
-
import {
|
|
17
|
+
import {isConflictTask, showDialog} from "@ledvance/base/src/utils/common";
|
|
18
18
|
|
|
19
19
|
const {convertX: cx, topBarHeight} = Utils.RatioUtils;
|
|
20
20
|
const { withTheme } = Utils.ThemeUtils
|
|
21
21
|
const MAX_NUM = 16
|
|
22
22
|
|
|
23
23
|
const RandomTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
24
|
-
const
|
|
24
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
25
25
|
const navigation = useNavigation()
|
|
26
26
|
const params = useRoute().params as RandomTimeParam
|
|
27
27
|
const [randomTimeList, setRandomTimeList] = useRandomTime()
|
|
@@ -166,7 +166,7 @@ const RandomTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
|
166
166
|
close()
|
|
167
167
|
state.loading = true
|
|
168
168
|
await onPost('del', item)
|
|
169
|
-
state.loading = false
|
|
169
|
+
state.loading = false
|
|
170
170
|
}
|
|
171
171
|
})
|
|
172
172
|
}}
|
|
@@ -213,7 +213,7 @@ const RandomTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
|
213
213
|
}
|
|
214
214
|
return (
|
|
215
215
|
<Page
|
|
216
|
-
backText={
|
|
216
|
+
backText={uaGroupInfo.name}
|
|
217
217
|
headlineText={I18n.getLang('randomtimecycle_sockets_headline_text')}
|
|
218
218
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
219
219
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Page from "@ledvance/base/src/components/Page";
|
|
2
|
-
import {
|
|
2
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
3
3
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n/index";
|
|
5
5
|
import res from "@ledvance/base/src/res/index";
|
|
6
6
|
import {useReactive} from "ahooks";
|
|
7
7
|
import React, {useCallback, useMemo} from "react";
|
|
8
8
|
import {FlatList, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View} from "react-native";
|
|
9
|
-
import {
|
|
9
|
+
import {Dialog, Utils} from "tuya-panel-kit";
|
|
10
10
|
import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
11
11
|
import {RandomTimingItem, RandomTimingParam, useRandomTiming} from "./RandomTimingForLightAction";
|
|
12
12
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
@@ -14,14 +14,14 @@ import ItemCard from "./ItemCard";
|
|
|
14
14
|
import {cloneDeep} from "lodash";
|
|
15
15
|
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
16
16
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
17
|
-
import {
|
|
17
|
+
import {isConflictTask, showDialog} from "@ledvance/base/src/utils/common";
|
|
18
18
|
|
|
19
19
|
const {convertX: cx, topBarHeight} = Utils.RatioUtils;
|
|
20
20
|
const { withTheme } = Utils.ThemeUtils
|
|
21
21
|
const MAX_NUM = 4
|
|
22
22
|
|
|
23
23
|
const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
24
|
-
const
|
|
24
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
25
25
|
const navigation = useNavigation()
|
|
26
26
|
const params = useRoute().params as RandomTimingParam
|
|
27
27
|
const [randomTimingList, setRandomTimingList] = useRandomTiming()
|
|
@@ -76,7 +76,7 @@ const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
76
76
|
state.loading = false
|
|
77
77
|
},
|
|
78
78
|
onCancel: () => {
|
|
79
|
-
state.loading = false
|
|
79
|
+
state.loading = false
|
|
80
80
|
Dialog.close()
|
|
81
81
|
}
|
|
82
82
|
})
|
|
@@ -169,7 +169,7 @@ const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
169
169
|
close()
|
|
170
170
|
state.loading = true
|
|
171
171
|
await onPost('del', item)
|
|
172
|
-
state.loading = false
|
|
172
|
+
state.loading = false
|
|
173
173
|
}
|
|
174
174
|
})
|
|
175
175
|
}}
|
|
@@ -217,7 +217,7 @@ const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
217
217
|
}
|
|
218
218
|
return (
|
|
219
219
|
<Page
|
|
220
|
-
backText={
|
|
220
|
+
backText={uaGroupInfo.name}
|
|
221
221
|
headlineText={I18n.getLang('randomtimecycle_sockets_headline_text')}
|
|
222
222
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
223
223
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
@@ -2,11 +2,11 @@ import React from 'react'
|
|
|
2
2
|
import {SwitchButton, Utils} from "tuya-panel-kit";
|
|
3
3
|
import Page from "@ledvance/base/src/components/Page";
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n/index";
|
|
5
|
-
import {
|
|
5
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
6
6
|
import {useReactive} from "ahooks";
|
|
7
7
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
8
8
|
import {useRemoteSwitch} from "./RemoteSwitchAction";
|
|
9
|
-
import {
|
|
9
|
+
import {StyleSheet, Text, View} from "react-native";
|
|
10
10
|
import {showDialog} from "@ledvance/base/src/utils/common";
|
|
11
11
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ const { convertX: cx } = Utils.RatioUtils
|
|
|
14
14
|
const { withTheme } = Utils.ThemeUtils
|
|
15
15
|
|
|
16
16
|
const RemoteSwitchPage = (props: { theme?: ThemeType }) => {
|
|
17
|
-
const
|
|
17
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
18
18
|
const [remoteSwitch, setRemoteSwitch] = useRemoteSwitch()
|
|
19
19
|
const state = useReactive({
|
|
20
20
|
loading: false
|
|
@@ -55,7 +55,7 @@ const RemoteSwitchPage = (props: { theme?: ThemeType }) => {
|
|
|
55
55
|
})
|
|
56
56
|
|
|
57
57
|
return (<Page
|
|
58
|
-
backText={
|
|
58
|
+
backText={uaGroupInfo.name}
|
|
59
59
|
loading={state.loading}>
|
|
60
60
|
<View style={[styles.titleBGView, styles.shadow]}>
|
|
61
61
|
<Text style={styles.title}>{I18n.getLang('light_sources_specific_settings_remote_control')}</Text>
|
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
1
|
+
import React, {useCallback, useEffect, useMemo} from "react";
|
|
2
|
+
import {FlatList, Image, StyleSheet, Text, View} from 'react-native'
|
|
3
3
|
import Page from '@ledvance/base/src/components/Page'
|
|
4
4
|
import Tag from '@ledvance/base/src/components/Tag'
|
|
5
5
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
6
|
-
import {
|
|
6
|
+
import {useNavigation} from '@react-navigation/native'
|
|
7
7
|
import I18n from '@ledvance/base/src/i18n'
|
|
8
8
|
import res from '@ledvance/base/src/res'
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import {useSystemTimeFormate, useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
10
|
+
import {useReactive, useUpdateEffect} from "ahooks";
|
|
11
11
|
import CustomListDialog from "@ledvance/base/src/components/CustomListDialog";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import {Dialog, SwitchButton, Utils} from "tuya-panel-kit";
|
|
13
|
+
import {
|
|
14
|
+
convertMinutesTo12HourFormat,
|
|
15
|
+
getGlobalParamsDp,
|
|
16
|
+
getIsClosed,
|
|
17
|
+
isConflictTask,
|
|
18
|
+
loopText,
|
|
19
|
+
showDialog
|
|
20
|
+
} from "@ledvance/base/src/utils/common";
|
|
14
21
|
import TextButton from "@ledvance/base/src/components/TextButton";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
22
|
+
import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
23
|
+
import {cloneDeep} from "lodash";
|
|
17
24
|
import Card from "@ledvance/base/src/components/Card";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
25
|
+
import {useParams} from "@ledvance/base/src/hooks/Hooks";
|
|
26
|
+
import {ApplyForItem} from "@ledvance/base/src/utils/interface";
|
|
27
|
+
import {
|
|
28
|
+
encodeSleepOrWakeUp,
|
|
29
|
+
getEndTime,
|
|
30
|
+
getStartTime,
|
|
31
|
+
SleepWakeUpItem,
|
|
32
|
+
useSleepPlan,
|
|
33
|
+
useWakeUpPlan
|
|
34
|
+
} from "./SleepWakeUpActions";
|
|
21
35
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
22
36
|
|
|
23
37
|
const cx = Utils.RatioUtils.convertX
|
|
@@ -36,7 +50,7 @@ export interface SleepWakeUpPageRouteParams {
|
|
|
36
50
|
|
|
37
51
|
const MAX_SCHEDULE = 4
|
|
38
52
|
const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
|
|
39
|
-
const
|
|
53
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
40
54
|
const navigation = useNavigation()
|
|
41
55
|
const is24HourClock = useSystemTimeFormate()
|
|
42
56
|
const params = useParams<SleepWakeUpPageRouteParams>()
|
|
@@ -331,7 +345,7 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
|
|
|
331
345
|
return (
|
|
332
346
|
<>
|
|
333
347
|
<Page
|
|
334
|
-
backText={
|
|
348
|
+
backText={uaGroupInfo.name}
|
|
335
349
|
onBackClick={navigation.goBack}
|
|
336
350
|
headlineText={I18n.getLang('add_sleepschedule_one_source_system_back_text')}
|
|
337
351
|
headlineIcon={isMaxNum ? undefined : res.device_panel_schedule_add}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {useReactive, useUpdateEffect} from "ahooks";
|
|
2
2
|
import {useSwitchGradient} from "./SwitchGradientAction";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import {useNavigation} from '@react-navigation/native'
|
|
4
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
5
5
|
import {Utils} from "tuya-panel-kit";
|
|
6
6
|
import Page from "@ledvance/base/src/components/Page";
|
|
7
7
|
import I18n from "@ledvance/base/src/i18n";
|
|
8
8
|
import res from "@ledvance/base/src/res";
|
|
9
9
|
import React from "react";
|
|
10
|
-
import {
|
|
10
|
+
import {StyleSheet, Text, View} from "react-native";
|
|
11
11
|
import Card from "@ledvance/base/src/components/Card";
|
|
12
12
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
13
13
|
import Stepper from '@ledvance/base/src/components/Stepper'
|
|
@@ -17,7 +17,7 @@ const {convertX: cx} = Utils.RatioUtils
|
|
|
17
17
|
const { withTheme } = Utils.ThemeUtils
|
|
18
18
|
|
|
19
19
|
const SwitchGradientPage = (props: { theme?: ThemeType }) => {
|
|
20
|
-
const
|
|
20
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
21
21
|
const navigation = useNavigation()
|
|
22
22
|
const [
|
|
23
23
|
switchOnDuration,
|
|
@@ -59,7 +59,7 @@ const SwitchGradientPage = (props: { theme?: ThemeType }) => {
|
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<Page
|
|
62
|
-
backText={
|
|
62
|
+
backText={uaGroupInfo.name}
|
|
63
63
|
headlineText={I18n.getLang('matter_gradient_overview_headline_text')}
|
|
64
64
|
rightButtonIcon={res.ic_check}
|
|
65
65
|
rightButtonIconClick={async () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useEffect} from "react";
|
|
2
2
|
import {StyleSheet, Text, View} from "react-native";
|
|
3
3
|
import Page from "@ledvance/base/src/components/Page";
|
|
4
|
-
import {
|
|
4
|
+
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
5
5
|
import {useNavigation} from '@react-navigation/native'
|
|
6
6
|
import {SwitchButton, Utils} from "tuya-panel-kit";
|
|
7
7
|
import LdvPickerView from "@ledvance/base/src/components/ldvPickerView";
|
|
@@ -21,7 +21,7 @@ interface SwitchInchingState {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const SwitchInching = (props: { theme?: ThemeType }) => {
|
|
24
|
-
const
|
|
24
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
25
25
|
const navigation = useNavigation()
|
|
26
26
|
const [switchInching, setSwitchInching] = useSwitchInching()
|
|
27
27
|
|
|
@@ -123,7 +123,7 @@ const SwitchInching = (props: { theme?: ThemeType }) => {
|
|
|
123
123
|
|
|
124
124
|
return (
|
|
125
125
|
<Page
|
|
126
|
-
backText={
|
|
126
|
+
backText={uaGroupInfo.name}
|
|
127
127
|
onBackClick={navigation.goBack}
|
|
128
128
|
headlineText={I18n.getLang('socket_settings_switch_off_firstbox_text')}
|
|
129
129
|
>
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import React, {useCallback, useEffect, useMemo} from 'react';
|
|
2
|
+
import {FlatList, Image, ScrollView, StyleSheet, Text, View} from 'react-native';
|
|
3
|
+
import {useNavigation} from '@react-navigation/core';
|
|
4
|
+
import {Utils} from 'tuya-panel-kit';
|
|
5
5
|
import Page from '@ledvance/base/src/components/Page';
|
|
6
6
|
import I18n from '@ledvance/base/src/i18n';
|
|
7
|
-
import {
|
|
8
|
-
useDeviceInfo,
|
|
9
|
-
useTimeSchedule,
|
|
10
|
-
useUAGroupInfo,
|
|
11
|
-
} from '@ledvance/base/src/models/modules/NativePropsSlice';
|
|
7
|
+
import {useTimeSchedule, useUAGroupInfo,} from '@ledvance/base/src/models/modules/NativePropsSlice';
|
|
12
8
|
import res from '@ledvance/base/src/res';
|
|
13
9
|
import Spacer from '@ledvance/base/src/components/Spacer';
|
|
14
10
|
import InfoText from '@ledvance/base/src/components/InfoText';
|
|
15
11
|
import DeleteButton from '@ledvance/base/src/components/DeleteButton';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
12
|
+
import {useReactive, useUpdateEffect} from 'ahooks';
|
|
13
|
+
import {addTimeSchedule, getTimeSchedule, modDelTimeSchedule, modifyTimeSchedule} from "./TimeScheduleActions";
|
|
14
|
+
import {DeviceStateType, Timer} from './Interface';
|
|
15
|
+
import {useParams} from '@ledvance/base/src/hooks/Hooks';
|
|
20
16
|
import ScheduleCard from './components/ScheduleCard';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
17
|
+
import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
18
|
+
import {ApplyForItem} from '@ledvance/base/src/utils/interface';
|
|
23
19
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
24
|
-
import {
|
|
20
|
+
import {showDialog} from '@ledvance/base/src/utils/common';
|
|
25
21
|
|
|
26
22
|
const { convertX: cx } = Utils.RatioUtils;
|
|
27
23
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -47,7 +43,6 @@ export interface TimeSchedulePageParams {
|
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
50
|
-
const deviceInfo = useDeviceInfo();
|
|
51
46
|
const navigation = useNavigation();
|
|
52
47
|
const uaGroupInfo = useUAGroupInfo()
|
|
53
48
|
const [timeScheduleStatus, setTimeScheduleStatus] = useTimeSchedule();
|
|
@@ -145,7 +140,7 @@ const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
|
145
140
|
|
|
146
141
|
return (
|
|
147
142
|
<Page
|
|
148
|
-
backText={
|
|
143
|
+
backText={uaGroupInfo.name}
|
|
149
144
|
onBackClick={navigation.goBack}
|
|
150
145
|
headlineText={I18n.getLang('timeschedule_overview_headline_text')}
|
|
151
146
|
headlineIcon={isMaxSchedule ? undefined : res.device_panel_schedule_add}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
1
|
+
import React, {useEffect} from 'react'
|
|
2
|
+
import {FlatList, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
|
3
3
|
import I18n from '@ledvance/base/src/i18n'
|
|
4
4
|
import Page from '@ledvance/base/src/components/Page'
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import {Utils} from 'tuya-panel-kit'
|
|
6
|
+
import {useUAGroupInfo} from '@ledvance/base/src/models/modules/NativePropsSlice'
|
|
7
7
|
import LdvPickerView from '@ledvance/base/src/components/ldvPickerView'
|
|
8
|
-
import {
|
|
8
|
+
import {useReactive} from 'ahooks'
|
|
9
9
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
10
10
|
import DeleteButton from '@ledvance/base/src/components/DeleteButton'
|
|
11
11
|
import {TaskStatus, timeFormat, timeFormatToRealTime, TimerPageParams, TimerTask, useTimerTasks} from './TimerAction'
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import {cloneDeep, groupBy} from 'lodash'
|
|
13
|
+
import {useParams} from '@ledvance/base/src/hooks/Hooks'
|
|
14
14
|
import GroupBizRes from '../../res/GroupBizRes'
|
|
15
15
|
import dayjs from 'dayjs'
|
|
16
16
|
import Card from '@ledvance/base/src/components/Card'
|
|
17
17
|
import TextButton from '@ledvance/base/src/components/TextButton'
|
|
18
|
-
import {
|
|
18
|
+
import {CircularProgress} from '@ledvance/base/src/components/CircularProgress'
|
|
19
19
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
20
20
|
|
|
21
21
|
const { convertX: cx } = Utils.RatioUtils
|
|
22
22
|
const { withTheme } = Utils.ThemeUtils
|
|
23
23
|
|
|
24
24
|
const TimerPage = (props: { theme?: ThemeType }) => {
|
|
25
|
-
const
|
|
25
|
+
const uaGroupInfo = useUAGroupInfo()
|
|
26
26
|
const params = useParams<TimerPageParams>()
|
|
27
27
|
const [timerTasks, setTimerTasks, changeTimerTasks] = useTimerTasks(params.timerSettableDps, params.devIdGroup)
|
|
28
28
|
|
|
@@ -164,7 +164,7 @@ const TimerPage = (props: { theme?: ThemeType }) => {
|
|
|
164
164
|
|
|
165
165
|
return (
|
|
166
166
|
<Page
|
|
167
|
-
backText={
|
|
167
|
+
backText={uaGroupInfo.name}
|
|
168
168
|
headlineText={I18n.getLang('timer_nightplug_headline_text')}
|
|
169
169
|
loading={state.loading}>
|
|
170
170
|
<ScrollView
|