@ledvance/group-ui-biz-bundle 1.0.81 → 1.0.83
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 +12 -11
- package/src/modules/biorhythm/BiorhythmPage.tsx +25 -24
- package/src/modules/biorhythm/IconSelect.tsx +4 -3
- package/src/modules/childLock/ChildLockPage.tsx +7 -6
- package/src/modules/energyConsumption/EnergyConsumptionChart.tsx +3 -2
- package/src/modules/energyConsumption/EnergyConsumptionDetail.tsx +16 -15
- package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +16 -15
- package/src/modules/energyConsumption/component/BarChart.tsx +19 -5
- package/src/modules/energyConsumption/component/EnergyModal.tsx +26 -25
- package/src/modules/energyConsumption/component/Overview.tsx +10 -9
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugDetailPage.tsx +21 -20
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +8 -7
- package/src/modules/fixedTimeForPlug/ItemCard.tsx +4 -3
- package/src/modules/fixedTimeForPlug/Summary.tsx +7 -6
- package/src/modules/fixedTimingForLight/FixedTimingForLightDetailPage.tsx +22 -21
- package/src/modules/fixedTimingForLight/FixedTimingForLightPage.tsx +9 -8
- package/src/modules/fixedTimingForLight/ItemCard.tsx +4 -3
- package/src/modules/fixedTimingForLight/Summary.tsx +7 -6
- package/src/modules/flags/FlagEditPage.tsx +13 -12
- package/src/modules/flags/FlagItem.tsx +4 -3
- package/src/modules/flags/FlagPage.tsx +4 -2
- package/src/modules/lightMode/LightModePage.tsx +9 -8
- package/src/modules/mood_new/AddMoodPage.tsx +3 -2
- package/src/modules/mood_new/DynamicMoodEditorPage.tsx +12 -11
- package/src/modules/mood_new/MixDynamicMoodEditor.tsx +18 -17
- package/src/modules/mood_new/MoodItem.tsx +5 -4
- package/src/modules/mood_new/MoodPage.tsx +5 -4
- package/src/modules/mood_new/RecommendMoodItem.tsx +4 -3
- package/src/modules/mood_new/StaticMoodEditorPage.tsx +5 -4
- package/src/modules/music/MusicPage.tsx +8 -6
- package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +6 -5
- package/src/modules/randomTimeForPlug/ItemCard.tsx +4 -3
- package/src/modules/randomTimeForPlug/RandomTimeForPlugDetailPage.tsx +13 -12
- package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +8 -7
- package/src/modules/randomTimeForPlug/Summary.tsx +7 -6
- package/src/modules/randomTimingForLight/ItemCard.tsx +4 -3
- package/src/modules/randomTimingForLight/RandomTimingForLightDetailPage.tsx +14 -13
- package/src/modules/randomTimingForLight/RandomTimingForLightPage.tsx +9 -8
- package/src/modules/randomTimingForLight/Summary.tsx +7 -6
- package/src/modules/remoteSwitch/RemoteSwitchPage.tsx +5 -4
- package/src/modules/select/SelectPage.tsx +10 -9
- package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +24 -23
- package/src/modules/sleepWakeUp/SleepWakeUpPage.tsx +17 -16
- package/src/modules/switchGradient/SwitchGradientPage.tsx +4 -3
- package/src/modules/swithInching/SwithInching.tsx +7 -6
- package/src/modules/timeSchedule/TimeScheduleDetailPage.tsx +20 -19
- package/src/modules/timeSchedule/TimeSchedulePage.tsx +8 -7
- package/src/modules/timeSchedule/components/ManuaSettings.tsx +9 -9
- package/src/modules/timeSchedule/components/ScheduleCard.tsx +6 -4
- package/src/modules/timeSchedule/components/Summary.tsx +7 -6
- package/src/modules/timer/TimerPage.tsx +18 -17
|
@@ -11,11 +11,12 @@ import {View, Text, StyleSheet} from "react-native";
|
|
|
11
11
|
import Card from "@ledvance/base/src/components/Card";
|
|
12
12
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
13
13
|
import Stepper from '@ledvance/base/src/components/Stepper'
|
|
14
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
14
15
|
|
|
15
16
|
const {convertX: cx} = Utils.RatioUtils
|
|
16
17
|
const { withTheme } = Utils.ThemeUtils
|
|
17
18
|
|
|
18
|
-
const SwitchGradientPage = (props: { theme?:
|
|
19
|
+
const SwitchGradientPage = (props: { theme?: ThemeType }) => {
|
|
19
20
|
const devInfo = useDeviceInfo()
|
|
20
21
|
const navigation = useNavigation()
|
|
21
22
|
const [
|
|
@@ -42,7 +43,7 @@ const SwitchGradientPage = (props: { theme?: any }) => {
|
|
|
42
43
|
paddingHorizontal: cx(16),
|
|
43
44
|
},
|
|
44
45
|
stepTitle: {
|
|
45
|
-
color: props.theme
|
|
46
|
+
color: props.theme?.global.fontColor,
|
|
46
47
|
fontSize: cx(14),
|
|
47
48
|
},
|
|
48
49
|
stepGroup: {
|
|
@@ -51,7 +52,7 @@ const SwitchGradientPage = (props: { theme?: any }) => {
|
|
|
51
52
|
},
|
|
52
53
|
stepText: {
|
|
53
54
|
flex: 1,
|
|
54
|
-
color: props.theme
|
|
55
|
+
color: props.theme?.global.fontColor,
|
|
55
56
|
fontSize: cx(16),
|
|
56
57
|
},
|
|
57
58
|
})
|
|
@@ -8,6 +8,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 {useSwitchInching} from "./SwithInchingAction";
|
|
11
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
11
12
|
|
|
12
13
|
const {convertX: cx} = Utils.RatioUtils
|
|
13
14
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -19,7 +20,7 @@ interface SwitchInchingState {
|
|
|
19
20
|
flag: Symbol | number
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
const SwitchInching = (props: { theme?:
|
|
23
|
+
const SwitchInching = (props: { theme?: ThemeType }) => {
|
|
23
24
|
const deviceInfo = useDeviceInfo()
|
|
24
25
|
const navigation = useNavigation()
|
|
25
26
|
const [switchInching, setSwitchInching] = useSwitchInching()
|
|
@@ -71,7 +72,7 @@ const SwitchInching = (props: { theme?: any }) => {
|
|
|
71
72
|
|
|
72
73
|
const styles = StyleSheet.create({
|
|
73
74
|
switchContainer: {
|
|
74
|
-
backgroundColor: props.theme
|
|
75
|
+
backgroundColor: props.theme?.container.background,
|
|
75
76
|
marginHorizontal: cx(24),
|
|
76
77
|
padding: cx(10),
|
|
77
78
|
borderRadius: cx(6),
|
|
@@ -80,26 +81,26 @@ const SwitchInching = (props: { theme?: any }) => {
|
|
|
80
81
|
switchCardContainer: {
|
|
81
82
|
paddingVertical: cx(4),
|
|
82
83
|
paddingHorizontal: cx(10),
|
|
83
|
-
backgroundColor: props.theme
|
|
84
|
+
backgroundColor: props.theme?.global.background,
|
|
84
85
|
flexDirection: 'row',
|
|
85
86
|
justifyContent: 'center',
|
|
86
87
|
alignItems: 'center',
|
|
87
88
|
borderRadius: cx(6),
|
|
88
89
|
},
|
|
89
90
|
switchCardTitle: {
|
|
90
|
-
color: props.theme
|
|
91
|
+
color: props.theme?.global.fontColor,
|
|
91
92
|
fontSize: cx(14),
|
|
92
93
|
flex: 1,
|
|
93
94
|
fontWeight: '400',
|
|
94
95
|
},
|
|
95
96
|
switchDescription: {
|
|
96
|
-
color: props.theme
|
|
97
|
+
color: props.theme?.global.fontColor,
|
|
97
98
|
flexWrap: 'wrap',
|
|
98
99
|
fontSize: cx(12),
|
|
99
100
|
marginTop: cx(4),
|
|
100
101
|
},
|
|
101
102
|
secondTopic: {
|
|
102
|
-
color: props.theme
|
|
103
|
+
color: props.theme?.global.fontColor,
|
|
103
104
|
flexWrap: 'wrap',
|
|
104
105
|
fontSize: cx(14),
|
|
105
106
|
marginTop: cx(30),
|
|
@@ -43,6 +43,7 @@ import Summary from './components/Summary'
|
|
|
43
43
|
import { getRemoteMoodList } from '../mood_new/MoodActions'
|
|
44
44
|
import { MoodUIInfo } from '../mood_new/Interface';
|
|
45
45
|
import InfoText from '@ledvance/base/src/components/InfoText';
|
|
46
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
46
47
|
|
|
47
48
|
const { convertX: cx } = Utils.RatioUtils;
|
|
48
49
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -54,7 +55,7 @@ interface TimeScheduleDetailPageParams extends TimeSchedulePageParams {
|
|
|
54
55
|
refreshFn: () => void;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
const TimeScheduleDetailPage = (props: { theme?:
|
|
58
|
+
const TimeScheduleDetailPage = (props: { theme?: ThemeType }) => {
|
|
58
59
|
const params = useParams<TimeScheduleDetailPageParams>();
|
|
59
60
|
const navigation = useNavigation();
|
|
60
61
|
const uaGroupInfo = useUAGroupInfo()
|
|
@@ -218,13 +219,13 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
218
219
|
marginHorizontal: cx(24),
|
|
219
220
|
},
|
|
220
221
|
itemTitle: {
|
|
221
|
-
color: props.theme
|
|
222
|
+
color: props.theme?.global.fontColor,
|
|
222
223
|
fontSize: cx(16),
|
|
223
224
|
fontWeight: 'bold',
|
|
224
225
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
225
226
|
},
|
|
226
227
|
applyContent: {
|
|
227
|
-
backgroundColor: props.theme
|
|
228
|
+
backgroundColor: props.theme?.container.background,
|
|
228
229
|
borderRadius: 4,
|
|
229
230
|
minHeight: cx(55),
|
|
230
231
|
flex: 1,
|
|
@@ -236,7 +237,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
236
237
|
flexDirection: 'row',
|
|
237
238
|
justifyContent: 'space-between',
|
|
238
239
|
alignItems: 'center',
|
|
239
|
-
backgroundColor: props.theme
|
|
240
|
+
backgroundColor: props.theme?.global.background,
|
|
240
241
|
height: cx(35),
|
|
241
242
|
},
|
|
242
243
|
moodScrollView: {
|
|
@@ -244,13 +245,13 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
244
245
|
},
|
|
245
246
|
summaryRight: {
|
|
246
247
|
flexDirection: 'column',
|
|
247
|
-
backgroundColor: props.theme
|
|
248
|
+
backgroundColor: props.theme?.tag.background,
|
|
248
249
|
borderRadius: cx(16),
|
|
249
250
|
alignItems: 'center'
|
|
250
251
|
},
|
|
251
252
|
rightItem: {
|
|
252
253
|
paddingHorizontal: cx(12),
|
|
253
|
-
color: props.theme
|
|
254
|
+
color: props.theme?.tag.fontColor,
|
|
254
255
|
fontSize: cx(14)
|
|
255
256
|
},
|
|
256
257
|
switchButton: {
|
|
@@ -260,7 +261,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
260
261
|
marginBottom: cx(10),
|
|
261
262
|
},
|
|
262
263
|
text: {
|
|
263
|
-
color: props.theme
|
|
264
|
+
color: props.theme?.global.fontColor,
|
|
264
265
|
fontSize: cx(14)
|
|
265
266
|
},
|
|
266
267
|
})
|
|
@@ -316,8 +317,8 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
316
317
|
{/* pick */}
|
|
317
318
|
<TimerPicker
|
|
318
319
|
itemTextColor="#aeadb5"
|
|
319
|
-
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme
|
|
320
|
-
pickerFontColor={props.theme
|
|
320
|
+
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme?.global.background }}
|
|
321
|
+
pickerFontColor={props.theme?.global.fontColor}
|
|
321
322
|
is12Hours={!is24HourClock}
|
|
322
323
|
singlePicker={true}
|
|
323
324
|
amText={I18n.getLang('manage_user_calendar_label_am')}
|
|
@@ -340,7 +341,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
340
341
|
}}
|
|
341
342
|
/>
|
|
342
343
|
<Spacer />
|
|
343
|
-
<Text style={{ ...styles.cardContainer, color: props.theme
|
|
344
|
+
<Text style={{ ...styles.cardContainer, color: props.theme?.global.fontColor, fontSize: cx(14) }}>
|
|
344
345
|
{loopText(state.timeSchedule.loops.split(''))}
|
|
345
346
|
</Text>
|
|
346
347
|
<Spacer height={cx(30)} />
|
|
@@ -353,7 +354,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
353
354
|
<Spacer height={cx(10)} />
|
|
354
355
|
<View style={[styles.applyContent, {paddingTop: state.selectedSkill.length ? cx(10) : 0}]}>
|
|
355
356
|
{state.selectedSkill.length === 0 ? (
|
|
356
|
-
<Text style={{color: props.theme
|
|
357
|
+
<Text style={{color: props.theme?.global.fontColor}}>
|
|
357
358
|
{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}
|
|
358
359
|
</Text>
|
|
359
360
|
) : (
|
|
@@ -362,7 +363,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
362
363
|
style={[styles.applyItem, { marginBottom: cx(10), borderRadius: 4 }]}
|
|
363
364
|
key={skill.dp}
|
|
364
365
|
>
|
|
365
|
-
<Text style={{ color: props.theme
|
|
366
|
+
<Text style={{ color: props.theme?.global.fontColor }}>{skill.key}</Text>
|
|
366
367
|
{showSelectedIcon && (
|
|
367
368
|
<TouchableOpacity
|
|
368
369
|
onPress={() => {
|
|
@@ -372,7 +373,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
372
373
|
style={{ paddingHorizontal: cx(5) }}
|
|
373
374
|
>
|
|
374
375
|
<Image
|
|
375
|
-
style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
376
|
+
style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }}
|
|
376
377
|
source={res.ic_arrows_nav_clear}
|
|
377
378
|
/>
|
|
378
379
|
</TouchableOpacity>
|
|
@@ -391,9 +392,9 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
391
392
|
state.unSelectedSkill = state.unSelectedSkill.filter(s => item.dp !== s.dp);
|
|
392
393
|
}}
|
|
393
394
|
>
|
|
394
|
-
<Text style={{ color: props.theme
|
|
395
|
+
<Text style={{ color: props.theme?.global.fontColor }}>{item.key}</Text>
|
|
395
396
|
<Image
|
|
396
|
-
style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
397
|
+
style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }}
|
|
397
398
|
source={res.device_panel_timer_add}
|
|
398
399
|
/>
|
|
399
400
|
</TouchableOpacity>
|
|
@@ -422,13 +423,13 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
422
423
|
{(!state.selectedSkill.length && !showMoodFanSelectText) && <InfoText
|
|
423
424
|
style={{marginHorizontal: cx(24)}}
|
|
424
425
|
icon={res.ic_warning_amber}
|
|
425
|
-
contentColor={props.theme
|
|
426
|
+
contentColor={props.theme?.global.warning}
|
|
426
427
|
text={I18n.getLang('timeschedule_add_schedule_no_device_warning_text')}
|
|
427
428
|
/>}
|
|
428
429
|
{showMoodFanSelectText && <InfoText
|
|
429
430
|
style={{marginHorizontal: cx(24)}}
|
|
430
431
|
icon={res.ic_warning_amber}
|
|
431
|
-
contentColor={props.theme
|
|
432
|
+
contentColor={props.theme?.global.warnging}
|
|
432
433
|
text={I18n.getLang('timeschedule_add_schedule_devicestate_sec_warning_text')}
|
|
433
434
|
/>}
|
|
434
435
|
{state.isManual ? (
|
|
@@ -502,7 +503,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
502
503
|
<>
|
|
503
504
|
{!!state.selectedSkill.filter(skill => skill.enable).length && (
|
|
504
505
|
<>
|
|
505
|
-
<Text style={{ fontSize: cx(14), color: props.theme
|
|
506
|
+
<Text style={{ fontSize: cx(14), color: props.theme?.global.fontColor }}>
|
|
506
507
|
{I18n.getLang('feature_summary_action_txt_1')}
|
|
507
508
|
</Text>
|
|
508
509
|
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
@@ -525,7 +526,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
|
|
|
525
526
|
|
|
526
527
|
{!!state.selectedSkill.filter(skill => !skill.enable).length && (
|
|
527
528
|
<>
|
|
528
|
-
<Text style={{ fontSize: cx(14), color: props.theme
|
|
529
|
+
<Text style={{ fontSize: cx(14), color: props.theme?.global.fontColor }}>
|
|
529
530
|
{I18n.getLang('feature_summary_action_txt_2')}
|
|
530
531
|
</Text>
|
|
531
532
|
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
@@ -20,6 +20,7 @@ import { useParams } from '@ledvance/base/src/hooks/Hooks';
|
|
|
20
20
|
import ScheduleCard from './components/ScheduleCard';
|
|
21
21
|
import { ui_biz_routerKey } from "../../navigation/Routers";
|
|
22
22
|
import { ApplyForItem } from '@ledvance/base/src/utils/interface';
|
|
23
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
23
24
|
|
|
24
25
|
const { convertX: cx } = Utils.RatioUtils;
|
|
25
26
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -43,7 +44,7 @@ export interface TimeSchedulePageParams {
|
|
|
43
44
|
manualDataObj2Dp: (deviceState: DeviceStateType, applyForList: ApplyForItem[]) => Record<string, any>;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
const TimeSchedulePage = (props: { theme?:
|
|
47
|
+
const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
47
48
|
const deviceInfo = useDeviceInfo();
|
|
48
49
|
const navigation = useNavigation();
|
|
49
50
|
const uaGroupInfo = useUAGroupInfo()
|
|
@@ -120,7 +121,7 @@ const TimeSchedulePage = (props: { theme?: any }) => {
|
|
|
120
121
|
|
|
121
122
|
const styles = StyleSheet.create({
|
|
122
123
|
overviewDescription: {
|
|
123
|
-
color: props.theme
|
|
124
|
+
color: props.theme?.global.fontColor,
|
|
124
125
|
marginHorizontal: cx(24),
|
|
125
126
|
fontSize: cx(12)
|
|
126
127
|
},
|
|
@@ -137,7 +138,7 @@ const TimeSchedulePage = (props: { theme?: any }) => {
|
|
|
137
138
|
width: 'auto',
|
|
138
139
|
minWidth: cx(150),
|
|
139
140
|
paddingHorizontal: cx(16),
|
|
140
|
-
backgroundColor: props.theme
|
|
141
|
+
backgroundColor: props.theme?.button.primary,
|
|
141
142
|
},
|
|
142
143
|
})
|
|
143
144
|
|
|
@@ -162,8 +163,8 @@ const TimeSchedulePage = (props: { theme?: any }) => {
|
|
|
162
163
|
text={I18n.getLang('motion_detection_time_schedule_notifications_warning_text')}
|
|
163
164
|
icon={res.ic_warning_amber}
|
|
164
165
|
style={{ marginHorizontal: cx(24) }}
|
|
165
|
-
textStyle={{ color: props.theme
|
|
166
|
-
iconStyle={{ tintColor: props.theme
|
|
166
|
+
textStyle={{ color: props.theme?.global.secondFontColor, fontSize: cx(12) }}
|
|
167
|
+
iconStyle={{ tintColor: props.theme?.global.warning }}
|
|
167
168
|
/>
|
|
168
169
|
)}
|
|
169
170
|
{ state.timeScheduleList.length > 0 ?
|
|
@@ -203,8 +204,8 @@ const TimeSchedulePage = (props: { theme?: any }) => {
|
|
|
203
204
|
icon={res.device_panel_schedule_alert}
|
|
204
205
|
text={I18n.getLang('timeschedule_overview_empty_information_text')}
|
|
205
206
|
style={{width: 'auto', alignItems: 'center'}}
|
|
206
|
-
textStyle={{color: props.theme
|
|
207
|
-
iconStyle={{tintColor: props.theme
|
|
207
|
+
textStyle={{color: props.theme?.global.secondFontColor, fontSize: cx(12), flex: undefined}}
|
|
208
|
+
iconStyle={{tintColor: props.theme?.global.secondFontColor}}
|
|
208
209
|
/>
|
|
209
210
|
<Spacer height={cx(16)}/>
|
|
210
211
|
<DeleteButton
|
|
@@ -73,7 +73,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
73
73
|
<Card style={{ marginHorizontal: cx(24) }}>
|
|
74
74
|
<LdvSwitch
|
|
75
75
|
title={item.name || item.key}
|
|
76
|
-
color={props.theme
|
|
76
|
+
color={props.theme?.card.background}
|
|
77
77
|
colorAlpha={1}
|
|
78
78
|
enable={item.enable}
|
|
79
79
|
setEnable={(enable: boolean) => {
|
|
@@ -192,7 +192,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
192
192
|
))}
|
|
193
193
|
</View>
|
|
194
194
|
);
|
|
195
|
-
}, [state.deviceData, state.applyForList, props.theme
|
|
195
|
+
}, [state.deviceData, state.applyForList, props.theme?.card.background]);
|
|
196
196
|
|
|
197
197
|
const mixLightCard = useMemo(() => {
|
|
198
198
|
return (
|
|
@@ -202,7 +202,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
202
202
|
<Card style={{ marginHorizontal: cx(24) }}>
|
|
203
203
|
<LdvSwitch
|
|
204
204
|
title={item.key}
|
|
205
|
-
color={props.theme
|
|
205
|
+
color={props.theme?.card.background}
|
|
206
206
|
colorAlpha={1}
|
|
207
207
|
enable={item.enable}
|
|
208
208
|
setEnable={(enable: boolean) => {
|
|
@@ -257,7 +257,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
257
257
|
))}
|
|
258
258
|
</View>
|
|
259
259
|
);
|
|
260
|
-
}, [state.deviceData, state.applyForList, props.theme
|
|
260
|
+
}, [state.deviceData, state.applyForList, props.theme?.card.background]);
|
|
261
261
|
|
|
262
262
|
const stripLightCard = useMemo(() => {
|
|
263
263
|
const deviceData = state.deviceData as StripLightData
|
|
@@ -266,7 +266,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
266
266
|
<Card style={{ marginHorizontal: cx(24) }}>
|
|
267
267
|
<LdvSwitch
|
|
268
268
|
title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
|
|
269
|
-
color={props.theme
|
|
269
|
+
color={props.theme?.card.background}
|
|
270
270
|
colorAlpha={1}
|
|
271
271
|
enable={state.applyForList[0]?.enable}
|
|
272
272
|
setEnable={(enable: boolean) => {
|
|
@@ -327,7 +327,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
327
327
|
<Spacer />
|
|
328
328
|
</View>
|
|
329
329
|
);
|
|
330
|
-
}, [state.deviceData, state.applyForList, props.theme
|
|
330
|
+
}, [state.deviceData, state.applyForList, props.theme?.card.background]);
|
|
331
331
|
|
|
332
332
|
const ceilingLightCard = useMemo(() => {
|
|
333
333
|
const deviceData = state.deviceData as CeilingLightData
|
|
@@ -338,7 +338,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
338
338
|
<Card style={{ marginHorizontal: cx(24) }}>
|
|
339
339
|
<LdvSwitch
|
|
340
340
|
title={item.key}
|
|
341
|
-
color={props.theme
|
|
341
|
+
color={props.theme?.card.background}
|
|
342
342
|
colorAlpha={1}
|
|
343
343
|
enable={item.enable}
|
|
344
344
|
setEnable={(enable: boolean) => {
|
|
@@ -422,7 +422,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
422
422
|
))}
|
|
423
423
|
</View>
|
|
424
424
|
)
|
|
425
|
-
}, [state.deviceData, state.applyForList, props.theme
|
|
425
|
+
}, [state.deviceData, state.applyForList, props.theme?.card.background])
|
|
426
426
|
|
|
427
427
|
const componentRender = useMemo(() => {
|
|
428
428
|
const component =
|
|
@@ -434,7 +434,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
434
434
|
? ceilingLightCard
|
|
435
435
|
: lightSourceCard;
|
|
436
436
|
return component;
|
|
437
|
-
}, [props.manualData.type, state.applyForList, state.deviceData, props.theme
|
|
437
|
+
}, [props.manualData.type, state.applyForList, state.deviceData, props.theme?.card.background]);
|
|
438
438
|
|
|
439
439
|
|
|
440
440
|
return <View>{componentRender}</View>;
|
|
@@ -5,11 +5,13 @@ import { SwitchButton, Utils } from 'tuya-panel-kit';
|
|
|
5
5
|
import { convertTo12HourFormat, loopText } from '@ledvance/base/src/utils/common';
|
|
6
6
|
import { Timer } from "../Interface";
|
|
7
7
|
import { useSystemTimeFormate } from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
8
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
9
|
+
|
|
8
10
|
const { convertX: cx } = Utils.RatioUtils;
|
|
9
11
|
const { withTheme } = Utils.ThemeUtils
|
|
10
12
|
|
|
11
13
|
interface ScheduleCardProps {
|
|
12
|
-
theme?:
|
|
14
|
+
theme?: ThemeType
|
|
13
15
|
item: Timer
|
|
14
16
|
style?: ViewStyle
|
|
15
17
|
onEnableChange: (enable: boolean) => void
|
|
@@ -37,20 +39,20 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
37
39
|
marginLeft: cx(16),
|
|
38
40
|
},
|
|
39
41
|
time: {
|
|
40
|
-
color: props.theme
|
|
42
|
+
color: props.theme?.global.fontColor,
|
|
41
43
|
marginBottom: cx(5),
|
|
42
44
|
fontSize: 16,
|
|
43
45
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
44
46
|
fontWeight: 'bold',
|
|
45
47
|
},
|
|
46
48
|
loop: {
|
|
47
|
-
color: props.theme
|
|
49
|
+
color: props.theme?.global.fontColor,
|
|
48
50
|
fontSize: cx(14),
|
|
49
51
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
50
52
|
marginTop: cx(8),
|
|
51
53
|
},
|
|
52
54
|
name: {
|
|
53
|
-
color: props.theme
|
|
55
|
+
color: props.theme?.global.fontColor,
|
|
54
56
|
fontSize: cx(14),
|
|
55
57
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
56
58
|
marginTop: cx(8),
|
|
@@ -4,12 +4,13 @@ import res from "@ledvance/base/src/res"
|
|
|
4
4
|
import I18n from "@ledvance/base/src/i18n";
|
|
5
5
|
import { Utils } from "tuya-panel-kit";
|
|
6
6
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
7
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
7
8
|
|
|
8
9
|
const { convertX: cx } = Utils.RatioUtils;
|
|
9
10
|
const { withTheme } = Utils.ThemeUtils
|
|
10
11
|
|
|
11
12
|
interface SummaryProps {
|
|
12
|
-
theme?:
|
|
13
|
+
theme?: ThemeType
|
|
13
14
|
style?: ViewStyle
|
|
14
15
|
frequency?: string | ReactElement
|
|
15
16
|
time?: string | ReactElement
|
|
@@ -24,7 +25,7 @@ const Summary = (props: SummaryProps) => {
|
|
|
24
25
|
marginHorizontal: cx(24),
|
|
25
26
|
},
|
|
26
27
|
itemTitle: {
|
|
27
|
-
color: props.theme
|
|
28
|
+
color: props.theme?.global.fontColor,
|
|
28
29
|
fontSize: cx(16),
|
|
29
30
|
fontWeight: 'bold',
|
|
30
31
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
@@ -40,14 +41,14 @@ const Summary = (props: SummaryProps) => {
|
|
|
40
41
|
minWidth: cx(100)
|
|
41
42
|
},
|
|
42
43
|
summaryImg: {
|
|
43
|
-
tintColor: props.theme
|
|
44
|
+
tintColor: props.theme?.global.fontColor,
|
|
44
45
|
width: cx(12),
|
|
45
46
|
height: cx(12),
|
|
46
47
|
marginRight: cx(6)
|
|
47
48
|
},
|
|
48
49
|
leftTitle: {
|
|
49
50
|
fontSize: cx(14),
|
|
50
|
-
color: props.theme
|
|
51
|
+
color: props.theme?.global.fontColor
|
|
51
52
|
},
|
|
52
53
|
summaryRight: {
|
|
53
54
|
flex: 1,
|
|
@@ -58,10 +59,10 @@ const Summary = (props: SummaryProps) => {
|
|
|
58
59
|
borderRadius: cx(16),
|
|
59
60
|
paddingHorizontal: cx(12),
|
|
60
61
|
alignSelf: 'flex-start',
|
|
61
|
-
backgroundColor: props.theme
|
|
62
|
+
backgroundColor: props.theme?.tag.background,
|
|
62
63
|
},
|
|
63
64
|
rightItem: {
|
|
64
|
-
color: props.theme
|
|
65
|
+
color: props.theme?.tag.fontColor,
|
|
65
66
|
fontSize: cx(14)
|
|
66
67
|
},
|
|
67
68
|
})
|
|
@@ -16,11 +16,12 @@ import dayjs from 'dayjs'
|
|
|
16
16
|
import Card from '@ledvance/base/src/components/Card'
|
|
17
17
|
import TextButton from '@ledvance/base/src/components/TextButton'
|
|
18
18
|
import { CircularProgress } from '@ledvance/base/src/components/CircularProgress'
|
|
19
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
19
20
|
|
|
20
21
|
const { convertX: cx } = Utils.RatioUtils
|
|
21
22
|
const { withTheme } = Utils.ThemeUtils
|
|
22
23
|
|
|
23
|
-
const TimerPage = (props: { theme?:
|
|
24
|
+
const TimerPage = (props: { theme?: ThemeType }) => {
|
|
24
25
|
const devInfo = useDeviceInfo()
|
|
25
26
|
const params = useParams<TimerPageParams>()
|
|
26
27
|
const [timerTasks, setTimerTasks, changeTimerTasks] = useTimerTasks(params.timerSettableDps, params.devIdGroup)
|
|
@@ -57,13 +58,13 @@ const TimerPage = (props: { theme?: any }) => {
|
|
|
57
58
|
marginHorizontal: cx(24),
|
|
58
59
|
},
|
|
59
60
|
applyFor: {
|
|
60
|
-
color: props.theme
|
|
61
|
+
color: props.theme?.global.fontColor,
|
|
61
62
|
fontSize: cx(16),
|
|
62
63
|
fontWeight: 'bold',
|
|
63
64
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
64
65
|
},
|
|
65
66
|
taskList: {
|
|
66
|
-
backgroundColor: props.theme
|
|
67
|
+
backgroundColor: props.theme?.container.background,
|
|
67
68
|
paddingTop: cx(8),
|
|
68
69
|
borderRadius: cx(4),
|
|
69
70
|
},
|
|
@@ -73,16 +74,16 @@ const TimerPage = (props: { theme?: any }) => {
|
|
|
73
74
|
flexDirection: 'row',
|
|
74
75
|
justifyContent: 'space-between',
|
|
75
76
|
alignItems: 'center',
|
|
76
|
-
backgroundColor: props.theme
|
|
77
|
+
backgroundColor: props.theme?.global.background,
|
|
77
78
|
},
|
|
78
79
|
taskItemText: {
|
|
79
|
-
color: props.theme
|
|
80
|
+
color: props.theme?.global.fontColor,
|
|
80
81
|
fontSize: 14,
|
|
81
82
|
marginHorizontal: cx(8),
|
|
82
83
|
marginVertical: cx(9),
|
|
83
84
|
},
|
|
84
85
|
taskItemIcon: {
|
|
85
|
-
tintColor: props.theme
|
|
86
|
+
tintColor: props.theme?.global.fontColor,
|
|
86
87
|
width: cx(16),
|
|
87
88
|
height: cx(16),
|
|
88
89
|
marginRight: cx(8),
|
|
@@ -93,7 +94,7 @@ const TimerPage = (props: { theme?: any }) => {
|
|
|
93
94
|
marginBottom: cx(14),
|
|
94
95
|
},
|
|
95
96
|
listEmptyText: {
|
|
96
|
-
color: props.theme
|
|
97
|
+
color: props.theme?.global.secondFontColor,
|
|
97
98
|
fontSize: cx(14),
|
|
98
99
|
},
|
|
99
100
|
noSelectTaskList: {},
|
|
@@ -104,7 +105,7 @@ const TimerPage = (props: { theme?: any }) => {
|
|
|
104
105
|
},
|
|
105
106
|
noSelectTaskText: {
|
|
106
107
|
flex: 1,
|
|
107
|
-
color: props.theme
|
|
108
|
+
color: props.theme?.global.fontColor,
|
|
108
109
|
fontSize: cx(14),
|
|
109
110
|
},
|
|
110
111
|
activeTaskHeadLine: {
|
|
@@ -113,47 +114,47 @@ const TimerPage = (props: { theme?: any }) => {
|
|
|
113
114
|
},
|
|
114
115
|
activeTaskHeadLineText: {
|
|
115
116
|
flex: 1,
|
|
116
|
-
color: props.theme
|
|
117
|
+
color: props.theme?.global.fontColor,
|
|
117
118
|
fontSize: cx(14),
|
|
118
119
|
},
|
|
119
120
|
activeTaskHeadLineBtn: {
|
|
120
121
|
minWidth: cx(50),
|
|
121
122
|
height: cx(24),
|
|
122
123
|
padding: 0,
|
|
123
|
-
backgroundColor: props.theme
|
|
124
|
+
backgroundColor: props.theme?.button.cancel,
|
|
124
125
|
borderRadius: cx(4),
|
|
125
126
|
},
|
|
126
127
|
activeTaskHeadLineBtnText: {
|
|
127
|
-
color: props.theme
|
|
128
|
+
color: props.theme?.button.fontColor,
|
|
128
129
|
fontSize: cx(8.2),
|
|
129
130
|
},
|
|
130
131
|
activeTaskTimeText: {
|
|
131
132
|
flex: 1,
|
|
132
|
-
color: props.theme
|
|
133
|
+
color: props.theme?.global.secondFontColor,
|
|
133
134
|
fontSize: cx(24),
|
|
134
135
|
fontWeight: 'bold',
|
|
135
136
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
136
137
|
},
|
|
137
138
|
activeTaskDesc: {
|
|
138
139
|
flex: 1,
|
|
139
|
-
color: props.theme
|
|
140
|
+
color: props.theme?.global.secondFontColor,
|
|
140
141
|
fontSize: cx(14),
|
|
141
142
|
},
|
|
142
143
|
activeTasBtn: {
|
|
143
144
|
width: 'auto',
|
|
144
145
|
height: cx(36),
|
|
145
146
|
padding: 0,
|
|
146
|
-
backgroundColor: props.theme
|
|
147
|
+
backgroundColor: props.theme?.button.cancel,
|
|
147
148
|
borderRadius: cx(4),
|
|
148
149
|
},
|
|
149
150
|
activeTaskBtnText: {
|
|
150
|
-
color: props.theme
|
|
151
|
+
color: props.theme?.button.fontColor,
|
|
151
152
|
fontSize: cx(12.2),
|
|
152
153
|
},
|
|
153
154
|
activeTaskTimeText2: {
|
|
154
155
|
flex: 1,
|
|
155
156
|
marginHorizontal: cx(20),
|
|
156
|
-
color: props.theme
|
|
157
|
+
color: props.theme?.global.secondFontColor,
|
|
157
158
|
fontSize: cx(22),
|
|
158
159
|
textAlign: 'center',
|
|
159
160
|
fontWeight: 'bold',
|
|
@@ -249,7 +250,7 @@ const TimerPage = (props: { theme?: any }) => {
|
|
|
249
250
|
state.loading = false
|
|
250
251
|
}}
|
|
251
252
|
textStyle={{ fontSize: cx(14) }}
|
|
252
|
-
style={{ backgroundColor: !startEnable ? props.theme
|
|
253
|
+
style={{ backgroundColor: !startEnable ? props.theme?.button.disabled : props.theme?.button.primary }}/>
|
|
253
254
|
</View>
|
|
254
255
|
}
|
|
255
256
|
{startedTasks.length > 0 && params.timerSettableDps.length > 1 &&
|