@ledvance/ui-biz-bundle 1.1.89 → 1.1.91

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.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/src/modules/flags/FlagEditPage.tsx +180 -179
  3. package/src/modules/flags/FlagItem.tsx +26 -42
  4. package/src/modules/flags/FlagPage.tsx +27 -26
  5. package/src/modules/history/HistoryPage.tsx +111 -103
  6. package/src/modules/music/MusicPage.tsx +90 -88
  7. package/src/modules/timer/TimerPage.tsx +13 -9
  8. package/src/newModules/biorhythm/BiorhythmEditPage.tsx +54 -54
  9. package/src/newModules/biorhythm/BiorhythmPage.tsx +163 -162
  10. package/src/newModules/biorhythm/IconSelect.tsx +5 -4
  11. package/src/newModules/childLock/ChildLockPage.tsx +49 -47
  12. package/src/newModules/energyConsumption/component/EnergyModal.tsx +2 -2
  13. package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +127 -124
  14. package/src/newModules/fixedTime/FixedTimePage.tsx +108 -104
  15. package/src/newModules/lightMode/LightModePage.tsx +74 -67
  16. package/src/newModules/mood/AddMoodPage.tsx +18 -15
  17. package/src/newModules/mood/DynamicMoodEditorPage.tsx +103 -100
  18. package/src/newModules/mood/MixDynamicMoodEditor.tsx +107 -104
  19. package/src/newModules/mood/MoodItem.tsx +59 -55
  20. package/src/newModules/mood/MoodPage.tsx +58 -57
  21. package/src/newModules/mood/RecommendMoodItem.tsx +27 -24
  22. package/src/newModules/mood/StaticMoodEditorPage.tsx +77 -85
  23. package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +36 -48
  24. package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +137 -135
  25. package/src/newModules/powerOnBehavior/PlugBehaviorPage.tsx +67 -61
  26. package/src/newModules/randomTime/RandomTimeDetailPage.tsx +114 -151
  27. package/src/newModules/randomTime/RandomTimePage.tsx +110 -105
  28. package/src/newModules/randomTime/Summary.tsx +61 -57
  29. package/src/newModules/remoteControl/RemoteControlPage.tsx +4 -3
  30. package/src/newModules/select/SelectPage.tsx +65 -62
  31. package/src/newModules/sleepWakeUp/SleepWakeUpActions.ts +16 -8
  32. package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +131 -123
  33. package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +144 -140
  34. package/src/newModules/switchGradient/SwitchGradientPage.tsx +24 -25
  35. package/src/newModules/swithInching/SwithInching.tsx +154 -152
  36. package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +83 -83
  37. package/src/newModules/timeSchedule/components/ManuaSettings.tsx +3 -2
  38. package/src/newModules/swithInching/pickerView.tsx +0 -91
@@ -4,7 +4,7 @@ import Page from "@ledvance/base/src/components/Page";
4
4
  import { useDeviceInfo } from "@ledvance/base/src/models/modules/NativePropsSlice";
5
5
  import { useNavigation } from '@react-navigation/native'
6
6
  import { SwitchButton, Utils, Dialog } from "tuya-panel-kit";
7
- import LdvPickerView from "./pickerView";
7
+ import LdvPickerView from "@ledvance/base/src/components/ldvPickerView";
8
8
  import I18n from '@ledvance/base/src/i18n'
9
9
  import { useReactive, useUpdateEffect } from "ahooks";
10
10
  import {SwitchInchingPageParams, useCountdown1, useSwitchInching} from "./SwithInchingAction";
@@ -13,123 +13,175 @@ import {useFixedTime} from "../fixedTime/FixedTimeActions";
13
13
  import {useParams} from "@ledvance/base/src/hooks/Hooks";
14
14
 
15
15
  const { convertX: cx } = Utils.RatioUtils
16
+ const { withTheme } = Utils.ThemeUtils
16
17
 
17
18
  interface SwitchInchingState {
18
- enable: boolean,
19
- minute: string,
20
- second: string,
21
- flag: Symbol | number
19
+ enable: boolean,
20
+ minute: string,
21
+ second: string,
22
+ flag: Symbol | number
22
23
  }
23
24
 
