@ledvance/ui-biz-bundle 1.1.64 → 1.1.65
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/newModules/fixedTime/FixedTimeActions.ts +2 -1
- package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +4 -4
- package/src/newModules/fixedTime/FixedTimePage.tsx +0 -3
- package/src/newModules/randomTime/RandomTimeActions.ts +0 -2
- package/src/newModules/randomTime/RandomTimeDetailPage.tsx +4 -4
- package/src/newModules/randomTime/Summary.tsx +1 -1
package/package.json
CHANGED
|
@@ -122,7 +122,8 @@ export const useFixedTime: UseFixedTimeType = (dpKey, isPlug, disableFeature) =>
|
|
|
122
122
|
length: isPlug ? 10 : 16,
|
|
123
123
|
nodes: fixedTimeList
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
let hex = fixedTimeObj2Dp(fixedTimerData, isPlug)
|
|
126
|
+
if(isPlug) hex = Buffer.from(hex, 'hex').toString('base64')
|
|
126
127
|
const res = await setFixedTimeDp(hex)
|
|
127
128
|
if (res.success) {
|
|
128
129
|
return {
|
|
@@ -174,10 +174,10 @@ const FixedTimeDetailPage = () => {
|
|
|
174
174
|
</View>
|
|
175
175
|
<Spacer />
|
|
176
176
|
{/* Devices */}
|
|
177
|
-
<View style={styles.cardContainer}>
|
|
177
|
+
{state.fixedTime.color && !params.isPlug && <View style={styles.cardContainer}>
|
|
178
178
|
<Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline2_text')}</Text>
|
|
179
179
|
<Spacer height={cx(10)} />
|
|
180
|
-
|
|
180
|
+
<Card>
|
|
181
181
|
<LdvSwitch
|
|
182
182
|
title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
|
|
183
183
|
color={'#fff'}
|
|
@@ -219,9 +219,9 @@ const FixedTimeDetailPage = () => {
|
|
|
219
219
|
}
|
|
220
220
|
}}
|
|
221
221
|
/>
|
|
222
|
-
</Card>
|
|
222
|
+
</Card>
|
|
223
223
|
<Spacer />
|
|
224
|
-
</View>
|
|
224
|
+
</View>}
|
|
225
225
|
{/* Settings */}
|
|
226
226
|
<View style={styles.cardContainer}>
|
|
227
227
|
<Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline4_text')}</Text>
|
|
@@ -77,17 +77,14 @@ const FixedTimePage = () => {
|
|
|
77
77
|
}, [state.originList.length])
|
|
78
78
|
|
|
79
79
|
const onPost = useCallback(async (mode: 'add' | 'edit' | 'del', fixedTime: FixedTimerUiItem) => {
|
|
80
|
-
console.log(fixedTime, '< --- fixedTimeeeeee')
|
|
81
80
|
const cloneFixedTimeList = cloneDeep(state.originList)
|
|
82
81
|
const idx = state.originList.findIndex(f => f.index === fixedTime.index)
|
|
83
|
-
console.log(idx, '< --- idxxxxx')
|
|
84
82
|
if (mode === 'edit') {
|
|
85
83
|
cloneFixedTimeList.splice(idx, 1, fixedTime)
|
|
86
84
|
}
|
|
87
85
|
if (mode === 'del') cloneFixedTimeList.splice(idx, 1)
|
|
88
86
|
const newFixedTimeList = mode === 'add' ? [...state.originList, fixedTime] : cloneFixedTimeList
|
|
89
87
|
const res = await setFixedTime(newFixedTimeList)
|
|
90
|
-
console.log(res, '< ---== resss')
|
|
91
88
|
if (res.success) {
|
|
92
89
|
state.originList = cloneDeep(newFixedTimeList)
|
|
93
90
|
}
|
|
@@ -115,9 +115,7 @@ export const useRandomTime: UseFixedTimeType = (dpKey: string, isPlug?: boolean,
|
|
|
115
115
|
v: isPlug ? JSON.stringify({dp: randomHex}) : randomHex
|
|
116
116
|
}
|
|
117
117
|
})
|
|
118
|
-
console.log(randomData, '< --- randomData')
|
|
119
118
|
const cloudStatus = await putFeatureFn(deviceId, isPlug ? plug_randomFeatureId : randomFeatureId, JSON.stringify(randomData))
|
|
120
|
-
console.log(cloudStatus, '< --- cloudStatus')
|
|
121
119
|
if (cloudStatus) {
|
|
122
120
|
const randomTimerData = {
|
|
123
121
|
version: 0,
|
|
@@ -168,10 +168,10 @@ const RandomTimeDetailPage = () => {
|
|
|
168
168
|
</View>
|
|
169
169
|
<Spacer />
|
|
170
170
|
{/* Devices */}
|
|
171
|
-
<View style={styles.cardContainer}>
|
|
171
|
+
{!!state.randomTime.color && !params.isPlug && <View style={styles.cardContainer}>
|
|
172
172
|
<Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline2_text')}</Text>
|
|
173
173
|
<Spacer height={cx(10)} />
|
|
174
|
-
|
|
174
|
+
<Card>
|
|
175
175
|
<LdvSwitch
|
|
176
176
|
title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
|
|
177
177
|
color={'#fff'}
|
|
@@ -213,9 +213,9 @@ const RandomTimeDetailPage = () => {
|
|
|
213
213
|
}
|
|
214
214
|
}}
|
|
215
215
|
/>
|
|
216
|
-
</Card>
|
|
216
|
+
</Card>
|
|
217
217
|
<Spacer />
|
|
218
|
-
</View>
|
|
218
|
+
</View>}
|
|
219
219
|
{/* summary */}
|
|
220
220
|
<Summary
|
|
221
221
|
frequency={loopText(state.randomTime.weeks)}
|
|
@@ -19,7 +19,7 @@ interface SummaryProps {
|
|
|
19
19
|
const Summary = (props: SummaryProps) => {
|
|
20
20
|
return (
|
|
21
21
|
<View style={styles.cardContainer}>
|
|
22
|
-
<Text style={styles.itemTitle}>{I18n.getLang('
|
|
22
|
+
<Text style={styles.itemTitle}>{I18n.getLang('add_sleepschedule_one_source_subheadline4_text')}</Text>
|
|
23
23
|
<Spacer height={cx(10)} />
|
|
24
24
|
<View style={{}}>
|
|
25
25
|
<View style={styles.summaryContainer}>
|