@ledvance/ui-biz-bundle 1.0.57 → 1.0.59
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
CHANGED
|
@@ -250,6 +250,7 @@ const BiorhythmEditPage = () => {
|
|
|
250
250
|
<ColorTempAdjustView
|
|
251
251
|
colorTemp={state.colorTemperature}
|
|
252
252
|
brightness={Number(state.brightness.toFixed())}
|
|
253
|
+
minBrightness={0}
|
|
253
254
|
onCCTChange={newValue => {
|
|
254
255
|
state.colorTemperature = newValue
|
|
255
256
|
state.action[0].startValue = `${colorTemperatureValue(newValue)}`
|
|
@@ -29,7 +29,7 @@ import {useRoute} from '@react-navigation/core'
|
|
|
29
29
|
import {BiorhythmEditPageParams} from './BiorhythmEditPage'
|
|
30
30
|
import {useBiorhythm, userOperation} from './BiorhythmActions'
|
|
31
31
|
import {useSleepPlan, useWakeUpPlan} from '../sleepWakeup/SleepWakeUpActions'
|
|
32
|
-
|
|
32
|
+
import { showDialog as showCommonDialog } from '@ledvance/base/src/utils/common'
|
|
33
33
|
const cx = Utils.RatioUtils.convertX
|
|
34
34
|
const width = Utils.RatioUtils.width
|
|
35
35
|
|
|
@@ -123,12 +123,10 @@ const BiorhythmPage = () => {
|
|
|
123
123
|
})
|
|
124
124
|
console.log('设置生物节律数据', state)
|
|
125
125
|
await userOperation(deviceId, false)
|
|
126
|
+
const res = await setBiorhythm(deviceId, {...state, planList})
|
|
126
127
|
state.loading = false
|
|
127
|
-
const res = await setBiorhythm(deviceId, {...state, enable: !state.enable, planList})
|
|
128
128
|
console.log('设置生物节律res', res)
|
|
129
129
|
if (res.success) {
|
|
130
|
-
state.enable = !state.enable
|
|
131
|
-
state.showMaskModal = state.enable
|
|
132
130
|
console.log('设置生物节律 OK')
|
|
133
131
|
}
|
|
134
132
|
}, [])
|
|
@@ -400,6 +398,7 @@ const BiorhythmPage = () => {
|
|
|
400
398
|
onValueChange={async enable => {
|
|
401
399
|
if (enable && (sleepWakeUpStatus || enableTimeScheduleStatus)) return showDialog(enable)
|
|
402
400
|
state.loading = true
|
|
401
|
+
state.enable = enable
|
|
403
402
|
state.flag = Symbol()
|
|
404
403
|
}}
|
|
405
404
|
/>
|
|
@@ -506,7 +505,7 @@ const BiorhythmPage = () => {
|
|
|
506
505
|
}}
|
|
507
506
|
replaceStatus={devicesJudge}
|
|
508
507
|
gradient={state.gradient === BiorhythmGradientType.DirectGradient}
|
|
509
|
-
isSupportTemperature={params.isSupportTemperature}/>
|
|
508
|
+
isSupportTemperature={!params.isSupportTemperature}/>
|
|
510
509
|
<View
|
|
511
510
|
style={{
|
|
512
511
|
flexDirection: 'row',
|
|
@@ -710,12 +709,19 @@ const BiorhythmPage = () => {
|
|
|
710
709
|
<TouchableOpacity
|
|
711
710
|
style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}
|
|
712
711
|
onPress={() => {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
712
|
+
showCommonDialog({
|
|
713
|
+
method: 'confirm',
|
|
714
|
+
title: I18n.getLang('bio_ryhthm_reset_description_text'),
|
|
715
|
+
onConfirm: (_, {close}) =>{
|
|
716
|
+
const defBiorhythmUIState = getDefBiorhythmUIState()
|
|
717
|
+
state.enable = defBiorhythmUIState.enable
|
|
718
|
+
state.gradient = defBiorhythmUIState.gradient
|
|
719
|
+
state.repeatPeriod = defBiorhythmUIState.repeatPeriod
|
|
720
|
+
state.planList = defBiorhythmUIState.planList
|
|
721
|
+
state.flag = Symbol()
|
|
722
|
+
close()
|
|
723
|
+
}
|
|
724
|
+
})
|
|
719
725
|
}}>
|
|
720
726
|
<Text
|
|
721
727
|
style={{
|
|
@@ -140,6 +140,7 @@ export default function SingleLightView(props: SingleLightViewProps) {
|
|
|
140
140
|
h={state.actions.h}
|
|
141
141
|
s={state.actions.s}
|
|
142
142
|
v={state.actions.v}
|
|
143
|
+
reserveSV={true}
|
|
143
144
|
onHSVChange={setHSVState}
|
|
144
145
|
onHSVChangeComplete={setColourStateAction}
|
|
145
146
|
colorTemp={state.actions.temperature}
|
|
@@ -40,6 +40,8 @@ export interface LightData {
|
|
|
40
40
|
isManual: boolean
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
const MAXNUM = 30
|
|
44
|
+
|
|
43
45
|
export interface TimeSchedulePageRouteParams extends JudgeTimeScheduleProps {
|
|
44
46
|
dps: dpItem[],
|
|
45
47
|
lightData2dps?: (data: LightData) => any
|
|
@@ -185,6 +187,10 @@ const TimeSchedulePage = () => {
|
|
|
185
187
|
return Object.values(state.filterTags).length > 1 && state.timeScheduleList.length > 0
|
|
186
188
|
}, [state.filterTags, state.timeScheduleList])
|
|
187
189
|
|
|
190
|
+
const showMaxNumTip = useCallback(() =>{
|
|
191
|
+
return state.timeScheduleList.length >= MAXNUM
|
|
192
|
+
}, [state.timeScheduleList.length])
|
|
193
|
+
|
|
188
194
|
const showScheduleList = useCallback(() => {
|
|
189
195
|
return !!state.filterScheduleList.length
|
|
190
196
|
}, [state.filterScheduleList])
|
|
@@ -203,7 +209,7 @@ const TimeSchedulePage = () => {
|
|
|
203
209
|
backText={deviceInfo.name}
|
|
204
210
|
onBackClick={navigation.goBack}
|
|
205
211
|
headlineText={I18n.getLang('timeschedule_overview_headline_text')}
|
|
206
|
-
headlineIcon={res.device_panel_schedule_add}
|
|
212
|
+
headlineIcon={!showMaxNumTip() ? res.device_panel_schedule_add : undefined}
|
|
207
213
|
onHeadlineIconClick={() => {
|
|
208
214
|
navigateToEdit('add')
|
|
209
215
|
}}
|
|
@@ -214,7 +220,11 @@ const TimeSchedulePage = () => {
|
|
|
214
220
|
color: '#000',
|
|
215
221
|
marginLeft: cx(24),
|
|
216
222
|
}}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
|
|
217
|
-
<Spacer/>
|
|
223
|
+
<Spacer height={cx(10)}/>
|
|
224
|
+
{showMaxNumTip() && <View style={{marginHorizontal: cx(24), flexDirection: 'row', alignItems: 'center'}}>
|
|
225
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: '#ff9500' }} source={res.ic_warning_amber} />
|
|
226
|
+
<Text>{I18n.getLang('motion_detection_time_schedule_notifications_warning_text')}</Text>
|
|
227
|
+
</View>}
|
|
218
228
|
{showTags() && <View style={styles.categoryList}>
|
|
219
229
|
{Object.keys(state.filterTags).map(tag => {
|
|
220
230
|
return <Tag
|