@ledvance/group-ui-biz-bundle 1.0.76 → 1.0.77

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
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/group-ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.76",
7
+ "version": "1.0.77",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -246,7 +246,7 @@ const BiorhythmPage = () => {
246
246
  backText={deviceInfo.name}
247
247
  onBackClick={navigation.goBack}
248
248
  headlineText={I18n.getLang('add_new_trigger_time_system_back_text')}
249
- headlineContent={<Switch
249
+ headlineIconContent={<Switch
250
250
  value={state.enable}
251
251
  thumbColor={'#f60'}
252
252
  trackColor={{ false: '#00000026', true: '#ff660036' }}
@@ -19,6 +19,7 @@ import { difference, head, range } from 'lodash';
19
19
  import { RecommendMood, getRecommendMixMoods, getRecommendMoods } from './MoodInfo';
20
20
 
21
21
  const cx = Utils.RatioUtils.convertX;
22
+ const { withTheme } = Utils.ThemeUtils
22
23
 
23
24
  export interface AddMoodPageParams {
24
25
  isStatic: boolean;
@@ -32,7 +33,7 @@ interface AddMoodPageState {
32
33
  data: RecommendMood[];
33
34
  }
34
35
 
35
- const AddMoodPage = () => {
36
+ const AddMoodPage = (props: { theme?: any }) => {
36
37
  const navigation = useNavigation();
37
38
  const routeParams = useRoute().params as AddMoodPageParams;
38
39
  const moduleParams = routeParams.moduleParams;
@@ -77,6 +78,19 @@ const AddMoodPage = () => {
77
78
  [routeParams]
78
79
  );
79
80
 
81
+ const styles = StyleSheet.create({
82
+ root: {
83
+ flex: 1,
84
+ flexDirection: 'column',
85
+ },
86
+ desc: {
87
+ color: props.theme.global.fontColor,
88
+ fontSize: cx(16),
89
+ marginHorizontal: cx(24),
90
+ marginTop: cx(12),
91
+ },
92
+ })
93
+
80
94
  return (
81
95
  <Page
82
96
  backText={Strings.getLang('add_new_static_mood_system_back')}
@@ -120,20 +134,7 @@ const AddMoodPage = () => {
120
134
  );
121
135
  };
122
136
 
123
- const styles = StyleSheet.create({
124
- root: {
125
- flex: 1,
126
- flexDirection: 'column',
127
- },
128
- desc: {
129
- color: '#000',
130
- fontSize: cx(16),
131
- marginHorizontal: cx(24),
132
- marginTop: cx(12),
133
- },
134
- });
135
-
136
- export default AddMoodPage;
137
+ export default withTheme(AddMoodPage)
137
138
 
138
139
  const defStripConfig = {
139
140
  version: 0,
@@ -41,6 +41,7 @@ import { useParams } from '@ledvance/base/src/hooks/Hooks';
41
41
  import { showDialog } from '@ledvance/base/src/utils/common';
42
42
 
43
43
  const cx = Utils.RatioUtils.convertX;
44
+ const { withTheme } = Utils.ThemeUtils
44
45
  interface MixDynamicMoodEditorPageState extends StaticMoodEditorPageState {
45
46
  mainBucketSelected: boolean;
46
47
  secondaryBucketSelected: boolean;
@@ -48,7 +49,7 @@ interface MixDynamicMoodEditorPageState extends StaticMoodEditorPageState {
48
49
  secondaryIdx: number;
49
50
  sceneMode: StripLightMoodMode;
50
51
  }
51
- const MixDynamicMoodEditorPage = () => {
52
+ const MixDynamicMoodEditorPage = (props: { theme?: any }) => {
52
53
  const navigation = useNavigation();
53
54
  const routeParams = useParams<StaticMoodEditorPageParams>();
54
55
  const params = cloneDeep(routeParams);
@@ -143,6 +144,98 @@ const MixDynamicMoodEditorPage = () => {
143
144
  return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
144
145
  }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
145
146
 
147
+ const styles = StyleSheet.create({
148
+ root: {
149
+ flex: 1,
150
+ flexDirection: 'column',
151
+ },
152
+ name: {
153
+ marginHorizontal: cx(24),
154
+ },
155
+ adjustCard: {
156
+ marginVertical: cx(12),
157
+ marginHorizontal: cx(24),
158
+ },
159
+ fanAdjustCard: {
160
+ marginHorizontal: cx(24),
161
+ },
162
+ lightLine: {
163
+ flexDirection: 'row',
164
+ marginHorizontal: cx(16),
165
+ },
166
+ light: {
167
+ color: props.theme.global.fontColor,
168
+ fontSize: cx(18),
169
+ fontFamily: 'helvetica_neue_lt_std_bd',
170
+ },
171
+ transitionMode: {
172
+ marginHorizontal: cx(16),
173
+ },
174
+ preview: {
175
+ width: cx(20),
176
+ height: cx(20),
177
+ marginStart: cx(12),
178
+ borderRadius: cx(4),
179
+ },
180
+ nodesAdjust: {
181
+ flexDirection: 'row',
182
+ alignItems: 'center',
183
+ },
184
+ adjustButtons: {
185
+ width: cx(44),
186
+ marginStart: cx(16),
187
+ },
188
+ adjustButton: {
189
+ width: cx(44),
190
+ height: cx(44),
191
+ },
192
+ nodeList: {
193
+ flex: 1,
194
+ marginHorizontal: cx(16),
195
+ },
196
+ nodeItem: {
197
+ flexDirection: 'row',
198
+ alignItems: 'center',
199
+ },
200
+ nodeBlock: {
201
+ flex: 1,
202
+ height: cx(40),
203
+ borderRadius: cx(8),
204
+ },
205
+ nodeDeleteBtn: {
206
+ width: cx(24),
207
+ height: cx(30),
208
+ justifyContent: 'center',
209
+ alignItems: 'center',
210
+ },
211
+ nodeDeleteIcon: {
212
+ width: cx(16),
213
+ height: cx(16),
214
+ },
215
+ nodeAddBtn: {
216
+ height: cx(40),
217
+ justifyContent: 'center',
218
+ alignItems: 'center',
219
+ marginEnd: cx(26),
220
+ borderRadius: cx(8),
221
+ borderWidth: cx(1),
222
+ borderStyle: 'dashed',
223
+ borderColor: props.theme.addNode.border,
224
+ backgroundColor: props.theme.addNode.background,
225
+ },
226
+ deleteBtn: {
227
+ width: '100%',
228
+ height: cx(50),
229
+ backgroundColor: props.theme.button.delete,
230
+ borderRadius: cx(8),
231
+ },
232
+ deleteBtnText: {
233
+ color: props.theme.button.fontColor,
234
+ fontSize: cx(16),
235
+ fontFamily: 'helvetica_neue_lt_std_bd',
236
+ },
237
+ })
238
+
146
239
  return (
147
240
  <Page
148
241
  backText={I18n.getLang('mesh_device_detail_mode')}
@@ -193,7 +286,7 @@ const MixDynamicMoodEditorPage = () => {
193
286
  }}
194
287
  maxLength={33}
195
288
  showError={state.mood.name.length > 32 || nameRepeat}
196
- tipColor={nameRepeat ? '#f00' : undefined}
289
+ tipColor={nameRepeat ? props.theme.global.error : undefined}
197
290
  tipIcon={nameRepeat ? res.ic_text_field_input_error : undefined}
198
291
  errorText={I18n.getLang(
199
292
  nameRepeat ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text'
@@ -202,7 +295,7 @@ const MixDynamicMoodEditorPage = () => {
202
295
  <Card style={styles.adjustCard}>
203
296
  <LdvSwitch
204
297
  title={I18n.getLang('light_sources_tile_main_lighting_headline')}
205
- color="#fff"
298
+ color={props.theme.card.background}
206
299
  colorAlpha={1}
207
300
  enable={!!state.mood.mainLamp.enable}
208
301
  setEnable={v => {
@@ -272,7 +365,7 @@ const MixDynamicMoodEditorPage = () => {
272
365
  <Image
273
366
  style={[
274
367
  styles.adjustButton,
275
- { tintColor: state.mainBucketSelected ? '#f60' : '#666' },
368
+ { tintColor: state.mainBucketSelected ? props.theme.icon.primary : props.theme.icon.normal },
276
369
  ]}
277
370
  source={res.ic_paint_bucket}
278
371
  />
@@ -285,7 +378,7 @@ const MixDynamicMoodEditorPage = () => {
285
378
  <Image
286
379
  style={[
287
380
  styles.adjustButton,
288
- { tintColor: state.mainBucketSelected ? '#666' : '#f60' },
381
+ { tintColor: state.mainBucketSelected ? props.theme.icon.normal : props.theme.icon.primary },
289
382
  ]}
290
383
  source={res.ic_colorize}
291
384
  />
@@ -321,7 +414,7 @@ const MixDynamicMoodEditorPage = () => {
321
414
  style={[
322
415
  styles.nodeDeleteIcon,
323
416
  {
324
- tintColor: state.mood.mainLamp.nodes.length < 3 ? '#ccc' : '#666',
417
+ tintColor: state.mood.mainLamp.nodes.length < 3 ? props.theme.icon.disable : props.theme.icon.normal,
325
418
  },
326
419
  ]}
327
420
  source={res.ic_mood_del}
@@ -353,7 +446,7 @@ const MixDynamicMoodEditorPage = () => {
353
446
  style={{
354
447
  width: cx(18),
355
448
  height: cx(18),
356
- tintColor: '#000',
449
+ tintColor: props.theme.addNode.fontColor,
357
450
  }}
358
451
  source={{ uri: res.add }}
359
452
  />
@@ -397,7 +490,7 @@ const MixDynamicMoodEditorPage = () => {
397
490
  <Card style={styles.adjustCard}>
398
491
  <LdvSwitch
399
492
  title={I18n.getLang('light_sources_tile_sec_lighting_headline')}
400
- color={'#fff'}
493
+ color={props.theme.card.background}
401
494
  colorAlpha={1}
402
495
  enable={!!state.mood.secondaryLamp.enable}
403
496
  setEnable={v => {
@@ -537,7 +630,7 @@ const MixDynamicMoodEditorPage = () => {
537
630
  <Image
538
631
  style={[
539
632
  styles.adjustButton,
540
- { tintColor: state.secondaryBucketSelected ? '#f60' : '#666' },
633
+ { tintColor: state.secondaryBucketSelected ? props.theme.icon.primary : props.theme.icon.normal },
541
634
  ]}
542
635
  source={res.ic_paint_bucket}
543
636
  />
@@ -550,7 +643,7 @@ const MixDynamicMoodEditorPage = () => {
550
643
  <Image
551
644
  style={[
552
645
  styles.adjustButton,
553
- { tintColor: state.secondaryBucketSelected ? '#666' : '#f60' },
646
+ { tintColor: state.secondaryBucketSelected ? props.theme.icon.normal : props.theme.icon.primary },
554
647
  ]}
555
648
  source={res.ic_colorize}
556
649
  />
@@ -586,7 +679,7 @@ const MixDynamicMoodEditorPage = () => {
586
679
  styles.nodeDeleteIcon,
587
680
  {
588
681
  tintColor:
589
- state.mood.secondaryLamp.nodes.length < 3 ? '#ccc' : '#666',
682
+ state.mood.secondaryLamp.nodes.length < 3 ? props.theme.icon.disable : props.theme.icon.normal,
590
683
  },
591
684
  ]}
592
685
  source={res.ic_mood_del}
@@ -618,7 +711,7 @@ const MixDynamicMoodEditorPage = () => {
618
711
  style={{
619
712
  width: cx(18),
620
713
  height: cx(18),
621
- tintColor: '#000',
714
+ tintColor: props.theme.addNode.fontColor,
622
715
  }}
623
716
  source={{ uri: res.add }}
624
717
  />
@@ -698,98 +791,9 @@ const MixDynamicMoodEditorPage = () => {
698
791
  </Page>
699
792
  );
700
793
  };
701
- const styles = StyleSheet.create({
702
- root: {
703
- flex: 1,
704
- flexDirection: 'column',
705
- },
706
- name: {
707
- marginHorizontal: cx(24),
708
- },
709
- adjustCard: {
710
- marginVertical: cx(12),
711
- marginHorizontal: cx(24),
712
- },
713
- fanAdjustCard: {
714
- marginHorizontal: cx(24),
715
- },
716
- lightLine: {
717
- flexDirection: 'row',
718
- marginHorizontal: cx(16),
719
- },
720
- light: {
721
- color: '#000',
722
- fontSize: cx(18),
723
- fontFamily: 'helvetica_neue_lt_std_bd',
724
- },
725
- transitionMode: {
726
- marginHorizontal: cx(16),
727
- },
728
- preview: {
729
- width: cx(20),
730
- height: cx(20),
731
- marginStart: cx(12),
732
- borderRadius: cx(4),
733
- },
734
- nodesAdjust: {
735
- flexDirection: 'row',
736
- alignItems: 'center',
737
- },
738
- adjustButtons: {
739
- width: cx(44),
740
- marginStart: cx(16),
741
- },
742
- adjustButton: {
743
- width: cx(44),
744
- height: cx(44),
745
- },
746
- nodeList: {
747
- flex: 1,
748
- marginHorizontal: cx(16),
749
- },
750
- nodeItem: {
751
- flexDirection: 'row',
752
- alignItems: 'center',
753
- },
754
- nodeBlock: {
755
- flex: 1,
756
- height: cx(40),
757
- borderRadius: cx(8),
758
- },
759
- nodeDeleteBtn: {
760
- width: cx(24),
761
- height: cx(30),
762
- justifyContent: 'center',
763
- alignItems: 'center',
764
- },
765
- nodeDeleteIcon: {
766
- width: cx(16),
767
- height: cx(16),
768
- },
769
- nodeAddBtn: {
770
- height: cx(40),
771
- justifyContent: 'center',
772
- alignItems: 'center',
773
- marginEnd: cx(26),
774
- borderRadius: cx(8),
775
- borderWidth: cx(1),
776
- borderStyle: 'dashed',
777
- borderColor: '#666',
778
- backgroundColor: '#f6f6f6',
779
- },
780
- deleteBtn: {
781
- width: '100%',
782
- height: cx(50),
783
- backgroundColor: '#666',
784
- borderRadius: cx(8),
785
- },
786
- deleteBtnText: {
787
- color: '#fff',
788
- fontSize: cx(16),
789
- fontFamily: 'helvetica_neue_lt_std_bd',
790
- },
791
- });
792
- export default MixDynamicMoodEditorPage;
794
+
795
+ export default withTheme(MixDynamicMoodEditorPage)
796
+
793
797
  export function getTransitionModeString(transitionMode: MoodNodeTransitionMode): string {
794
798
  if (transitionMode === MoodNodeTransitionMode.Jump) {
795
799
  return I18n.getLang('other_lights_modes_jump_text');
@@ -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;
@@ -37,8 +39,43 @@ const MoodItem = (props: MoodItemProps) => {
37
39
  }, [mood.mainLamp.nodes, mood.secondaryLamp.nodes]);
38
40
 
39
41
  const gradientMode = useMemo(() => (
40
- deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
42
+ deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
41
43
  ), [MoodJumpGradientMode, deviceTypeOption])
44
+
45
+ const styles = StyleSheet.create({
46
+ card: {
47
+ marginHorizontal: cx(24),
48
+ },
49
+ headline: {
50
+ flexDirection: 'row',
51
+ marginHorizontal: cx(16),
52
+ },
53
+ headText: {
54
+ flex: 1,
55
+ color: props.theme.global.fontColor,
56
+ fontSize: cx(16),
57
+ fontFamily: 'helvetica_neue_lt_std_bd',
58
+ lineHeight: cx(20),
59
+ },
60
+ moodTypeItem: {
61
+ flexDirection: 'row',
62
+ },
63
+ moodTypeLabel: {
64
+ marginStart: cx(16),
65
+ paddingHorizontal: cx(12.5),
66
+ backgroundColor: props.theme.tag.background,
67
+ borderRadius: cx(8),
68
+ },
69
+ moodTypeLabelText: {
70
+ height: cx(16),
71
+ color: props.theme.tag.fontColor,
72
+ fontSize: cx(10),
73
+ textAlignVertical: 'center',
74
+ fontFamily: 'helvetica_neue_lt_std_roman',
75
+ lineHeight: cx(16),
76
+ },
77
+ });
78
+
42
79
  return (
43
80
  <Card style={[styles.card, props.style]} onPress={props.onPress}>
44
81
  <View>
@@ -75,7 +112,7 @@ const MoodItem = (props: MoodItemProps) => {
75
112
  );
76
113
  };
77
114
 
78
- export default MoodItem;
115
+ export default withTheme(MoodItem)
79
116
 
80
117
  export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boolean, type: 'gradient' | 'separate' }) {
81
118
  const { mixSubLight, isMix } = props;
@@ -84,6 +121,26 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
84
121
  ? hsv2Hex(n.h, Math.round(n.s), Math.round(mapFloatToRange(n.v / 100, 50, 100)))
85
122
  : cctToColor(n.colorTemp.toFixed());
86
123
  }) : ['#eee'];
124
+
125
+ const styles = StyleSheet.create({
126
+ gradientItem: {
127
+ flexDirection: 'row',
128
+ },
129
+ gradientItemIconView: {
130
+ width: cx(24),
131
+ height: cx(24),
132
+ justifyContent: 'center',
133
+ alignItems: 'center',
134
+ backgroundColor: '#aaa',
135
+ borderRadius: cx(8),
136
+ },
137
+ gradientItemIcon: {
138
+ width: cx(16),
139
+ height: cx(16),
140
+ tintColor: '#fff',
141
+ },
142
+ })
143
+
87
144
  return (
88
145
  <View style={styles.gradientItem}>
89
146
  <Spacer height={0} width={cx(16)} />
@@ -105,55 +162,3 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
105
162
  );
106
163
  }
107
164
 
108
- const styles = StyleSheet.create({
109
- card: {
110
- marginHorizontal: cx(24),
111
- },
112
- headline: {
113
- flexDirection: 'row',
114
- marginHorizontal: cx(16),
115
- },
116
- headText: {
117
- flex: 1,
118
- color: '#000',
119
- fontSize: cx(16),
120
- fontFamily: 'helvetica_neue_lt_std_bd',
121
- lineHeight: cx(20),
122
- },
123
- gradientItem: {
124
- flexDirection: 'row',
125
- },
126
- gradientItemIconView: {
127
- width: cx(24),
128
- height: cx(24),
129
- justifyContent: 'center',
130
- alignItems: 'center',
131
- backgroundColor: '#aaa',
132
- borderRadius: cx(8),
133
- },
134
- gradientItemIcon: {
135
- width: cx(16),
136
- height: cx(16),
137
- tintColor: '#fff',
138
- },
139
- gradient: {
140
- borderRadius: cx(8),
141
- },
142
- moodTypeItem: {
143
- flexDirection: 'row',
144
- },
145
- moodTypeLabel: {
146
- marginStart: cx(16),
147
- paddingHorizontal: cx(12.5),
148
- backgroundColor: '#E6E7E8',
149
- borderRadius: cx(8),
150
- },
151
- moodTypeLabelText: {
152
- height: cx(16),
153
- color: '#000000DD',
154
- fontSize: cx(10),
155
- textAlignVertical: 'center',
156
- fontFamily: 'helvetica_neue_lt_std_roman',
157
- lineHeight: cx(16),
158
- },
159
- });
@@ -26,10 +26,11 @@ import { useFlagMode } from '../flags/FlagActions';
26
26
  import { WorkMode } from '@ledvance/base/src/utils/interface';
27
27
 
28
28
  const cx = Utils.RatioUtils.convertX;
29
+ const { withTheme } = Utils.ThemeUtils
29
30
 
30
31
  const MAX_MOOD_COUNT = 255;
31
32
 
32
- const MoodPage = () => {
33
+ const MoodPage = (props: {theme?: any}) => {
33
34
  const params = useParams<MoodPageParams>();
34
35
  const deviceInfo = useDeviceInfo();
35
36
  const uaGroupInfo = useUAGroupInfo()
@@ -196,8 +197,8 @@ const MoodPage = () => {
196
197
  state.originMoods = cloneDeep(newScene);
197
198
  setMoods(cloneDeep(newScene));
198
199
  if (mode === 'del' && ((params.isCeilingLight ?
199
- (moodInfo.scene?.mainLamp.id !== checkedMood.mainLamp.id || moodInfo.scene?.secondaryLamp.id !== checkedMood.secondaryLamp.id) :
200
- moodInfo.scene?.id !== checkedMood.id) ||
200
+ (moodInfo.scene?.mainLamp.id !== checkedMood.mainLamp.id || moodInfo.scene?.secondaryLamp.id !== checkedMood.secondaryLamp.id) :
201
+ moodInfo.scene?.id !== checkedMood.id) ||
201
202
  (params.isCeilingLight ? (workMode !== WorkMode.Scene && rgbicWorkMode !== WorkMode.Scene) : workMode !== WorkMode.Scene) ||
202
203
  !switchLed)) {
203
204
  return {
@@ -252,6 +253,27 @@ const MoodPage = () => {
252
253
  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)
253
254
  }, [state.originMoods, params.isCeilingLight])
254
255
 
256
+ const styles = StyleSheet.create({
257
+ tagLine: {
258
+ flexDirection: 'row',
259
+ marginHorizontal: cx(24),
260
+ },
261
+ infoLine: {
262
+ marginHorizontal: cx(24),
263
+ },
264
+ addMoodPopover: {
265
+ position: 'absolute',
266
+ right: cx(60),
267
+ top: Platform.OS === 'android' ? cx(90) : cx(130),
268
+ maxWidth: cx(200),
269
+ backgroundColor: props.theme.card.background,
270
+ },
271
+ popoverItem: {
272
+ padding: cx(5),
273
+ alignItems: 'flex-start',
274
+ },
275
+ })
276
+
255
277
  return (
256
278
  <>
257
279
  <Page
@@ -268,21 +290,21 @@ const MoodPage = () => {
268
290
  loading={state.loading}
269
291
  >
270
292
  {!params.isStripLight && <View style={styles.tagLine}>
271
- <Tag
272
- checked={state.staticTagChecked}
273
- text={Strings.getLang('mood_overview_filter_name_text1')}
274
- onCheckedChange={checked => {
275
- state.staticTagChecked = checked;
276
- }}
277
- />
278
- <Spacer width={cx(8)} height={0} />
279
- <Tag
280
- checked={state.dynamicTagChecked}
281
- text={Strings.getLang('mood_overview_filter_name_text2')}
282
- onCheckedChange={checked => {
283
- state.dynamicTagChecked = checked;
284
- }}
285
- />
293
+ <Tag
294
+ checked={state.staticTagChecked}
295
+ text={Strings.getLang('mood_overview_filter_name_text1')}
296
+ onCheckedChange={checked => {
297
+ state.staticTagChecked = checked;
298
+ }}
299
+ />
300
+ <Spacer width={cx(8)} height={0} />
301
+ <Tag
302
+ checked={state.dynamicTagChecked}
303
+ text={Strings.getLang('mood_overview_filter_name_text2')}
304
+ onCheckedChange={checked => {
305
+ state.dynamicTagChecked = checked;
306
+ }}
307
+ />
286
308
  </View>}
287
309
  <Spacer height={cx(10)} />
288
310
  {state.originMoods.length >= MAX_MOOD_COUNT && (
@@ -291,7 +313,7 @@ const MoodPage = () => {
291
313
  <InfoText
292
314
  icon={res.ic_warning_amber}
293
315
  text={Strings.getLang('mood_overview_warning_max_number_text')}
294
- contentColor={'#ff9500'}
316
+ contentColor={props.theme.global.warning}
295
317
  />
296
318
  <Spacer height={cx(6)} />
297
319
  </View>
@@ -346,25 +368,5 @@ const MoodPage = () => {
346
368
  );
347
369
  };
348
370
 
349
- const styles = StyleSheet.create({
350
- tagLine: {
351
- flexDirection: 'row',
352
- marginHorizontal: cx(24),
353
- },
354
- infoLine: {
355
- marginHorizontal: cx(24),
356
- },
357
- addMoodPopover: {
358
- position: 'absolute',
359
- right: cx(60),
360
- top: Platform.OS === 'android' ? cx(90) : cx(130),
361
- maxWidth: cx(200),
362
- backgroundColor: '#fff',
363
- },
364
- popoverItem: {
365
- padding: cx(5),
366
- alignItems: 'flex-start',
367
- },
368
- });
369
371
 
370
- export default MoodPage;
372
+ export default withTheme(MoodPage)
@@ -24,6 +24,7 @@ import LdvSwitch from '@ledvance/base/src/components/ldvSwitch';
24
24
  import { showDialog } from '@ledvance/base/src/utils/common';
25
25
 
26
26
  const cx = Utils.RatioUtils.convertX;
27
+ const { withTheme } = Utils.ThemeUtils
27
28
 
28
29
  export interface StaticMoodEditorPageParams {
29
30
  mode: 'add' | 'edit';
@@ -41,7 +42,7 @@ export interface StaticMoodEditorPageState {
41
42
  loading: boolean;
42
43
  }
43
44
 
44
- const StaticMoodEditorPage = () => {
45
+ const StaticMoodEditorPage = (props: { theme?: any }) => {
45
46
  const navigation = useNavigation();
46
47
  const routeParams = useParams<StaticMoodEditorPageParams>();
47
48
  const params = cloneDeep(routeParams);
@@ -117,6 +118,41 @@ 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
+
122
+ const styles = StyleSheet.create({
123
+ root: {
124
+ flex: 1,
125
+ flexDirection: 'column',
126
+ },
127
+ name: {
128
+ marginHorizontal: cx(24),
129
+ },
130
+ adjustCard: {
131
+ marginTop: cx(12),
132
+ marginHorizontal: cx(24),
133
+ },
134
+ fanAdjustCard: {
135
+ marginHorizontal: cx(24),
136
+ },
137
+ preview: {
138
+ width: cx(20),
139
+ height: cx(20),
140
+ marginStart: cx(12),
141
+ borderRadius: cx(4),
142
+ },
143
+ deleteBtn: {
144
+ width: '100%',
145
+ height: cx(50),
146
+ backgroundColor: props.theme.button.delete,
147
+ borderRadius: cx(8),
148
+ },
149
+ deleteBtnText: {
150
+ color: props.theme.button.fontColor,
151
+ fontSize: cx(16),
152
+ fontFamily: 'helvetica_neue_lt_std_bd',
153
+ },
154
+ });
155
+
120
156
  return (
121
157
  <Page
122
158
  backText={I18n.getLang('mesh_device_detail_mode')}
@@ -147,7 +183,7 @@ const StaticMoodEditorPage = () => {
147
183
  }}
148
184
  maxLength={33}
149
185
  showError={state.mood.name.length > 32 || nameRepeat}
150
- tipColor={nameRepeat ? '#f00' : undefined}
186
+ tipColor={nameRepeat ? props.theme.global.error : undefined}
151
187
  tipIcon={nameRepeat ? res.ic_text_field_input_error : undefined}
152
188
  errorText={I18n.getLang(
153
189
  nameRepeat ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text'
@@ -253,47 +289,4 @@ const StaticMoodEditorPage = () => {
253
289
  );
254
290
  };
255
291
 
256
- const styles = StyleSheet.create({
257
- root: {
258
- flex: 1,
259
- flexDirection: 'column',
260
- },
261
- name: {
262
- marginHorizontal: cx(24),
263
- },
264
- adjustCard: {
265
- marginTop: cx(12),
266
- marginHorizontal: cx(24),
267
- },
268
- fanAdjustCard: {
269
- marginHorizontal: cx(24),
270
- },
271
- lightLine: {
272
- flexDirection: 'row',
273
- marginHorizontal: cx(16),
274
- },
275
- light: {
276
- color: '#000',
277
- fontSize: cx(18),
278
- fontFamily: 'helvetica_neue_lt_std_bd',
279
- },
280
- preview: {
281
- width: cx(20),
282
- height: cx(20),
283
- marginStart: cx(12),
284
- borderRadius: cx(4),
285
- },
286
- deleteBtn: {
287
- width: '100%',
288
- height: cx(50),
289
- backgroundColor: '#666',
290
- borderRadius: cx(8),
291
- },
292
- deleteBtnText: {
293
- color: '#fff',
294
- fontSize: cx(16),
295
- fontFamily: 'helvetica_neue_lt_std_bd',
296
- },
297
- });
298
-
299
- export default StaticMoodEditorPage;
292
+ export default withTheme(StaticMoodEditorPage)
@@ -362,7 +362,7 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
362
362
  </Text>
363
363
  <View
364
364
  style={{
365
- backgroundColor: props.theme.card.board,
365
+ backgroundColor: props.theme.card.border,
366
366
  borderRadius: 4,
367
367
  minHeight: cx(50),
368
368
  flex: 1,