@ledvance/ui-biz-bundle 1.1.90 → 1.1.92

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
@@ -12,6 +12,7 @@ import I18n from '@ledvance/base/src/i18n';
12
12
  import res from '@ledvance/base/src/res';
13
13
 
14
14
  const cx = Utils.RatioUtils.convertX;
15
+ const { withTheme } = Utils.ThemeUtils
15
16
 
16
17
  interface LightCategory {
17
18
  isMixLight?: boolean
@@ -21,6 +22,7 @@ interface LightCategory {
21
22
  }
22
23
 
23
24
  interface MoodItemProps extends ViewProps {
25
+ theme?: any
24
26
  enable: boolean;
25
27
  isMix: boolean;
26
28
  mood: MoodUIInfo;
@@ -38,7 +40,42 @@ const MoodItem = (props: MoodItemProps) => {
38
40
 
39
41
  const gradientMode = useMemo(() => (
40
42
  deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
41
- ), [MoodJumpGradientMode, deviceTypeOption])
43
+ ), [MoodJumpGradientMode, deviceTypeOption])
44
+
45
+
46
+ const styles = StyleSheet.create({
47
+ card: {
48
+ marginHorizontal: cx(24),
49
+ },
50
+ headline: {
51
+ flexDirection: 'row',
52
+ marginHorizontal: cx(16),
53
+ },
54
+ headText: {
55
+ flex: 1,
56
+ color: props.theme.global.fontColor,
57
+ fontSize: cx(16),
58
+ fontFamily: 'helvetica_neue_lt_std_bd',
59
+ lineHeight: cx(20),
60
+ },
61
+ moodTypeItem: {
62
+ flexDirection: 'row',
63
+ },
64
+ moodTypeLabel: {
65
+ marginStart: cx(16),
66
+ paddingHorizontal: cx(12.5),
67
+ backgroundColor: props.theme.tag.background,
68
+ borderRadius: cx(8),
69
+ },
70
+ moodTypeLabelText: {
71
+ height: cx(16),
72
+ color: props.theme.tag.fontColor,
73
+ fontSize: cx(10),
74
+ textAlignVertical: 'center',
75
+ fontFamily: 'helvetica_neue_lt_std_roman',
76
+ lineHeight: cx(16),
77
+ },
78
+ })
42
79
 
43
80
  return (
44
81
  <Card style={[styles.card, props.style]} onPress={props.onPress}>
@@ -76,7 +113,7 @@ const MoodItem = (props: MoodItemProps) => {
76
113
  );
77
114
  };
78
115
 
79
- export default MoodItem;
116
+ export default withTheme(MoodItem)
80
117
 
81
118
  export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boolean, type: 'gradient' | 'separate' }) {
82
119
  const { mixSubLight, isMix } = props;
@@ -85,6 +122,26 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
85
122
  ? hsv2Hex(n.h, Math.round(n.s), Math.round(mapFloatToRange(n.v / 100, 50, 100)))
86
123
  : cctToColor(n.colorTemp.toFixed());
87
124
  }) : ['#eee'];
125
+
126
+ const styles = StyleSheet.create({
127
+ gradientItem: {
128
+ flexDirection: 'row',
129
+ },
130
+ gradientItemIconView: {
131
+ width: cx(24),
132
+ height: cx(24),
133
+ justifyContent: 'center',
134
+ alignItems: 'center',
135
+ backgroundColor: '#aaa',
136
+ borderRadius: cx(8),
137
+ },
138
+ gradientItemIcon: {
139
+ width: cx(16),
140
+ height: cx(16),
141
+ tintColor: '#fff',
142
+ },
143
+ })
144
+
88
145
  return (
89
146
  <View style={styles.gradientItem}>
90
147
  <Spacer height={0} width={cx(16)} />
@@ -105,56 +162,3 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
105
162
  </View>
106
163
  );
107
164
  }
