@ledvance/group-ui-biz-bundle 1.0.79 → 1.0.80
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/modules/biorhythm/BiorhythmDetailPage.tsx +55 -53
- package/src/modules/biorhythm/BiorhythmPage.tsx +91 -89
- package/src/modules/biorhythm/IconSelect.tsx +5 -4
- package/src/modules/childLock/ChildLockPage.tsx +2 -2
- package/src/modules/energyConsumption/component/EnergyModal.tsx +2 -2
- package/src/modules/fixedTimingForLight/FixedTimingForLightDetailPage.tsx +66 -87
- package/src/modules/fixedTimingForLight/FixedTimingForLightPage.tsx +49 -58
- package/src/modules/fixedTimingForLight/ItemCard.tsx +29 -26
- package/src/modules/fixedTimingForLight/Summary.tsx +62 -58
- package/src/modules/mood_new/DynamicMoodEditorPage.tsx +102 -99
- package/src/modules/mood_new/RecommendMoodItem.tsx +28 -25
- package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +0 -17
- package/src/modules/remoteSwitch/RemoteSwitchPage.tsx +38 -36
- package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +9 -5
- package/src/modules/timeSchedule/TimeScheduleDetailPage.tsx +1 -1
- package/src/modules/timeSchedule/components/ManuaSettings.tsx +1 -0
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ import { useSystemTimeFormate } from '@ledvance/base/src/models/modules/NativePr
|
|
|
22
22
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
23
23
|
|
|
24
24
|
const cx = Utils.RatioUtils.convertX
|
|
25
|
+
const { withTheme } = Utils.ThemeUtils
|
|
25
26
|
|
|
26
27
|
export interface BiorhythmEditPageParams {
|
|
27
28
|
planData: Plan
|
|
@@ -37,7 +38,7 @@ export interface BiorhythmEditPageParams {
|
|
|
37
38
|
showDeleteBtn?: boolean
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
const BiorhythmEditPage = () => {
|
|
41
|
+
const BiorhythmEditPage = (props: { theme?: any }) => {
|
|
41
42
|
const navigation = useNavigation()
|
|
42
43
|
const is24Hour = useSystemTimeFormate()
|
|
43
44
|
const params = useParams<BiorhythmEditPageParams>()
|
|
@@ -104,6 +105,28 @@ const BiorhythmEditPage = () => {
|
|
|
104
105
|
return state.planData.name.length > 0 && state.planData.name.length < 33 && !nameRepeatFlag && !checkBiorhythmDataChanged && !minimumTipEnable()
|
|
105
106
|
}, [nameRepeatFlag, state.planData.name, checkBiorhythmDataChanged, minimumTipEnable()])
|
|
106
107
|
|
|
108
|
+
|
|
109
|
+
const styles = StyleSheet.create({
|
|
110
|
+
titleBGView: {
|
|
111
|
+
flexDirection: 'row',
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
paddingHorizontal: cx(16),
|
|
114
|
+
},
|
|
115
|
+
colorBlock: {
|
|
116
|
+
width: cx(20),
|
|
117
|
+
height: cx(20),
|
|
118
|
+
marginStart: cx(12),
|
|
119
|
+
borderRadius: cx(4),
|
|
120
|
+
},
|
|
121
|
+
title: {
|
|
122
|
+
color: props.theme.global.fontColor,
|
|
123
|
+
fontSize: cx(16),
|
|
124
|
+
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
125
|
+
paddingVertical: cx(16),
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
|
|
107
130
|
return (
|
|
108
131
|
<Page
|
|
109
132
|
backText={I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
@@ -118,7 +141,7 @@ const BiorhythmEditPage = () => {
|
|
|
118
141
|
<View
|
|
119
142
|
style={{
|
|
120
143
|
marginHorizontal: cx(24),
|
|
121
|
-
backgroundColor:
|
|
144
|
+
backgroundColor: props.theme.global.background,
|
|
122
145
|
}}>
|
|
123
146
|
<View style={{ height: cx(20) }} />
|
|
124
147
|
<TextField
|
|
@@ -134,7 +157,8 @@ const BiorhythmEditPage = () => {
|
|
|
134
157
|
<Spacer />
|
|
135
158
|
<TimerPicker
|
|
136
159
|
itemTextColor='#aeadb5'
|
|
137
|
-
style={{ paddingVertical: cx(0), marginVertical: cx(0) }}
|
|
160
|
+
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme.global.background }}
|
|
161
|
+
pickerFontColor={props.theme.global.fontColor}
|
|
138
162
|
is12Hours={!is24Hour}
|
|
139
163
|
singlePicker={true}
|
|
140
164
|
amText={I18n.getLang('manage_user_calendar_label_am')}
|
|
@@ -146,14 +170,14 @@ const BiorhythmEditPage = () => {
|
|
|
146
170
|
}}
|
|
147
171
|
/>
|
|
148
172
|
{minimumTipEnable() && <View style={{ flexDirection: 'row', marginVertical: cx(5) }}>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
173
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor }} source={res.ic_info} />
|
|
174
|
+
<Text
|
|
175
|
+
style={{ color: props.theme.global.fontColor, fontSize: cx(12) }}>{I18n.getLang('add_new_trigger_time_information_text')}</Text>
|
|
152
176
|
</View>}
|
|
153
177
|
<Spacer />
|
|
154
178
|
<View style={{ flexDirection: 'row' }}>
|
|
155
179
|
<View style={{ flex: 1 }}>
|
|
156
|
-
<Text style={{ fontSize: cx(14) }}>{I18n.getLang(isAdd ? 'add_new_trigger_time_text' : 'edit_trigger_time_headline_text')}</Text>
|
|
180
|
+
<Text style={{ fontSize: cx(14), color: props.theme.global.fontColor }}>{I18n.getLang(isAdd ? 'add_new_trigger_time_text' : 'edit_trigger_time_headline_text')}</Text>
|
|
157
181
|
</View>
|
|
158
182
|
<TouchableOpacity
|
|
159
183
|
activeOpacity={1}
|
|
@@ -170,15 +194,15 @@ const BiorhythmEditPage = () => {
|
|
|
170
194
|
<View
|
|
171
195
|
style={{ flex: 1, flexDirection: 'row', justifyContent: 'flex-end', alignContent: 'center', alignItems: 'center' }}>
|
|
172
196
|
<Image
|
|
173
|
-
style={{ width: cx(24), height: cx(24), tintColor:
|
|
197
|
+
style={{ width: cx(24), height: cx(24), tintColor: props.theme.global.fontColor }}
|
|
174
198
|
source={setImg()}
|
|
175
199
|
/>
|
|
176
|
-
<Image style={{ width: cx(16), height: cx(16) }} source={BiologicalRes.biorhythom_select_rightIcon} />
|
|
200
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor }} source={BiologicalRes.biorhythom_select_rightIcon} />
|
|
177
201
|
</View>
|
|
178
202
|
</TouchableOpacity>
|
|
179
203
|
</View>
|
|
180
204
|
<Text
|
|
181
|
-
style={{ fontSize: cx(16), fontFamily: 'helvetica_neue_lt_std_bd', marginTop: cx(33), marginBottom: cx(16) }}>
|
|
205
|
+
style={{ fontSize: cx(16), color: props.theme.global.fontColor, fontFamily: 'helvetica_neue_lt_std_bd', marginTop: cx(33), marginBottom: cx(16) }}>
|
|
182
206
|
{I18n.getLang('add_new_trigger_time_subheadline_text')}
|
|
183
207
|
</Text>
|
|
184
208
|
<Card>
|
|
@@ -221,52 +245,30 @@ const BiorhythmEditPage = () => {
|
|
|
221
245
|
<Spacer />
|
|
222
246
|
</View>
|
|
223
247
|
{!isAdd && showDeleteBtn &&
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
<View
|
|
249
|
+
style={{
|
|
250
|
+
marginHorizontal: cx(24),
|
|
251
|
+
marginVertical: cx(20)
|
|
252
|
+
}}>
|
|
253
|
+
<DeleteButton
|
|
254
|
+
text={I18n.getLang('edit_trigger_time_button_delete_text')}
|
|
255
|
+
onPress={() => {
|
|
256
|
+
showDialog({
|
|
257
|
+
method: 'confirm',
|
|
258
|
+
title: I18n.getLang('cancel_dialog_delete_item_bio_rhythm_titel'),
|
|
259
|
+
subTitle: I18n.getLang('cancel_dialog_delete_item_wakeupschedule_description'),
|
|
260
|
+
onConfirm: async (_, { close }) => {
|
|
261
|
+
close()
|
|
262
|
+
onDeleteBtnClick()
|
|
263
|
+
},
|
|
264
|
+
})
|
|
265
|
+
}}
|
|
266
|
+
/>
|
|
267
|
+
</View>}
|
|
244
268
|
</ScrollView>
|
|
245
269
|
</Page>
|
|
246
270
|
|
|
247
271
|
)
|
|
248
272
|
}
|
|
249
273
|
|
|
250
|
-
|
|
251
|
-
const styles = StyleSheet.create({
|
|
252
|
-
titleBGView: {
|
|
253
|
-
flexDirection: 'row',
|
|
254
|
-
alignItems: 'center',
|
|
255
|
-
paddingHorizontal: cx(16),
|
|
256
|
-
},
|
|
257
|
-
colorBlock: {
|
|
258
|
-
width: cx(20),
|
|
259
|
-
height: cx(20),
|
|
260
|
-
marginStart: cx(12),
|
|
261
|
-
borderRadius: cx(4),
|
|
262
|
-
},
|
|
263
|
-
title: {
|
|
264
|
-
color: '#000',
|
|
265
|
-
fontSize: cx(16),
|
|
266
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
267
|
-
paddingVertical: cx(16),
|
|
268
|
-
},
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
export default BiorhythmEditPage
|
|
274
|
+
export default withTheme(BiorhythmEditPage)
|
|
@@ -36,6 +36,7 @@ import DeleteButton from '@ledvance/base/src/components/DeleteButton'
|
|
|
36
36
|
import InfoText from '@ledvance/base/src/components/InfoText'
|
|
37
37
|
|
|
38
38
|
const cx = Utils.RatioUtils.convertX
|
|
39
|
+
const { withTheme } = Utils.ThemeUtils
|
|
39
40
|
const width = Utils.RatioUtils.width
|
|
40
41
|
|
|
41
42
|
|
|
@@ -53,7 +54,7 @@ export interface BiorhythmPageParams {
|
|
|
53
54
|
isMixLight: boolean
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
const BiorhythmPage = () => {
|
|
57
|
+
const BiorhythmPage = (props: { theme?: any }) => {
|
|
57
58
|
const navigation = useNavigation()
|
|
58
59
|
const params = useParams<BiorhythmPageParams>()
|
|
59
60
|
const [biorhythm, setBiorhythm] = useBiorhythm()
|
|
@@ -208,21 +209,21 @@ const BiorhythmPage = () => {
|
|
|
208
209
|
|
|
209
210
|
const sunHomeText = string => {
|
|
210
211
|
const text = string.split('SUN@HOME')
|
|
211
|
-
return text?.length === 1 && <Text style={{ fontSize: cx(14) }}>{text[0]}</Text> ||
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
212
|
+
return text?.length === 1 && <Text style={{ fontSize: cx(14), color: props.theme.global.fontColor }}>{text[0]}</Text> ||
|
|
213
|
+
<Text style={{
|
|
214
|
+
fontSize: cx(14),
|
|
215
|
+
flexDirection: 'row',
|
|
216
|
+
}}>
|
|
217
|
+
<Text style={{color: props.theme.global.fontColor }}>{text[0]}</Text>
|
|
218
|
+
<Text onPress={openLink}
|
|
219
|
+
style={{
|
|
220
|
+
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
221
|
+
color: props.theme.button.primary,
|
|
222
|
+
textDecorationLine: 'underline',
|
|
223
|
+
flexWrap: 'wrap',
|
|
224
|
+
}}>SUN@HOME</Text>
|
|
225
|
+
<Text style={{color: props.theme.global.fontColor }}>{text[1]}</Text>
|
|
226
|
+
</Text>
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
const randomIcon = () => {
|
|
@@ -248,7 +249,7 @@ const BiorhythmPage = () => {
|
|
|
248
249
|
headlineText={I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
249
250
|
headlineIconContent={<Switch
|
|
250
251
|
value={state.enable}
|
|
251
|
-
thumbColor={
|
|
252
|
+
thumbColor={props.theme.icon.primary}
|
|
252
253
|
trackColor={{ false: '#00000026', true: '#ff660036' }}
|
|
253
254
|
onValueChange={async enable => {
|
|
254
255
|
if (enable) return showDialog({
|
|
@@ -303,14 +304,14 @@ const BiorhythmPage = () => {
|
|
|
303
304
|
justifyContent: 'center',
|
|
304
305
|
alignItems: 'center',
|
|
305
306
|
borderRadius: cx(20),
|
|
306
|
-
backgroundColor: period.enabled ?
|
|
307
|
+
backgroundColor: period.enabled ? props.theme.global.thirdBrand : props.theme.global.background,
|
|
307
308
|
borderWidth: cx(1),
|
|
308
|
-
borderColor:
|
|
309
|
+
borderColor: props.theme.global.brand,
|
|
309
310
|
}}
|
|
310
311
|
>
|
|
311
312
|
<Text
|
|
312
313
|
style={{
|
|
313
|
-
color:
|
|
314
|
+
color: props.theme.global.brand,
|
|
314
315
|
textAlign: 'center',
|
|
315
316
|
}}
|
|
316
317
|
>
|
|
@@ -322,10 +323,10 @@ const BiorhythmPage = () => {
|
|
|
322
323
|
})}
|
|
323
324
|
</View>
|
|
324
325
|
<View style={{ marginHorizontal: cx(24), marginTop: cx(20) }}>
|
|
325
|
-
<Text>{state.weekString}</Text>
|
|
326
|
+
<Text style={{color: props.theme.global.fontColor}}>{state.weekString}</Text>
|
|
326
327
|
</View>
|
|
327
328
|
<View style={{ marginHorizontal: cx(24), marginTop: cx(16) }}>
|
|
328
|
-
<Text>
|
|
329
|
+
<Text style={{color: props.theme.global.fontColor}}>
|
|
329
330
|
{I18n.getLang('bio_ryhthm_default_selectionfield_topic_text')}
|
|
330
331
|
</Text>
|
|
331
332
|
<TouchableOpacity
|
|
@@ -337,17 +338,17 @@ const BiorhythmPage = () => {
|
|
|
337
338
|
style={{
|
|
338
339
|
flexDirection: 'row',
|
|
339
340
|
borderRadius: cx(4),
|
|
340
|
-
backgroundColor:
|
|
341
|
+
backgroundColor: props.theme.textInput.background,
|
|
341
342
|
alignItems: 'center',
|
|
342
343
|
flex: 1,
|
|
343
344
|
height: cx(44),
|
|
344
345
|
borderBottomWidth: cx(1),
|
|
345
|
-
borderBottomColor:
|
|
346
|
+
borderBottomColor: props.theme.textInput.line,
|
|
346
347
|
}}
|
|
347
348
|
>
|
|
348
349
|
<Text style={{
|
|
349
350
|
fontSize: cx(16),
|
|
350
|
-
color:
|
|
351
|
+
color: props.theme.textInput.fontColor,
|
|
351
352
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
352
353
|
paddingLeft: cx(16),
|
|
353
354
|
}}>
|
|
@@ -388,65 +389,66 @@ const BiorhythmPage = () => {
|
|
|
388
389
|
marginTop: cx(26),
|
|
389
390
|
}}>
|
|
390
391
|
{state.planList.length === 8 && <View
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
392
|
+
style={{ marginVertical: cx(10), flexDirection: 'row', alignItems: 'center', width: width - cx(48) }}>
|
|
393
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.warning }} source={res.ic_warning_amber} />
|
|
394
|
+
<Text
|
|
395
|
+
style={{
|
|
396
|
+
flexWrap: 'wrap',
|
|
397
|
+
fontSize: cx(12),
|
|
398
|
+
color: props.theme.global.fontColor
|
|
399
|
+
}}>{I18n.getLang('add_new_trigger_time_warning_max_number_text')}</Text>
|
|
398
400
|
</View>}
|
|
399
401
|
{state.planList.length < 8 &&
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
402
|
+
<>
|
|
403
|
+
<Text
|
|
404
|
+
style={{
|
|
405
|
+
fontSize: cx(16),
|
|
406
|
+
fontWeight: 'bold',
|
|
407
|
+
color: props.theme.global.fontColor,
|
|
408
|
+
}}>{I18n.getLang('bio_ryhthm_default_subheadline_text')}</Text>
|
|
409
|
+
<TouchableOpacity
|
|
410
|
+
onPress={() => {
|
|
411
|
+
const ids: number[] = state.planList.map(p => p.id)
|
|
412
|
+
const newPlan: Plan = {
|
|
413
|
+
id: Math.max(...ids) + 1,
|
|
414
|
+
icon: res.rhythm_icon1,
|
|
415
|
+
time: 0,
|
|
416
|
+
name: '',
|
|
417
|
+
colorTemperature: 0,
|
|
418
|
+
brightness: 100,
|
|
419
|
+
action: [
|
|
420
|
+
{
|
|
421
|
+
uri: 'model/attribute/set/LightCtrl/ColorTemperature',
|
|
422
|
+
startValue: `${colorTemperatureValue(0)}`,
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
uri: 'model/attribute/set/LightCtrl/Brightness',
|
|
426
|
+
startValue: '100',
|
|
427
|
+
},
|
|
428
|
+
],
|
|
429
|
+
enable: true,
|
|
430
|
+
iconId: randomIcon(),
|
|
431
|
+
}
|
|
432
|
+
const editPageParams: BiorhythmEditPageParams = {
|
|
433
|
+
planData: newPlan,
|
|
434
|
+
isAdd: true,
|
|
435
|
+
onPlanEdited,
|
|
436
|
+
onPlanDelete,
|
|
437
|
+
nameRepeat,
|
|
438
|
+
minimumEnable,
|
|
439
|
+
iconIdList: state.planList?.map(item => {
|
|
440
|
+
return item.iconId
|
|
441
|
+
}),
|
|
442
|
+
isMixLight: params.isMixLight,
|
|
443
|
+
isSupportTemperature: params.isSupportTemperature,
|
|
444
|
+
isSupportBrightness: params.isSupportBrightness,
|
|
445
|
+
showDeleteBtn
|
|
446
|
+
}
|
|
447
|
+
navigation.navigate(ui_biz_routerKey.group_ui_biz_biological_detail, editPageParams)
|
|
448
|
+
}}>
|
|
449
|
+
<Image source={BiologicalRes.biorhythom_add} style={{ height: cx(24), width: cx(24), tintColor: props.theme.icon.primary }} />
|
|
450
|
+
</TouchableOpacity>
|
|
451
|
+
</>
|
|
450
452
|
}
|
|
451
453
|
</View>
|
|
452
454
|
<FlatList
|
|
@@ -463,9 +465,9 @@ const BiorhythmPage = () => {
|
|
|
463
465
|
<View
|
|
464
466
|
style={{
|
|
465
467
|
height: cx(118),
|
|
466
|
-
backgroundColor:
|
|
468
|
+
backgroundColor: props.theme.card.background,
|
|
467
469
|
elevation: cx(7),
|
|
468
|
-
shadowColor:
|
|
470
|
+
shadowColor: props.theme.card.shadowColor,
|
|
469
471
|
shadowOpacity: 0.2,
|
|
470
472
|
shadowRadius: cx(7),
|
|
471
473
|
shadowOffset: {
|
|
@@ -516,13 +518,13 @@ const BiorhythmPage = () => {
|
|
|
516
518
|
height: cx(24),
|
|
517
519
|
marginStart: cx(10),
|
|
518
520
|
marginRight: cx(6),
|
|
519
|
-
tintColor:
|
|
521
|
+
tintColor: props.theme.icon.normal,
|
|
520
522
|
}}
|
|
521
523
|
/>
|
|
522
524
|
<Text
|
|
523
525
|
style={{
|
|
524
526
|
fontSize: cx(16),
|
|
525
|
-
color:
|
|
527
|
+
color: props.theme.global.fontColor,
|
|
526
528
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
527
529
|
}}
|
|
528
530
|
>
|
|
@@ -531,7 +533,7 @@ const BiorhythmPage = () => {
|
|
|
531
533
|
</View>
|
|
532
534
|
<Switch
|
|
533
535
|
value={item.enable}
|
|
534
|
-
thumbColor={
|
|
536
|
+
thumbColor={props.theme.icon.primary}
|
|
535
537
|
trackColor={{ false: '#00000026', true: '#ff660036' }}
|
|
536
538
|
onValueChange={e => {
|
|
537
539
|
item.enable = e
|
|
@@ -544,7 +546,7 @@ const BiorhythmPage = () => {
|
|
|
544
546
|
<Text
|
|
545
547
|
style={{
|
|
546
548
|
fontSize: cx(12),
|
|
547
|
-
color:
|
|
549
|
+
color: props.theme.global.secondFontColor,
|
|
548
550
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
549
551
|
paddingLeft: cx(20),
|
|
550
552
|
}}
|
|
@@ -654,6 +656,6 @@ const BiorhythmPage = () => {
|
|
|
654
656
|
)
|
|
655
657
|
}
|
|
656
658
|
|
|
657
|
-
export default BiorhythmPage
|
|
659
|
+
export default withTheme(BiorhythmPage)
|
|
658
660
|
|
|
659
661
|
|
|
@@ -8,6 +8,7 @@ import I18n from '@ledvance/base/src/i18n'
|
|
|
8
8
|
import { useParams } from '@ledvance/base/src/hooks/Hooks'
|
|
9
9
|
|
|
10
10
|
const cx = Utils.RatioUtils.convertX
|
|
11
|
+
const { withTheme } = Utils.ThemeUtils
|
|
11
12
|
|
|
12
13
|
interface IconSelectPageParams {
|
|
13
14
|
id: string | number
|
|
@@ -15,7 +16,7 @@ interface IconSelectPageParams {
|
|
|
15
16
|
iconIdList: any
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
function IconSelectPage() {
|
|
19
|
+
function IconSelectPage(props: { theme?: any }) {
|
|
19
20
|
const [list, setList] = useState(iconList)
|
|
20
21
|
const navigation = useNavigation()
|
|
21
22
|
const params = useParams<IconSelectPageParams>()
|
|
@@ -51,7 +52,7 @@ function IconSelectPage() {
|
|
|
51
52
|
/>
|
|
52
53
|
<ScrollView nestedScrollEnabled={true} style={{marginHorizontal: cx(24)}}>
|
|
53
54
|
<View style={{marginTop: cx(40), marginBottom: cx(20)}}>
|
|
54
|
-
<Text style={{fontSize: cx(24), color:
|
|
55
|
+
<Text style={{fontSize: cx(24), color: props.theme.global.brand}}>Select an icon</Text>
|
|
55
56
|
</View>
|
|
56
57
|
<View
|
|
57
58
|
style={{flexDirection: 'row', flex: 1, flexWrap: 'wrap', justifyContent: 'space-between', alignItems: 'flex-start'}}>
|
|
@@ -70,7 +71,7 @@ function IconSelectPage() {
|
|
|
70
71
|
width: cx(32),
|
|
71
72
|
height: cx(32),
|
|
72
73
|
margin: cx(10),
|
|
73
|
-
tintColor: item?.selectStatus ?
|
|
74
|
+
tintColor: item?.selectStatus ? props.theme.icon.primary : item?.disabled && props.theme.icon.disable || props.theme.icon.normal,
|
|
74
75
|
}}
|
|
75
76
|
/>
|
|
76
77
|
</TouchableOpacity>
|
|
@@ -81,4 +82,4 @@ function IconSelectPage() {
|
|
|
81
82
|
)
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
export default IconSelectPage
|
|
85
|
+
export default withTheme(IconSelectPage)
|
|
@@ -58,7 +58,7 @@ const ChildLockPage = (props: { theme?: any }) => {
|
|
|
58
58
|
paddingVertical: cx(16),
|
|
59
59
|
},
|
|
60
60
|
shadow: {
|
|
61
|
-
shadowColor: props.theme.
|
|
61
|
+
shadowColor: props.theme.card.shadowColor,
|
|
62
62
|
shadowOpacity: 0.2,
|
|
63
63
|
shadowRadius: 8,
|
|
64
64
|
elevation:8,
|
|
@@ -66,7 +66,7 @@ const ChildLockPage = (props: { theme?: any }) => {
|
|
|
66
66
|
width: 0,
|
|
67
67
|
height: 4,
|
|
68
68
|
},
|
|
69
|
-
backgroundColor: props.theme.
|
|
69
|
+
backgroundColor: props.theme.card.background,
|
|
70
70
|
borderRadius: 8,
|
|
71
71
|
},
|
|
72
72
|
})
|
|
@@ -265,13 +265,13 @@ const EnergyModal = (props: EnergyModalProps) => {
|
|
|
265
265
|
<TouchableOpacity onPress={() => {
|
|
266
266
|
props.onCancel && props.onCancel()
|
|
267
267
|
}}>
|
|
268
|
-
<Text style={{ color: props.theme.
|
|
268
|
+
<Text style={{ color: props.theme.button.cancel, fontSize: cx(16) }}>{props.cancelText}</Text>
|
|
269
269
|
</TouchableOpacity>
|
|
270
270
|
<Text style={{ color: props.theme.global.fontColor, fontSize: cx(16), fontWeight: 'bold' }}>{props.title}</Text>
|
|
271
271
|
<TouchableOpacity onPress={() => {
|
|
272
272
|
props.onConfirm && props.onConfirm(state.energyData)
|
|
273
273
|
}}>
|
|
274
|
-
<Text style={{ color: props.theme.
|
|
274
|
+
<Text style={{ color: props.theme.button.primary, fontSize: cx(16) }}>{props.confirmText}</Text>
|
|
275
275
|
</TouchableOpacity>
|
|
276
276
|
</View>
|
|
277
277
|
<View style={{ height: height - cx(100), paddingHorizontal: cx(16), backgroundColor: props.theme.global.background }}>
|