@ledvance/ui-biz-bundle 1.1.92 → 1.1.94
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/flags/FlagEditPage.tsx +13 -12
- package/src/modules/flags/FlagItem.tsx +4 -3
- package/src/modules/flags/FlagPage.tsx +59 -41
- package/src/modules/history/HistoryPage.tsx +11 -10
- package/src/modules/mood/MixMood/AddMixMoodPage.tsx +2 -2
- package/src/modules/mood/MixMood/MixMoodEditPage.tsx +4 -4
- package/src/modules/mood/MixMood/MixMoodPage.tsx +4 -4
- package/src/modules/music/MusicPage.tsx +10 -8
- package/src/modules/sleepWakeup/DeviceState.tsx +4 -4
- package/src/modules/sleepWakeup/SleepWakeUpPage.tsx +2 -2
- package/src/modules/timer/TimerPage.tsx +18 -17
- package/src/newModules/biorhythm/BiorhythmEditPage.tsx +13 -12
- package/src/newModules/biorhythm/BiorhythmPage.tsx +23 -22
- package/src/newModules/biorhythm/IconSelect.tsx +7 -5
- package/src/newModules/childLock/ChildLockPage.tsx +7 -6
- package/src/newModules/energyConsumption/EnergyConsumptionChart.tsx +3 -2
- package/src/newModules/energyConsumption/EnergyConsumptionDetail.tsx +16 -15
- package/src/newModules/energyConsumption/EnergyConsumptionPage.tsx +16 -15
- package/src/newModules/energyConsumption/component/BarChart.tsx +18 -5
- package/src/newModules/energyConsumption/component/EnergyModal.tsx +26 -25
- package/src/newModules/energyConsumption/component/Overview.tsx +10 -9
- package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +23 -22
- package/src/newModules/fixedTime/FixedTimePage.tsx +12 -11
- package/src/newModules/lightMode/LightModePage.tsx +9 -8
- package/src/newModules/mood/AddMoodPage.tsx +3 -2
- package/src/newModules/mood/DynamicMoodEditorPage.tsx +13 -12
- package/src/newModules/mood/MixDynamicMoodEditor.tsx +19 -18
- package/src/newModules/mood/MoodActions.ts +17 -4
- package/src/newModules/mood/MoodInfo.ts +0 -7
- package/src/newModules/mood/MoodItem.tsx +5 -4
- package/src/newModules/mood/MoodPage.tsx +9 -4
- package/src/newModules/mood/RecommendMoodItem.tsx +4 -3
- package/src/newModules/mood/StaticMoodEditorPage.tsx +5 -4
- package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +6 -5
- package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +10 -9
- package/src/newModules/powerOnBehavior/PlugBehaviorPage.tsx +8 -7
- package/src/newModules/randomTime/RandomTimeDetailPage.tsx +15 -14
- package/src/newModules/randomTime/RandomTimePage.tsx +12 -11
- package/src/newModules/randomTime/Summary.tsx +7 -6
- package/src/newModules/remoteControl/RemoteControlPage.tsx +3 -2
- package/src/newModules/select/SelectPage.tsx +10 -9
- package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +24 -23
- package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +15 -14
- package/src/newModules/switchGradient/SwitchGradientPage.tsx +4 -3
- package/src/newModules/swithInching/SwithInching.tsx +7 -6
- package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +20 -19
- package/src/newModules/timeSchedule/TimeSchedulePage.tsx +8 -7
- package/src/newModules/timeSchedule/components/ManuaSettings.tsx +9 -9
- package/src/newModules/timeSchedule/components/ScheduleCard.tsx +6 -4
|
@@ -13,6 +13,7 @@ import LampAdjustView from '@ledvance/base/src/components/LampAdjustView'
|
|
|
13
13
|
import LdvSwitch from '@ledvance/base/src/components/ldvSwitch'
|
|
14
14
|
import { cloneDeep } from 'lodash'
|
|
15
15
|
import { useParams } from '@ledvance/base/src/hooks/Hooks'
|
|
16
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
16
17
|
|
|
17
18
|
const { convertX: cx } = Utils.RatioUtils
|
|
18
19
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -31,7 +32,7 @@ export enum PowerMemoryMode {
|
|
|
31
32
|
Last = 1,
|
|
32
33
|
Custom = 2
|
|
33
34
|
}
|
|
34
|
-
const LightBehaviorPage = (props: { theme?:
|
|
35
|
+
const LightBehaviorPage = (props: { theme?: ThemeType }) => {
|
|
35
36
|
const params = useParams<LightBehaviorPageParams>()
|
|
36
37
|
const deviceInfo = useDeviceInfo()
|
|
37
38
|
const [powerMemory, setPowerMemory] = usePowerOffMemory(params.memoryDpCode)
|
|
@@ -51,18 +52,18 @@ const LightBehaviorPage = (props: { theme?: any }) => {
|
|
|
51
52
|
},
|
|
52
53
|
tipText: {
|
|
53
54
|
marginHorizontal: cx(24),
|
|
54
|
-
color: props.theme
|
|
55
|
+
color: props.theme?.global.fontColor,
|
|
55
56
|
fontSize: cx(14),
|
|
56
57
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
57
58
|
},
|
|
58
59
|
modeSelectGroup: {
|
|
59
60
|
marginHorizontal: cx(24),
|
|
60
|
-
backgroundColor: props.theme
|
|
61
|
+
backgroundColor: props.theme?.container.background,
|
|
61
62
|
borderRadius: cx(4),
|
|
62
63
|
},
|
|
63
64
|
modeTip: {
|
|
64
65
|
marginHorizontal: cx(8),
|
|
65
|
-
color: props.theme
|
|
66
|
+
color: props.theme?.global.fontColor,
|
|
66
67
|
fontSize: cx(14),
|
|
67
68
|
fontWeight: 'bold',
|
|
68
69
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
@@ -73,7 +74,7 @@ const LightBehaviorPage = (props: { theme?: any }) => {
|
|
|
73
74
|
line: {
|
|
74
75
|
height: cx(1),
|
|
75
76
|
marginHorizontal: cx(12),
|
|
76
|
-
backgroundColor: props.theme
|
|
77
|
+
backgroundColor: props.theme?.container.divider,
|
|
77
78
|
},
|
|
78
79
|
itemRoot: {
|
|
79
80
|
flexDirection: 'row',
|
|
@@ -87,12 +88,12 @@ const LightBehaviorPage = (props: { theme?: any }) => {
|
|
|
87
88
|
justifyContent: 'center',
|
|
88
89
|
},
|
|
89
90
|
itemTitle: {
|
|
90
|
-
color: props.theme
|
|
91
|
+
color: props.theme?.global.fontColor,
|
|
91
92
|
fontSize: cx(14),
|
|
92
93
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
93
94
|
},
|
|
94
95
|
itemContent: {
|
|
95
|
-
color: props.theme
|
|
96
|
+
color: props.theme?.global.secondFontColor,
|
|
96
97
|
fontSize: cx(14),
|
|
97
98
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
98
99
|
},
|
|
@@ -204,7 +205,7 @@ const LightBehaviorPage = (props: { theme?: any }) => {
|
|
|
204
205
|
<Card style={{ borderRadius: cx(4) }}>
|
|
205
206
|
<LdvSwitch
|
|
206
207
|
title={I18n.getLang('light_settings_default_secondbox_text')}
|
|
207
|
-
color={props.theme
|
|
208
|
+
color={props.theme?.card.background}
|
|
208
209
|
colorAlpha={1}
|
|
209
210
|
enable={doNotDisturb}
|
|
210
211
|
setEnable={async (enable: boolean) => {
|
|
@@ -218,7 +219,7 @@ const LightBehaviorPage = (props: { theme?: any }) => {
|
|
|
218
219
|
<Text
|
|
219
220
|
style={{
|
|
220
221
|
marginHorizontal: cx(8),
|
|
221
|
-
color: props.theme
|
|
222
|
+
color: props.theme?.global.fontColor,
|
|
222
223
|
fontSize: cx(12),
|
|
223
224
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
224
225
|
}}>
|
|
@@ -10,6 +10,7 @@ import Card from '@ledvance/base/src/components/Card'
|
|
|
10
10
|
import res from '@ledvance/base/src/res'
|
|
11
11
|
import { useReactive, useUpdateEffect } from 'ahooks'
|
|
12
12
|
import { useParams } from '@ledvance/base/src/hooks/Hooks'
|
|
13
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
13
14
|
|
|
14
15
|
const { convertX: cx } = Utils.RatioUtils
|
|
15
16
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -18,7 +19,7 @@ const RELAY_STATUS_OFF = 'off'
|
|
|
18
19
|
const RELAY_STATUS_ON = 'on'
|
|
19
20
|
const RELAY_STATUS_MEMORY = 'memory'
|
|
20
21
|
|
|
21
|
-
const PlugBehaviorPage = (props: { theme?:
|
|
22
|
+
const PlugBehaviorPage = (props: { theme?: ThemeType }) => {
|
|
22
23
|
const params = useParams<PowerBehaviorPageParams>()
|
|
23
24
|
const deviceInfo = useDeviceInfo()
|
|
24
25
|
const [powerMemory, setPowerMemory] = usePowerBehavior(params.powerBehaviorCode)
|
|
@@ -38,18 +39,18 @@ const PlugBehaviorPage = (props: { theme?: any }) => {
|
|
|
38
39
|
},
|
|
39
40
|
tipText: {
|
|
40
41
|
marginHorizontal: cx(24),
|
|
41
|
-
color: props.theme
|
|
42
|
+
color: props.theme?.global.fontColor,
|
|
42
43
|
fontSize: cx(14),
|
|
43
44
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
44
45
|
},
|
|
45
46
|
modeSelectGroup: {
|
|
46
47
|
marginHorizontal: cx(24),
|
|
47
|
-
backgroundColor: props.theme
|
|
48
|
+
backgroundColor: props.theme?.container.background,
|
|
48
49
|
borderRadius: cx(4),
|
|
49
50
|
},
|
|
50
51
|
modeTip: {
|
|
51
52
|
marginHorizontal: cx(8),
|
|
52
|
-
color: props.theme
|
|
53
|
+
color: props.theme?.global.fontColor,
|
|
53
54
|
fontSize: cx(14),
|
|
54
55
|
fontWeight: 'bold',
|
|
55
56
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
@@ -60,7 +61,7 @@ const PlugBehaviorPage = (props: { theme?: any }) => {
|
|
|
60
61
|
line: {
|
|
61
62
|
height: cx(1),
|
|
62
63
|
marginHorizontal: cx(12),
|
|
63
|
-
backgroundColor: props.theme
|
|
64
|
+
backgroundColor: props.theme?.container.divider,
|
|
64
65
|
},
|
|
65
66
|
itemRoot: {
|
|
66
67
|
flexDirection: 'row',
|
|
@@ -74,12 +75,12 @@ const PlugBehaviorPage = (props: { theme?: any }) => {
|
|
|
74
75
|
justifyContent: 'center',
|
|
75
76
|
},
|
|
76
77
|
itemTitle: {
|
|
77
|
-
color: props.theme
|
|
78
|
+
color: props.theme?.global.fontColor,
|
|
78
79
|
fontSize: cx(14),
|
|
79
80
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
80
81
|
},
|
|
81
82
|
itemContent: {
|
|
82
|
-
color: props.theme
|
|
83
|
+
color: props.theme?.global.secondFontColor,
|
|
83
84
|
fontSize: cx(14),
|
|
84
85
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
85
86
|
},
|
|
@@ -20,6 +20,7 @@ import Summary from "./Summary";
|
|
|
20
20
|
import { RandomTimePageParams } from "./RandomTimePage";
|
|
21
21
|
import { Result } from "@ledvance/base/src/models/modules/Result";
|
|
22
22
|
import { useSystemTimeFormate } from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
23
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
23
24
|
|
|
24
25
|
const { convertX: cx } = Utils.RatioUtils;
|
|
25
26
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -31,7 +32,7 @@ export interface RandomTimeDetailPageParams extends RandomTimePageParams {
|
|
|
31
32
|
onPost: (mode: 'add' | 'edit' | 'del', randomTime: RandomTimerUiItem) => Promise<Result<any>>
|
|
32
33
|
}
|
|
33
34
|
const minTimeGap = 30
|
|
34
|
-
const RandomTimeDetailPage = (props: { theme?:
|
|
35
|
+
const RandomTimeDetailPage = (props: { theme?: ThemeType }) => {
|
|
35
36
|
const navigation = useNavigation()
|
|
36
37
|
const params = useRoute().params as RandomTimeDetailPageParams
|
|
37
38
|
const is24Hour = useSystemTimeFormate()
|
|
@@ -69,13 +70,13 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
69
70
|
marginHorizontal: cx(24)
|
|
70
71
|
},
|
|
71
72
|
itemTitle: {
|
|
72
|
-
color: props.theme
|
|
73
|
+
color: props.theme?.global.fontColor,
|
|
73
74
|
fontSize: cx(16),
|
|
74
75
|
fontWeight: 'bold',
|
|
75
76
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
76
77
|
},
|
|
77
78
|
applyContent: {
|
|
78
|
-
backgroundColor: props.theme
|
|
79
|
+
backgroundColor: props.theme?.container.background,
|
|
79
80
|
borderRadius: 4,
|
|
80
81
|
minHeight: cx(55),
|
|
81
82
|
flex: 1,
|
|
@@ -88,7 +89,7 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
88
89
|
flexDirection: 'row',
|
|
89
90
|
justifyContent: 'space-between',
|
|
90
91
|
alignItems: 'center',
|
|
91
|
-
backgroundColor: props.theme
|
|
92
|
+
backgroundColor: props.theme?.global.background,
|
|
92
93
|
height: cx(35),
|
|
93
94
|
},
|
|
94
95
|
})
|
|
@@ -152,8 +153,8 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
152
153
|
{/* pick */}
|
|
153
154
|
<TimerPicker
|
|
154
155
|
itemTextColor='#aeadb5'
|
|
155
|
-
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme
|
|
156
|
-
pickerFontColor={props.theme
|
|
156
|
+
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme?.global.background }}
|
|
157
|
+
pickerFontColor={props.theme?.global.fontColor}
|
|
157
158
|
is12Hours={!is24Hour}
|
|
158
159
|
startTime={state.randomTime.startTime}
|
|
159
160
|
endTime={state.randomTime.endTime}
|
|
@@ -169,8 +170,8 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
169
170
|
state.randomTime.weeks[rawIndex] = state.randomTime.weeks[rawIndex] === 1 ? 0 : 1
|
|
170
171
|
}} />
|
|
171
172
|
<Spacer />
|
|
172
|
-
<Text style={{ ...styles.cardContainer, color: props.theme
|
|
173
|
-
{loopText(state.randomTime.weeks)}
|
|
173
|
+
<Text style={{ ...styles.cardContainer, color: props.theme?.global.fontColor, fontSize: cx(14) }}>
|
|
174
|
+
{loopText(state.randomTime.weeks, parseTimer(state.randomTime.endTime * 60))}
|
|
174
175
|
</Text>
|
|
175
176
|
<Spacer />
|
|
176
177
|
{/* Apply for */}
|
|
@@ -179,17 +180,17 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
179
180
|
<Spacer height={cx(10)} />
|
|
180
181
|
<View style={[styles.applyContent, { paddingTop: state.randomTime.channel === undefined ? 0 : cx(10) }]}>
|
|
181
182
|
{state.randomTime.channel === undefined ?
|
|
182
|
-
<Text style={{color: props.theme
|
|
183
|
+
<Text style={{color: props.theme?.global.fontColor}}>
|
|
183
184
|
{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}
|
|
184
185
|
</Text> :
|
|
185
186
|
<View style={[styles.applyItem, { marginBottom: cx(10), borderRadius: 4 }]}>
|
|
186
|
-
<Text style={{ color: props.theme
|
|
187
|
+
<Text style={{ color: props.theme?.global.fontColor, fontSize: cx(12) }}>{params.applyForList[params.isPlug ? state.randomTime.channel : 0]?.key}</Text>
|
|
187
188
|
{params.applyForList.length > 1 && <TouchableOpacity
|
|
188
189
|
onPress={() => {
|
|
189
190
|
state.randomTime.channel = undefined
|
|
190
191
|
}}
|
|
191
192
|
style={{ paddingHorizontal: cx(5) }}>
|
|
192
|
-
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
193
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }} source={res.ic_arrows_nav_clear} />
|
|
193
194
|
</TouchableOpacity>}
|
|
194
195
|
</View>
|
|
195
196
|
}
|
|
@@ -203,8 +204,8 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
203
204
|
onPress={() => {
|
|
204
205
|
state.randomTime.channel = params.isPlug ? index : 1
|
|
205
206
|
}}>
|
|
206
|
-
<Text style={{ color: props.theme
|
|
207
|
-
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
207
|
+
<Text style={{ color: props.theme?.global.fontColor, fontSize: cx(12) }}>{item.key}</Text>
|
|
208
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }} source={res.device_panel_timer_add} />
|
|
208
209
|
</TouchableOpacity>
|
|
209
210
|
)
|
|
210
211
|
})}
|
|
@@ -217,7 +218,7 @@ const RandomTimeDetailPage = (props: { theme?: any }) => {
|
|
|
217
218
|
<Card>
|
|
218
219
|
<LdvSwitch
|
|
219
220
|
title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
|
|
220
|
-
color={props.theme
|
|
221
|
+
color={props.theme?.card.background}
|
|
221
222
|
colorAlpha={1}
|
|
222
223
|
enable={true}
|
|
223
224
|
setEnable={() => { }}
|
|
@@ -19,6 +19,7 @@ import { ApplyForItem } from '@ledvance/base/src/utils/interface'
|
|
|
19
19
|
import { useParams } from '@ledvance/base/src/hooks/Hooks'
|
|
20
20
|
import Tag from '@ledvance/base/src/components/Tag'
|
|
21
21
|
import InfoText from '@ledvance/base/src/components/InfoText'
|
|
22
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
22
23
|
|
|
23
24
|
const { convertX: cx } = Utils.RatioUtils
|
|
24
25
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -40,7 +41,7 @@ export interface RandomTimePageParams {
|
|
|
40
41
|
isSupportBrightness?: boolean
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
const RandomTimePage = (props: { theme?:
|
|
44
|
+
const RandomTimePage = (props: { theme?: ThemeType }) => {
|
|
44
45
|
const navigation = useNavigation()
|
|
45
46
|
const devInfo = useDeviceInfo()
|
|
46
47
|
const params = useParams<RandomTimePageParams>()
|
|
@@ -106,14 +107,14 @@ const RandomTimePage = (props: { theme?: any }) => {
|
|
|
106
107
|
},
|
|
107
108
|
time: {
|
|
108
109
|
flex: 1,
|
|
109
|
-
color: props.theme
|
|
110
|
+
color: props.theme?.global.fontColor,
|
|
110
111
|
fontSize: cx(16),
|
|
111
112
|
fontWeight: 'bold',
|
|
112
113
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
113
114
|
},
|
|
114
115
|
switchBtn: {},
|
|
115
116
|
loopText: {
|
|
116
|
-
color: props.theme
|
|
117
|
+
color: props.theme?.global.fontColor,
|
|
117
118
|
fontSize: cx(14),
|
|
118
119
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
119
120
|
},
|
|
@@ -131,7 +132,7 @@ const RandomTimePage = (props: { theme?: any }) => {
|
|
|
131
132
|
tag: {
|
|
132
133
|
borderRadius: cx(16),
|
|
133
134
|
height: cx(16),
|
|
134
|
-
backgroundColor: props.theme
|
|
135
|
+
backgroundColor: props.theme?.tag.background,
|
|
135
136
|
marginRight: cx(10),
|
|
136
137
|
paddingHorizontal: cx(12)
|
|
137
138
|
},
|
|
@@ -139,7 +140,7 @@ const RandomTimePage = (props: { theme?: any }) => {
|
|
|
139
140
|
fontSize: cx(10),
|
|
140
141
|
textAlign: 'center',
|
|
141
142
|
fontFamily: 'PingFangSC-Medium',
|
|
142
|
-
color: props.theme
|
|
143
|
+
color: props.theme?.tag.fontColor
|
|
143
144
|
},
|
|
144
145
|
})
|
|
145
146
|
|
|
@@ -174,7 +175,7 @@ const RandomTimePage = (props: { theme?: any }) => {
|
|
|
174
175
|
>
|
|
175
176
|
<ScrollView nestedScrollEnabled={true}>
|
|
176
177
|
<Text style={{
|
|
177
|
-
color: props.theme
|
|
178
|
+
color: props.theme?.global.fontColor,
|
|
178
179
|
marginLeft: cx(24),
|
|
179
180
|
}}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
|
|
180
181
|
<Spacer height={cx(10)} />
|
|
@@ -182,7 +183,7 @@ const RandomTimePage = (props: { theme?: any }) => {
|
|
|
182
183
|
style={{ marginHorizontal: cx(24), marginBottom: cx(5) }}
|
|
183
184
|
icon={res.ic_warning_amber}
|
|
184
185
|
iconStyle={{width: cx(16), height: cx(16)}}
|
|
185
|
-
contentColor={props.theme
|
|
186
|
+
contentColor={props.theme?.global.warning}
|
|
186
187
|
text={I18n.getLang('randomtimecycle_warning_max_number_text')}
|
|
187
188
|
textStyle={{fontSize: cx(12)}}
|
|
188
189
|
/>}
|
|
@@ -223,19 +224,19 @@ const RandomTimePage = (props: { theme?: any }) => {
|
|
|
223
224
|
icon={res.device_panel_schedule_alert}
|
|
224
225
|
text={I18n.getLang(!state.originList.length ? 'timeschedule_overview_empty_information_text' : 'sleepwakeschedule_empty_filtering_information_text')}
|
|
225
226
|
style={{ width: 'auto', alignItems: 'center' }}
|
|
226
|
-
textStyle={{ color: props.theme
|
|
227
|
-
iconStyle={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
227
|
+
textStyle={{ color: props.theme?.global.secondFontColor, fontSize: cx(12), flex: undefined }}
|
|
228
|
+
iconStyle={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.secondFontColor }}
|
|
228
229
|
/>
|
|
229
230
|
<Spacer />
|
|
230
231
|
{!state.originList.length && <TextButton
|
|
231
232
|
text={I18n.getLang('randomtimecycle_empty_bttn_text')}
|
|
232
233
|
style={{
|
|
233
|
-
backgroundColor: props.theme
|
|
234
|
+
backgroundColor: props.theme?.button.primary,
|
|
234
235
|
borderRadius: cx(6),
|
|
235
236
|
paddingVertical: cx(12),
|
|
236
237
|
paddingHorizontal: cx(24),
|
|
237
238
|
}}
|
|
238
|
-
textStyle={{ color: props.theme
|
|
239
|
+
textStyle={{ color: props.theme?.button.fontColor }}
|
|
239
240
|
onPress={() => {
|
|
240
241
|
navigateToEdit('add', newRandomTime(params.isPlug))
|
|
241
242
|
}} />}
|
|
@@ -5,12 +5,13 @@ 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
7
|
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
8
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
8
9
|
|
|
9
10
|
const { convertX: cx } = Utils.RatioUtils;
|
|
10
11
|
const { withTheme } = Utils.ThemeUtils
|
|
11
12
|
|
|
12
13
|
interface SummaryProps {
|
|
13
|
-
theme?:
|
|
14
|
+
theme?: ThemeType
|
|
14
15
|
style?: ViewStyle
|
|
15
16
|
frequency?: string | ReactElement
|
|
16
17
|
time?: string | ReactElement
|
|
@@ -25,7 +26,7 @@ const Summary = (props: SummaryProps) => {
|
|
|
25
26
|
marginHorizontal: cx(24),
|
|
26
27
|
},
|
|
27
28
|
itemTitle: {
|
|
28
|
-
color: props.theme
|
|
29
|
+
color: props.theme?.global.fontColor,
|
|
29
30
|
fontSize: cx(16),
|
|
30
31
|
fontWeight: 'bold',
|
|
31
32
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
@@ -41,14 +42,14 @@ const Summary = (props: SummaryProps) => {
|
|
|
41
42
|
minWidth: cx(100)
|
|
42
43
|
},
|
|
43
44
|
summaryImg: {
|
|
44
|
-
tintColor: props.theme
|
|
45
|
+
tintColor: props.theme?.global.fontColor,
|
|
45
46
|
width: cx(12),
|
|
46
47
|
height: cx(12),
|
|
47
48
|
marginRight: cx(6)
|
|
48
49
|
},
|
|
49
50
|
leftTitle: {
|
|
50
51
|
fontSize: cx(14),
|
|
51
|
-
color: props.theme
|
|
52
|
+
color: props.theme?.global.fontColor,
|
|
52
53
|
},
|
|
53
54
|
summaryRight: {
|
|
54
55
|
flex: 1,
|
|
@@ -60,10 +61,10 @@ const Summary = (props: SummaryProps) => {
|
|
|
60
61
|
borderRadius: cx(16),
|
|
61
62
|
paddingHorizontal: cx(12),
|
|
62
63
|
alignSelf: 'flex-start',
|
|
63
|
-
backgroundColor: props.theme
|
|
64
|
+
backgroundColor: props.theme?.tag.background,
|
|
64
65
|
},
|
|
65
66
|
rightItem: {
|
|
66
|
-
color: props.theme
|
|
67
|
+
color: props.theme?.tag.fontColor,
|
|
67
68
|
},
|
|
68
69
|
})
|
|
69
70
|
|
|
@@ -10,6 +10,7 @@ import Card from '@ledvance/base/src/components/Card';
|
|
|
10
10
|
import Spacer from '@ledvance/base/src/components/Spacer';
|
|
11
11
|
import { Utils } from 'tuya-panel-kit'
|
|
12
12
|
import {showDialog} from "@ledvance/base/src/utils/common";
|
|
13
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
13
14
|
|
|
14
15
|
const { convertX: cx } = Utils.RatioUtils
|
|
15
16
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -17,7 +18,7 @@ const { withTheme } = Utils.ThemeUtils
|
|
|
17
18
|
export interface RemoteControlPageParams {
|
|
18
19
|
remoteControlDpCode: string;
|
|
19
20
|
}
|
|
20
|
-
const RemoteControlPage = (props: { theme?:
|
|
21
|
+
const RemoteControlPage = (props: { theme?: ThemeType }) => {
|
|
21
22
|
const deviceInfo = useDeviceInfo();
|
|
22
23
|
const params = useParams<RemoteControlPageParams>();
|
|
23
24
|
const [remoteControl, setRemoteControl] = useRemoteControl(params.remoteControlDpCode);
|
|
@@ -36,7 +37,7 @@ const RemoteControlPage = (props: { theme?: any }) => {
|
|
|
36
37
|
<Card style={{marginHorizontal: cx(24)}}>
|
|
37
38
|
<LdvSwitch
|
|
38
39
|
title={I18n.getLang('light_sources_specific_settings_remote_control')}
|
|
39
|
-
color={props.theme
|
|
40
|
+
color={props.theme?.card.background}
|
|
40
41
|
colorAlpha={1}
|
|
41
42
|
enable={remoteControl}
|
|
42
43
|
setEnable={async v => {
|
|
@@ -6,6 +6,7 @@ import Spacer from '@ledvance/base/src/components/Spacer'
|
|
|
6
6
|
import I18n from '@ledvance/base/src/i18n'
|
|
7
7
|
import Card from '@ledvance/base/src/components/Card'
|
|
8
8
|
import res from '@ledvance/base/src/res'
|
|
9
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
9
10
|
|
|
10
11
|
const cx = Utils.RatioUtils.convertX
|
|
11
12
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -22,7 +23,7 @@ export interface SelectPageParams<T> {
|
|
|
22
23
|
onSelect: (selectPageData: SelectPageData<T>) => void
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
const SelectPage = (props: { theme?:
|
|
26
|
+
const SelectPage = (props: { theme?: ThemeType }) => {
|
|
26
27
|
const params = useRoute().params as SelectPageParams<any>
|
|
27
28
|
const navigation = useNavigation()
|
|
28
29
|
|
|
@@ -31,11 +32,11 @@ const SelectPage = (props: { theme?: any }) => {
|
|
|
31
32
|
flex: 1,
|
|
32
33
|
},
|
|
33
34
|
topBar: {
|
|
34
|
-
backgroundColor: props.theme
|
|
35
|
+
backgroundColor: props.theme?.card.head,
|
|
35
36
|
},
|
|
36
37
|
line: {
|
|
37
38
|
height: cx(1),
|
|
38
|
-
backgroundColor: props.theme
|
|
39
|
+
backgroundColor: props.theme?.container.divider,
|
|
39
40
|
},
|
|
40
41
|
topContent: {
|
|
41
42
|
paddingVertical: cx(30),
|
|
@@ -44,7 +45,7 @@ const SelectPage = (props: { theme?: any }) => {
|
|
|
44
45
|
},
|
|
45
46
|
cancel: {
|
|
46
47
|
marginStart: cx(16),
|
|
47
|
-
color: props.theme
|
|
48
|
+
color: props.theme?.button.cancel,
|
|
48
49
|
fontSize: cx(17),
|
|
49
50
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
50
51
|
},
|
|
@@ -53,13 +54,13 @@ const SelectPage = (props: { theme?: any }) => {
|
|
|
53
54
|
position: 'absolute',
|
|
54
55
|
start: 0,
|
|
55
56
|
textAlign: 'center',
|
|
56
|
-
color: props.theme
|
|
57
|
+
color: props.theme?.global.fontColor,
|
|
57
58
|
fontSize: cx(17),
|
|
58
59
|
paddingHorizontal: cx(110),
|
|
59
60
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
60
61
|
},
|
|
61
62
|
card: {
|
|
62
|
-
backgroundColor: props.theme
|
|
63
|
+
backgroundColor: props.theme?.card.background,
|
|
63
64
|
marginHorizontal: cx(16),
|
|
64
65
|
},
|
|
65
66
|
item: {
|
|
@@ -70,20 +71,20 @@ const SelectPage = (props: { theme?: any }) => {
|
|
|
70
71
|
itemText: {
|
|
71
72
|
flex: 1,
|
|
72
73
|
marginStart: cx(13),
|
|
73
|
-
color: props.theme
|
|
74
|
+
color: props.theme?.global.fontColor,
|
|
74
75
|
fontSize: cx(17),
|
|
75
76
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
76
77
|
},
|
|
77
78
|
itemLine: {
|
|
78
79
|
height: cx(1),
|
|
79
80
|
marginStart: cx(13),
|
|
80
|
-
backgroundColor: props.theme
|
|
81
|
+
backgroundColor: props.theme?.container.divider,
|
|
81
82
|
},
|
|
82
83
|
itemIcon: {
|
|
83
84
|
width: cx(30),
|
|
84
85
|
height: cx(30),
|
|
85
86
|
marginEnd: cx(13),
|
|
86
|
-
tintColor: props.theme
|
|
87
|
+
tintColor: props.theme?.icon.primary,
|
|
87
88
|
},
|
|
88
89
|
})
|
|
89
90
|
|