108
-
109
- const styles = StyleSheet.create({
110
- card: {
111
- marginHorizontal: cx(24),
112
- },
113
- headline: {
114
- flexDirection: 'row',
115
- marginHorizontal: cx(16),
116
- },
117
- headText: {
118
- flex: 1,
119
- color: '#000',
120
- fontSize: cx(16),
121
- fontFamily: 'helvetica_neue_lt_std_bd',
122
- lineHeight: cx(20),
123
- },
124
- gradientItem: {
125
- flexDirection: 'row',
126
- },
127
- gradientItemIconView: {
128
- width: cx(24),
129
- height: cx(24),
130
- justifyContent: 'center',
131
- alignItems: 'center',
132
- backgroundColor: '#aaa',
133
- borderRadius: cx(8),
134
- },
135
- gradientItemIcon: {
136
- width: cx(16),
137
- height: cx(16),
138
- tintColor: '#fff',
139
- },
140
- gradient: {
141
- borderRadius: cx(8),
142
- },
143
- moodTypeItem: {
144
- flexDirection: 'row',
145
- },
146
- moodTypeLabel: {
147
- marginStart: cx(16),
148
- paddingHorizontal: cx(12.5),
149
- backgroundColor: '#E6E7E8',
150
- borderRadius: cx(8),
151
- },
152
- moodTypeLabelText: {
153
- height: cx(16),
154
- color: '#000000DD',
155
- fontSize: cx(10),
156
- textAlignVertical: 'center',
157
- fontFamily: 'helvetica_neue_lt_std_roman',
158
- lineHeight: cx(16),
159
- },
160
- });
@@ -29,10 +29,11 @@ import { showDialog } from '@ledvance/base/src/utils/common';
29
29
  import I18n from '@ledvance/base/src/i18n';
30
30
 
31
31
  const cx = Utils.RatioUtils.convertX;
32
+ const { withTheme } = Utils.ThemeUtils
32
33
 
33
34
  const MAX_MOOD_COUNT = 255;
34
35
 