24
- const SwitchInching = () => {
25
- const params = useParams<SwitchInchingPageParams>()
26
- const deviceInfo = useDeviceInfo()
27
- const navigation = useNavigation()
28
- const [switchInching, setSwitchInching] = useSwitchInching(params.switchInchingCode)
29
- const [randomTimePlan, setRandomTimePlan] = useRandomTime(params.randomTimeCode, true)
30
- const [fixedTimePlan, setFixedTimePlan] = useFixedTime(params.cycleTimeCode, true)
31
- const [countdown1, setCountDown1] = useCountdown1(params.countdownCode)
32
- const randomEnable = randomTimePlan.some(item => item.enable)
33
- const fixedEnable = fixedTimePlan.some(item => item.enable)
34
- const timerEnable = !!countdown1
35
- const state = useReactive<SwitchInchingState>({
36
- enable: false,
37
- minute: '00',
38
- second: '00',
39
- flag: 1
40
- })
25
+ const SwitchInching = (props: { theme?: any }) => {
26
+ const params = useParams<SwitchInchingPageParams>()
27
+ const deviceInfo = useDeviceInfo()
28
+ const navigation = useNavigation()
29
+ const [switchInching, setSwitchInching] = useSwitchInching(params.switchInchingCode)
30
+ const [randomTimePlan, setRandomTimePlan] = useRandomTime(params.randomTimeCode, true)
31
+ const [fixedTimePlan, setFixedTimePlan] = useFixedTime(params.cycleTimeCode, true)
32
+ const [countdown1, setCountDown1] = useCountdown1(params.countdownCode)
33
+ const randomEnable = randomTimePlan.some(item => item.enable)
34
+ const fixedEnable = fixedTimePlan.some(item => item.enable)
35
+ const timerEnable = !!countdown1
36
+ const state = useReactive<SwitchInchingState>({
37
+ enable: false,
38
+ minute: '00',
39
+ second: '00',
40
+ flag: 1
41
+ })
41
42
 
42
- useEffect(() => {
43
- state.enable = switchInching.enable
44
- state.minute = formateValue('minute')
45
- state.second = formateValue('second')
46
- }, [JSON.stringify(switchInching)])
43
+ useEffect(() => {
44
+ state.enable = switchInching.enable
45
+ state.minute = formateValue('minute')
46
+ state.second = formateValue('second')
47
+ }, [JSON.stringify(switchInching)])
47
48
 
48
- const showDialog = (run: () => void) => {
49
- Dialog.confirm({
50
- title: I18n.getLang('conflict_dialog_save_item_inching_titel'),
51
- subTitle: I18n.getLang('conflict_dialog_save_item_inching_description'),
52
- cancelText: I18n.getLang('conflict_dialog_save_item_inching_answer_no_text'),
53
- confirmText: I18n.getLang('conflict_dialog_save_item_inching_answer_yes_text'),
54
- onConfirm: (_, { close }) => {
55
- close();
56
- setSwitchInching({ ...switchInching, enable: false })
57
- TurnOffFn()
58
- run()
59
- },
60
- })
61
- }
49
+ const showDialog = (run: () => void) => {
50
+ Dialog.confirm({
51
+ title: I18n.getLang('conflict_dialog_save_item_inching_titel'),
52
+ subTitle: I18n.getLang('conflict_dialog_save_item_inching_description'),
53
+ cancelText: I18n.getLang('conflict_dialog_save_item_inching_answer_no_text'),
54
+ confirmText: I18n.getLang('conflict_dialog_save_item_inching_answer_yes_text'),
55
+ onConfirm: (_, { close }) => {
56
+ close();
57
+ setSwitchInching({ ...switchInching, enable: false })
58
+ TurnOffFn()
59
+ run()
60
+ },
61
+ })
62
+ }
62
63
 
63
- const TurnOffFn = () => {
64
- if (randomEnable) {
65
- const randomTimeList = randomTimePlan.map(item => {
66
- if (item.enable) {
67
- return {
68
- ...item,
69
- enable: false
70
- }
71
- } else {
72
- return item
73
- }
74
- })
75
- setRandomTimePlan(randomTimeList)
76
- }
77
- if (fixedEnable) {
78
- const fixedTimeList = fixedTimePlan.map(item => {
79
- if (item.enable) {
80
- return {
81
- ...item,
82
- enable: false
83
- }
84
- } else {
85
- return item
86
- }
87
- })
88
- setFixedTimePlan(fixedTimeList)
64
+ const TurnOffFn = () => {
65
+ if (randomEnable) {
66
+ const randomTimeList = randomTimePlan.map(item => {
67
+ if (item.enable) {
68
+ return {
69
+ ...item,
70
+ enable: false
71
+ }
72
+ } else {
73
+ return item
89
74
  }
90
- if (timerEnable) {
91
- setCountDown1(0)
75
+ })
76
+ setRandomTimePlan(randomTimeList)
77
+ }
78
+ if (fixedEnable) {
79
+ const fixedTimeList = fixedTimePlan.map(item => {
80
+ if (item.enable) {
81
+ return {
82
+ ...item,
83
+ enable: false
84
+ }
85
+ } else {
86
+ return item
92
87
  }
88
+ })
89
+ setFixedTimePlan(fixedTimeList)
90
+ }
91
+ if (timerEnable) {
92
+ setCountDown1(0)
93
93
  }
94
+ }
94
95
 
95
96
 
96
- const requestSwitchInching = () => {
97
- const run = () => {
98
- const enable = state.enable
99
- const time = Number(state.minute) * 60 + Number(state.second)
100
- setSwitchInching({ enable, time })
101
- }
102
- if (state.enable && (randomEnable || fixedEnable || timerEnable)) {
103
- return showDialog(run)
104
- }
105
- run()
97
+ const requestSwitchInching = () => {
98
+ const run = () => {
99
+ const enable = state.enable
100
+ const time = Number(state.minute) * 60 + Number(state.second)
101
+ setSwitchInching({ enable, time })
102
+ }
103
+ if (state.enable && (randomEnable || fixedEnable || timerEnable)) {
104
+ return showDialog(run)
106
105
  }
106
+ run()
107
+ }
107
108
 
108
- useEffect(() => {
109
- if (state.flag !== 1) {
110
- requestSwitchInching()
111
- }
112
- }, [state.flag])
109
+ useEffect(() => {
110
+ if (state.flag !== 1) {
111
+ requestSwitchInching()
112
+ }
113
+ }, [state.flag])
113
114
 
114
- useUpdateEffect(() => {
115
- if (!!!Number(state.minute) && Number(state.second) < 2) {
116
- state.second = '02'
117
- }
118
- if (Number(state.minute) === 60) {
119
- state.second = '00'
120
- }
121
- }, [state.minute, state.second])
115
+ useUpdateEffect(() => {
116
+ if (!!!Number(state.minute) && Number(state.second) < 2) {
117
+ state.second = '02'
118
+ }
119
+ if (Number(state.minute) === 60) {
120
+ state.second = '00'
121
+ }
122
+ }, [state.minute, state.second])
122
123
 
123
- const formateValue = (type: string) => {
124
- const m = parseInt(String((switchInching?.time || 0) / 60))
125
- if (type === 'minute') {
126
- return m.toString().padStart(2, '0')
127
- } else {
128
- const s = switchInching.time - 60 * m
129
- const v: string = s === 0 ? '00' : s < 10 ? '0' + s : String(s)
130
- return v
131
- }
124
+ const formateValue = (type: string) => {
125
+ const m = parseInt(String((switchInching?.time || 0) / 60))
126
+ if (type === 'minute') {
127
+ return m.toString().padStart(2, '0')
128
+ } else {
129
+ const s = switchInching.time - 60 * m
130
+ const v: string = s === 0 ? '00' : s < 10 ? '0' + s : String(s)
131
+ return v
132
132
  }
133
+ }
134
+
135
+ const styles = StyleSheet.create({
136
+ switchContainer: {
137
+ backgroundColor: props.theme.container.background,
138
+ marginHorizontal: cx(24),
139
+ padding: cx(10),
140
+ borderRadius: cx(6),
141
+ flexDirection: 'column',
142
+ },
143
+ switchCardContainer: {
144
+ paddingVertical: cx(4),
145
+ paddingHorizontal: cx(10),
146
+ backgroundColor: props.theme.global.background,
147
+ flexDirection: 'row',
148
+ justifyContent: 'center',
149
+ alignItems: 'center',
150
+ borderRadius: cx(6),
151
+ },
152
+ switchCardTitle: {
153
+ color: props.theme.global.fontColor,
154
+ fontSize: cx(14),
155
+ flex: 1,
156
+ fontWeight: '400',
157
+ },
158
+ switchDescription: {
159
+ color: props.theme.global.fontColor,
160
+ flexWrap: 'wrap',
161
+ fontSize: cx(12),
162
+ marginTop: cx(4),
163
+ },
164
+ secondTopic: {
165
+ color: props.theme.global.fontColor,
166
+ flexWrap: 'wrap',
167
+ fontSize: cx(14),
168
+ marginTop: cx(30),
169
+ marginHorizontal: cx(24),
170
+ },
171
+ pickContainer: {
172
+ position: 'relative',
173
+ marginVertical: cx(24),
174
+ marginHorizontal: cx(24),
175
+ },
176
+ disabledCover: {
177
+ position: 'absolute',
178
+ width: '100%',
179
+ height: '100%',
180
+ left: 0,
181
+ top: 0,
182
+ zIndex: 999,
183
+ },
184
+ })
133
185
 
134
186
  return (
135
187
  <Page
@@ -178,54 +230,4 @@ const SwitchInching = () => {
178
230
  );
179
231
  };
180
232
 
181
- const styles = StyleSheet.create({
182
- switchContainer: {
183
- backgroundColor: '#F6F6F6',
184
- marginHorizontal: cx(24),
185
- padding: cx(10),
186
- borderRadius: cx(6),
187
- flexDirection: 'column',
188
- },
189
- switchCardContainer: {
190
- paddingVertical: cx(4),
191
- paddingHorizontal: cx(10),
192
- backgroundColor: '#FFFFFF',
193
- flexDirection: 'row',
194
- justifyContent: 'center',
195
- alignItems: 'center',
196
- borderRadius: cx(6),
197
- },
198
- switchCardTitle: {
199
- color: '#000',
200
- fontSize: cx(14),
201
- flex: 1,
202
- fontWeight: '400',
203
- },
204
- switchDescription: {
205
- color: '#000',
206
- flexWrap: 'wrap',
207
- fontSize: cx(12),
208
- marginTop: cx(4),
209
- },
210
- secondTopic: {
211
- color: '#000',
212
- flexWrap: 'wrap',
213
- fontSize: cx(14),
214
- marginTop: cx(30),
215
- marginHorizontal: cx(24),
216
- },
217
- pickContainer: {
218
- position: 'relative',
219
- marginVertical: cx(24),
220
- marginHorizontal: cx(24),
221
- },
222
- disabledCover: {
223
- position: 'absolute',
224
- width: '100%',
225
- height: '100%',
226
- left: 0,
227
- top: 0,
228
- zIndex: 999,
229
- },
230
- });
231
- export default SwitchInching;
233
+ export default withTheme(SwitchInching)
@@ -221,7 +221,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
221
221
  fontFamily: 'helvetica_neue_lt_std_bd',
222
222
  },
223
223
  applyContent: {
224
- backgroundColor: props.theme.card.border,
224
+ backgroundColor: props.theme.container.background,
225
225
  borderRadius: 4,
226
226
  minHeight: cx(55),
227
227
  flex: 1,
@@ -263,7 +263,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
263
263
  },
264
264
  summaryRight: {
265
265
  flexDirection: 'column',
266
- backgroundColor: props.theme.card.background,
266
+ backgroundColor: props.theme.tag.background,
267
267
  borderRadius: cx(16),
268
268
  alignItems: 'center'
269
269
  },
@@ -371,7 +371,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
371
371
  <Spacer height={cx(10)} />
372
372
  <View style={[styles.applyContent, { paddingTop: state.selectedSkill.length ? cx(10) : 0 }]}>
373
373
  {state.selectedSkill.length === 0 ? (
374
- <Text>{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}</Text>
374
+ <Text style={{color: props.theme.global.fontColor}}>{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}</Text>
375
375
  ) : (
376
376
  state.selectedSkill.map(skill => (
377
377
  <View
@@ -388,7 +388,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
388
388
  style={{ paddingHorizontal: cx(5) }}
389
389
  >
390
390
  <Image
391
- style={{ width: cx(16), height: cx(16) }}
391
+ style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor }}
392
392
  source={res.ic_arrows_nav_clear}
393
393
  />
394
394
  </TouchableOpacity>
@@ -409,7 +409,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
409
409
  >
410
410
  <Text style={{ color: props.theme.global.fontColor, fontSize: cx(12) }}>{item.key}</Text>
411
411
  <Image
412
- style={{ width: cx(16), height: cx(16) }}
412
+ style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor }}
413
413
  source={res.device_panel_timer_add}
414
414
  />
415
415
  </TouchableOpacity>
@@ -436,18 +436,18 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
436
436
  )}
437
437
  <Spacer height={cx(10)} />
438
438
  {(!state.selectedSkill.length && !showMoodFanSelectText) && <InfoText
439
- style={{ marginHorizontal: cx(24) }}
440
- icon={res.ic_warning_amber}
441
- contentColor="#FF9500"
442
- text={I18n.getLang('timeschedule_add_schedule_no_device_warning_text')}
443
- textStyle={{fontSize: cx(12)}}
439
+ style={{ marginHorizontal: cx(24) }}
440
+ icon={res.ic_warning_amber}
441
+ contentColor="#FF9500"
442
+ text={I18n.getLang('timeschedule_add_schedule_no_device_warning_text')}
443
+ textStyle={{fontSize: cx(12)}}
444
444
  />}
445
445
  {showMoodFanSelectText && <InfoText
446
- style={{ marginHorizontal: cx(24) }}
447
- icon={res.ic_warning_amber}
448
- contentColor="#FF9500"
449
- text={I18n.getLang('timeschedule_add_schedule_devicestate_sec_warning_text')}
450
- textStyle={{fontSize: cx(12)}}
446
+ style={{ marginHorizontal: cx(24) }}
447
+ icon={res.ic_warning_amber}
448
+ contentColor="#FF9500"
449
+ text={I18n.getLang('timeschedule_add_schedule_devicestate_sec_warning_text')}
450
+ textStyle={{fontSize: cx(12)}}
451
451
  />}
452
452
  {state.isManual ? (
453
453
  <ManualSettings
@@ -463,7 +463,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
463
463
  onManualChange={manual => {
464
464
  state.manualData = {
465
465
  ...state.manualData,
466
- // @ts-ignore
466
+ // @ts-ignore
467
467
  deviceData: cloneDeep(manual),
468
468
  };
469
469
  }}
@@ -518,61 +518,61 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
518
518
  actions={<View style={{ flex: 1 }}>
519
519
  {state.isManual
520
520
  ? !!state.selectedSkill.length && (
521
- <>
522
- {!!state.selectedSkill.filter(skill => skill.enable).length && (
523
- <>
524
- <Text style={{ fontSize: cx(14), color: '#000' }}>
525
- {I18n.getLang('feature_summary_action_txt_1')}
526
- </Text>
527
- <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
528
- {state.selectedSkill
529
- .filter(skill => skill.enable)
530
- .map(item => (
531
- <View
532
- style={[
533
- styles.summaryRight,
534
- { marginRight: cx(5), marginBottom: cx(5) },
535
- ]}
536
- key={item.dp}
537
- >
538
- <Text style={[styles.rightItem]}>{item.key}</Text>
539
- </View>
540
- ))}
541
- </View>
542
- </>
543
- )}
521
+ <>
522
+ {!!state.selectedSkill.filter(skill => skill.enable).length && (
523
+ <>
524
+ <Text style={{ fontSize: cx(14), color: props.theme.global.fontColor }}>
525
+ {I18n.getLang('feature_summary_action_txt_1')}
526
+ </Text>
527
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
528
+ {state.selectedSkill
529
+ .filter(skill => skill.enable)
530
+ .map(item => (
531
+ <View
532
+ style={[
533
+ styles.summaryRight,
534
+ { marginRight: cx(5), marginBottom: cx(5) },
535
+ ]}
536
+ key={item.dp}
537
+ >
538
+ <Text style={[styles.rightItem]}>{item.key}</Text>
539
+ </View>
540
+ ))}
541
+ </View>
542
+ </>
543
+ )}
544
544
 
545
- {!!state.selectedSkill.filter(skill => !skill.enable).length && (
546
- <>
547
- <Text style={{ fontSize: cx(14) }}>
548
- {I18n.getLang('feature_summary_action_txt_2')}
549
- </Text>
550
- <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
551
- {state.selectedSkill
552
- .filter(skill => !skill.enable)
553
- .map((item) => (
554
- <View
555
- style={[
556
- styles.summaryRight,
557
- { marginRight: cx(5), marginBottom: cx(5) },
558
- ]}
559
- key={item.dp}
560
- >
561
- <Text style={[styles.rightItem]}>{item.key}</Text>
562
- </View>
563
- ))}
564
- </View>
565
- </>
566
- )}
567
- </>
568
- )
545
+ {!!state.selectedSkill.filter(skill => !skill.enable).length && (
546
+ <>
547
+ <Text style={{ fontSize: cx(14), color: props.theme.global.fontColor }}>
548
+ {I18n.getLang('feature_summary_action_txt_2')}
549
+ </Text>
550
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
551
+ {state.selectedSkill
552
+ .filter(skill => !skill.enable)
553
+ .map((item) => (
554
+ <View
555
+ style={[
556
+ styles.summaryRight,
557
+ { marginRight: cx(5), marginBottom: cx(5) },
558
+ ]}
559
+ key={item.dp}
560
+ >
561
+ <Text style={[styles.rightItem]}>{item.key}</Text>
562
+ </View>
563
+ ))}
564
+ </View>
565
+ </>
566
+ )}
567
+ </>
568
+ )
569
569
  : !!state.moodName && (
570
- <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
571
- <View style={[styles.summaryRight, { marginLeft: cx(5) }]}>
572
- <Text style={styles.rightItem}>{state.moodName}</Text>
573
- </View>
570
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
571
+ <View style={[styles.summaryRight, { marginLeft: cx(5) }]}>
572
+ <Text style={styles.rightItem}>{state.moodName}</Text>
574
573
  </View>
575
- )}
574
+ </View>
575
+ )}
576
576
  </View>}
577
577
  />
578
578
  <Spacer height={cx(30)} />
@@ -626,23 +626,23 @@ const getDefaultManual = (props: TimeScheduleDetailPageParams): ComponentConfig
626
626
  : props.isMixLight
627
627
  ? DeviceType.MixLight
628
628
  : props.isPowerStrip
629
- ? DeviceType.PowerStrip
630
- : props.isFanLight
631
- ? DeviceType.FanLight
632
- : props.isCeilingLight
633
- ? DeviceType.CeilingLight
634
- : DeviceType.LightSource
635
- const deviceData =
636
- (deviceType === DeviceType.StripLight || deviceType === DeviceType.CeilingLight)
637
- ? defStripDeviceData
638
- : deviceType === DeviceType.MixLight
639
- ? defMixDeviceData
640
- : deviceType === DeviceType.FanLight
641
- ? defFanLightDeviceData
642
- : defDeviceData;
629
+ ? DeviceType.PowerStrip
630
+ : props.isFanLight
631
+ ? DeviceType.FanLight
632
+ : props.isCeilingLight
633
+ ? DeviceType.CeilingLight
634
+ : DeviceType.LightSource
635
+ const deviceData =
636
+ (deviceType === DeviceType.StripLight || deviceType === DeviceType.CeilingLight)
637
+ ? defStripDeviceData
638
+ : deviceType === DeviceType.MixLight
639
+ ? defMixDeviceData
640
+ : deviceType === DeviceType.FanLight
641
+ ? defFanLightDeviceData
642
+ : defDeviceData;
643
643
 
644
644
  return {
645
- type: deviceType as any,
645
+ type: deviceType as any,
646
646
  deviceData: {
647
647
  ...deviceData,
648
648
  isColorMode: props.isSupportColor,
@@ -136,6 +136,7 @@ function ManualSettings(props: ManualSettingProps) {
136
136
 
137
137
  {item.enable && item.type === 'fan' && (
138
138
  <FanAdjustViewContent
139
+ theme={props.theme}
139
140
  hideEnable={true}
140
141
  fanEnable={item.enable}
141
142
  maxFanSpeed={props.isUVCFan ? 20 : 3}
@@ -324,7 +325,7 @@ function ManualSettings(props: ManualSettingProps) {
324
325
  <Card style={{ marginHorizontal: cx(24) }}>
325
326
  <LdvSwitch
326
327
  title={item.key}
327
- color={'#fff'}
328
+ color={props.theme.card.background}
328
329
  colorAlpha={1}
329
330
  enable={item.enable}
330
331
  setEnable={(enable: boolean) => {
@@ -404,7 +405,7 @@ function ManualSettings(props: ManualSettingProps) {
404
405
  ))}
405
406
  </View>
406
407
  )
407
- }, [state.deviceData, state.applyForList])
408
+ }, [state.deviceData, state.applyForList, props.theme.type])
408
409
 
409
410
  const powerStripCard = useMemo(() => {
410
411
  return (