35
- const MoodPage = () => {
36
+ const MoodPage = (props: { theme?: any }) => {
36
37
  const params = useParams<MoodPageParams>();
37
38
  const deviceInfo = useDeviceInfo();
38
39
  const devId = useDeviceId();
@@ -76,7 +77,7 @@ const MoodPage = () => {
76
77
  }, []);
77
78
 
78
79
  const getRemoteMoodInfo = async (isRefresh?: boolean) => {
79
- state.loading = true
80
+ state.loading = true
80
81
  const res = await getRemoteMoodList(devId, params, params.featureId, isRefresh)
81
82
  state.loading = false
82
83
  if (res.success && Array.isArray(res.data)) {
@@ -275,9 +276,9 @@ const MoodPage = () => {
275
276
  (moodItem: MoodUIInfo) => {
276
277
  if (params.isCeilingLight) {
277
278
  return (
278
- moodInfo.mainLamp.id === moodItem.mainLamp.id &&
279
- moodInfo.secondaryLamp.id === moodItem.secondaryLamp.id &&
280
- (mainWork === WorkMode.Scene || secondaryWork === WorkMode.Scene) && !flagMode.flagMode && switchLed
279
+ moodInfo.mainLamp.id === moodItem.mainLamp.id &&
280
+ moodInfo.secondaryLamp.id === moodItem.secondaryLamp.id &&
281
+ (mainWork === WorkMode.Scene || secondaryWork === WorkMode.Scene) && !flagMode.flagMode && switchLed
281
282
  );
282
283
  } else if (params.isSupportSceneStatus && sceneStatusId !== -1) {
283
284
  return sceneStatusId === moodItem.id && mainWork === WorkMode.Scene && !flagMode.flagMode && switchLed
@@ -286,12 +287,34 @@ const MoodPage = () => {
286
287
  }
287
288
  },
288
289
  [moodInfo, mainWork, secondaryWork, flagMode?.flagMode, switchLed, sceneStatusId]
289
- );
290
+ );
290
291
 
291
292
  const nameRepeat = useCallback((mood: MoodUIInfo) => {
292
293
  return !!state.originMoods.filter(m => !(params.isCeilingLight ? (m.mainLamp.id === mood.mainLamp.id && m.secondaryLamp.id === mood.secondaryLamp.id) : (m.id === mood.id))).find(m => m.name === mood.name)
293
294
  }, [state.originMoods, params.isCeilingLight])
294
295
 
296
+ const styles = StyleSheet.create({
297
+ tagLine: {
298
+ flexDirection: 'row',
299
+ marginHorizontal: cx(24),
300
+ },
301
+ infoLine: {
302
+ marginHorizontal: cx(24),
303
+ },
304
+ addMoodPopover: {
305
+ position: 'absolute',
306
+ right: cx(60),
307
+ top: Platform.OS === 'android' ? cx(90) : cx(130),
308
+ maxWidth: cx(200),
309
+ backgroundColor: props.theme.card.background,
310
+ },
311
+ popoverItem: {
312
+ padding: cx(5),
313
+ alignItems: 'flex-start',
314
+ alignSelf: 'flex-start'
315
+ },
316
+ })
317
+
295
318
  return (
296
319
  <>
297
320
  <Page
@@ -308,36 +331,36 @@ const MoodPage = () => {
308
331
  loading={state.loading}
309
332
  >
310
333
  {!(params.isStringLight || params.isStripLight) && <View style={styles.tagLine}>
311
- <Tag
312
- checked={state.staticTagChecked}
313
- text={Strings.getLang('mood_overview_filter_name_text1')}
314
- onCheckedChange={checked => {
315
- state.staticTagChecked = checked;
316
- }}
317
- />
318
- <Spacer width={cx(8)} height={0} />
319
- <Tag
320
- checked={state.dynamicTagChecked}
321
- text={Strings.getLang('mood_overview_filter_name_text2')}
322
- onCheckedChange={checked => {
323
- state.dynamicTagChecked = checked;
324
- }}
325
- />
334
+ <Tag
335
+ checked={state.staticTagChecked}
336
+ text={Strings.getLang('mood_overview_filter_name_text1')}
337
+ onCheckedChange={checked => {
338
+ state.staticTagChecked = checked;
339
+ }}
340
+ />
341
+ <Spacer width={cx(8)} height={0} />
342
+ <Tag
343
+ checked={state.dynamicTagChecked}
344
+ text={Strings.getLang('mood_overview_filter_name_text2')}
345
+ onCheckedChange={checked => {
346
+ state.dynamicTagChecked = checked;
347
+ }}
348
+ />
326
349
  </View>}
327
350
  <TouchableOpacity style={{ alignItems: 'flex-end',paddingRight: cx(24) }}
328
- onPress={() => {
329
- showDialog({
330
- method: 'confirm',
331
- title: I18n.getLang('flag_resetbutton'),
332
- subTitle: I18n.getLang('flag_resetdescription'),
333
- onConfirm: async (_, { close }) => {
334
- close()
335
- await getRemoteMoodInfo(true)
336
- }
337
- })
338
- }}
351
+ onPress={() => {
352
+ showDialog({
353
+ method: 'confirm',
354
+ title: I18n.getLang('flag_resetbutton'),
355
+ subTitle: I18n.getLang('flag_resetdescription'),
356
+ onConfirm: async (_, { close }) => {
357
+ close()
358
+ await getRemoteMoodInfo(true)
359
+ }
360
+ })
361
+ }}
339
362
  >
340
- <Image source={res.ic_refresh} style={{ width: cx(24), height: cx(24) }} />
363
+ <Image source={res.ic_refresh} style={{ width: cx(24), height: cx(24), tintColor: props.theme.global.fontColor }} />
341
364
  </TouchableOpacity>
342
365
  <Spacer height={cx(10)} />
343
366
  {state.originMoods.length >= MAX_MOOD_COUNT && (
@@ -346,7 +369,7 @@ const MoodPage = () => {
346
369
  <InfoText
347
370
  icon={res.ic_warning_amber}
348
371
  text={Strings.getLang('mood_overview_warning_max_number_text')}
349
- contentColor={'#ff9500'}
372
+ contentColor={props.theme.global.warning}
350
373
  />
351
374
  <Spacer height={cx(6)} />
352
375
  </View>
@@ -401,26 +424,4 @@ const MoodPage = () => {
401
424
  );
402
425
  };
403
426
 
404
- const styles = StyleSheet.create({
405
- tagLine: {
406
- flexDirection: 'row',
407
- marginHorizontal: cx(24),
408
- },
409
- infoLine: {
410
- marginHorizontal: cx(24),
411
- },
412
- addMoodPopover: {
413
- position: 'absolute',
414
- right: cx(60),
415
- top: Platform.OS === 'android' ? cx(90) : cx(130),
416
- maxWidth: cx(200),
417
- backgroundColor: '#fff',
418
- },
419
- popoverItem: {
420
- padding: cx(5),
421
- alignItems: 'flex-start',
422
- alignSelf: 'flex-start'
423
- },
424
- });
425
-
426
- export default MoodPage;
427
+ export default withTheme(MoodPage)
@@ -8,6 +8,7 @@ import { MoodJumpGradientMode, MoodUIInfo } from './Interface';
8
8
  import { MixMoodColorsLine } from './MoodItem';
9
9
 
10
10
  const cx = Utils.RatioUtils.convertX;
11
+ const { withTheme } = Utils.ThemeUtils
11
12
 
12
13
  interface LightCategory {
13
14
  isMixLight?: boolean
@@ -17,6 +18,7 @@ interface LightCategory {
17
18
  }
18
19
 
19
20
  interface RecommendMixMoodItemProps {
21
+ theme?: any
20
22
  title: string;
21
23
  isMix: boolean;
22
24
  mood: MoodUIInfo;
@@ -29,7 +31,29 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
29
31
 
30
32
  const gradientMode = useMemo(() => (
31
33
  deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
32
- ), [MoodJumpGradientMode, deviceTypeOption])
34
+ ), [MoodJumpGradientMode, deviceTypeOption])
35
+
36
+
37
+ const styles = StyleSheet.create({
38
+ root: {
39
+ flexDirection: 'row',
40
+ alignItems: 'center',
41
+ marginHorizontal: cx(24),
42
+ },
43
+ content: {
44
+ height: cx(56),
45
+ marginHorizontal: cx(16),
46
+ width: cx(295)
47
+ },
48
+ title: {
49
+ color: props.theme.global.fontColor,
50
+ fontSize: cx(16),
51
+ fontFamily: 'helvetica_neue_lt_std_bd',
52
+ },
53
+ lineStyle: {
54
+ alignItems: 'center',
55
+ },
56
+ })
33
57
 
34
58
  return (
35
59
  <Card style={styles.root} onPress={props.onPress}>
@@ -39,7 +63,7 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
39
63
  style={styles.content}
40
64
  titleStyle={styles.title}
41
65
  iconStyle={{
42
- color: '#000',
66
+ color: props.theme.global.fontColor,
43
67
  size: cx(16),
44
68
  }}
45
69
  />
@@ -57,25 +81,4 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
57
81
  );
58
82
  };
59
83
 
60
- const styles = StyleSheet.create({
61
- root: {
62
- flexDirection: 'row',
63
- alignItems: 'center',
64
- marginHorizontal: cx(24),
65
- },
66
- content: {
67
- height: cx(56),
68
- marginHorizontal: cx(16),
69
- width: cx(295)
70
- },
71
- title: {
72
- color: '#000',
73
- fontSize: cx(16),
74
- fontFamily: 'helvetica_neue_lt_std_bd',
75
- },
76
- lineStyle: {
77
- alignItems: 'center',
78
- },
79
- });
80
-
81
- export default RecommendMixMoodItem;
84
+ export default withTheme(RecommendMixMoodItem)
@@ -25,6 +25,7 @@ import { showDialog } from '@ledvance/base/src/utils/common';
25
25
  import ColorAdjustView from '@ledvance/base/src/components/ColorAdjustView';
26
26
 
27
27
  const cx = Utils.RatioUtils.convertX;
28
+ const { withTheme } = Utils.ThemeUtils
28
29
 
29
30
  export interface StaticMoodEditorPageParams {
30
31
  mode: 'add' | 'edit';
@@ -42,7 +43,7 @@ export interface StaticMoodEditorPageState {
42
43
  loading: boolean;
43
44
  }
44
45
 
45
- const StaticMoodEditorPage = () => {
46
+ const StaticMoodEditorPage = (props: { theme?: any }) => {
46
47
  const navigation = useNavigation();
47
48
  const routeParams = useParams<StaticMoodEditorPageParams>();
48
49
  const params = cloneDeep(routeParams);
@@ -117,6 +118,40 @@ const StaticMoodEditorPage = () => {
117
118
  return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
118
119
  }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
119
120
 
121
+ const styles = StyleSheet.create({
122
+ root: {
123
+ flex: 1,
124
+ flexDirection: 'column',
125
+ },
126
+ name: {
127
+ marginHorizontal: cx(24),
128
+ },
129
+ adjustCard: {
130
+ marginTop: cx(12),
131
+ marginHorizontal: cx(24),
132
+ },
133
+ fanAdjustCard: {
134
+ marginHorizontal: cx(24),
135
+ },
136
+ preview: {
137
+ width: cx(20),
138
+ height: cx(20),
139
+ marginStart: cx(12),
140
+ borderRadius: cx(4),
141
+ },
142
+ deleteBtn: {
143
+ width: '100%',
144
+ height: cx(50),
145
+ backgroundColor: props.theme.button.delete,
146
+ borderRadius: cx(8),
147
+ },
148
+ deleteBtnText: {
149
+ color: props.theme.button.fontColor,
150
+ fontSize: cx(16),
151
+ fontFamily: 'helvetica_neue_lt_std_bd',
152
+ },
153
+ })
154
+
120
155
  return (
121
156
  <Page
122
157
  backText={I18n.getLang('mesh_device_detail_mode')}
@@ -147,7 +182,7 @@ const StaticMoodEditorPage = () => {
147
182
  }}
148
183
  maxLength={33}
149
184
  showError={state.mood.name.length > 32 || nameRepeat}
150
- tipColor={nameRepeat ? '#f00' : undefined}
185
+ tipColor={nameRepeat ? props.theme.global.error : undefined}
151
186
  tipIcon={nameRepeat ? res.ic_text_field_input_error : undefined}
152
187
  errorText={I18n.getLang(
153
188
  nameRepeat ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text'
@@ -204,47 +239,47 @@ const StaticMoodEditorPage = () => {
204
239
  )}
205
240
  </Card>
206
241
  {moduleParams.isMixLight && <Card style={styles.adjustCard}>
207
- <LdvSwitch
208
- title={I18n.getLang('add_new_trigger_time_field_headline_text3')}
209
- color={''}
210
- colorAlpha={1}
211
- enable={!!state.mood.secondaryLamp.enable}
212
- setEnable={(enable: boolean) => {
213
- if (enable && state.mood.secondaryLamp.nodes.length === 0) {
214
- state.mood.secondaryLamp.nodes.push(
215
- {
216
- h: 0,
217
- s: 100,
218
- v: 100,
219
- brightness: 100,
220
- colorTemp: 0,
221
- isColorNode: true,
242
+ <LdvSwitch
243
+ title={I18n.getLang('add_new_trigger_time_field_headline_text3')}
244
+ color={''}
245
+ colorAlpha={1}
246
+ enable={!!state.mood.secondaryLamp.enable}
247
+ setEnable={(enable: boolean) => {
248
+ if (enable && state.mood.secondaryLamp.nodes.length === 0) {
249
+ state.mood.secondaryLamp.nodes.push(
250
+ {
251
+ h: 0,
252
+ s: 100,
253
+ v: 100,
254
+ brightness: 100,
255
+ colorTemp: 0,
256
+ isColorNode: true,
257
+ }
258
+ );
222
259
  }
223
- );
224
- }
225
- state.mood.secondaryLamp.type = 3
226
- state.secondaryNode = state.mood.secondaryLamp.nodes[0]
227
- state.mood.secondaryLamp.enable = enable
228
- }} />
229
- {state.mood.secondaryLamp.enable &&
230
- <>
231
- <ColorAdjustView
232
- reserveSV={true}
233
- h={state.secondaryNode.h}
234
- s={state.secondaryNode.s}
235
- v={state.secondaryNode.v}
236
- onHSVChange={(h, s, v) => {
237
- state.secondaryNode.h = h
238
- state.secondaryNode.s = s
239
- state.secondaryNode.v = v
240
- }}
241
- onHSVChangeComplete={(h, s, v) => {
242
- state.secondaryNode.h = h
243
- state.secondaryNode.s = s
244
- state.secondaryNode.v = v
260
+ state.mood.secondaryLamp.type = 3
261
+ state.secondaryNode = state.mood.secondaryLamp.nodes[0]
262
+ state.mood.secondaryLamp.enable = enable
245
263
  }} />
246
- <Spacer />
247
- </>
264
+ {state.mood.secondaryLamp.enable &&
265
+ <>
266
+ <ColorAdjustView
267
+ reserveSV={true}
268
+ h={state.secondaryNode.h}
269
+ s={state.secondaryNode.s}
270
+ v={state.secondaryNode.v}
271
+ onHSVChange={(h, s, v) => {
272
+ state.secondaryNode.h = h
273
+ state.secondaryNode.s = s
274
+ state.secondaryNode.v = v
275
+ }}
276
+ onHSVChangeComplete={(h, s, v) => {
277
+ state.secondaryNode.h = h
278
+ state.secondaryNode.s = s
279
+ state.secondaryNode.v = v
280
+ }} />
281
+ <Spacer />
282
+ </>
248
283
  }
249
284
  </Card>}
250
285
  <Spacer />
@@ -297,47 +332,4 @@ const StaticMoodEditorPage = () => {
297
332
  );
298
333
  };
299
334
 
300
- const styles = StyleSheet.create({
301
- root: {
302
- flex: 1,
303
- flexDirection: 'column',
304
- },
305
- name: {
306
- marginHorizontal: cx(24),
307
- },
308
- adjustCard: {
309
- marginTop: cx(12),
310
- marginHorizontal: cx(24),
311
- },
312
- fanAdjustCard: {
313
- marginHorizontal: cx(24),
314
- },
315
- lightLine: {
316
- flexDirection: 'row',
317
- marginHorizontal: cx(16),
318
- },
319
- light: {
320
- color: '#000',
321
- fontSize: cx(18),
322
- fontFamily: 'helvetica_neue_lt_std_bd',
323
- },
324
- preview: {
325
- width: cx(20),
326
- height: cx(20),
327
- marginStart: cx(12),
328
- borderRadius: cx(4),
329
- },
330
- deleteBtn: {
331
- width: '100%',
332
- height: cx(50),
333
- backgroundColor: '#666',
334
- borderRadius: cx(8),
335
- },
336
- deleteBtnText: {
337
- color: '#fff',
338
- fontSize: cx(16),
339
- fontFamily: 'helvetica_neue_lt_std_bd',
340
- },
341
- });
342
-
343
- export default StaticMoodEditorPage;
335
+ export default withTheme(StaticMoodEditorPage)