@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
|
@@ -15,6 +15,7 @@ import {timeFormatToRealTime, useProgress} from "./TimerPageAction";
|
|
|
15
15
|
import { cloneDeep } from "lodash";
|
|
16
16
|
import dayjs from "dayjs";
|
|
17
17
|
import DeleteButton from "@ledvance/base/src/components/DeleteButton";
|
|
18
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
18
19
|
|
|
19
20
|
const { withTheme } = Utils.ThemeUtils
|
|
20
21
|
|
|
@@ -37,7 +38,7 @@ type Props = {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
const { convertX: cx } = Utils.RatioUtils
|
|
40
|
-
const TimerPage = (props: {theme?:
|
|
41
|
+
const TimerPage = (props: {theme?: ThemeType}) => {
|
|
41
42
|
const devInfo = useDeviceInfo()
|
|
42
43
|
const navigation = useNavigation()
|
|
43
44
|
const { dps } = useRoute<Props['route']>().params
|
|
@@ -133,12 +134,12 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
133
134
|
flexDirection: 'row',
|
|
134
135
|
justifyContent: 'space-between',
|
|
135
136
|
alignItems: 'center',
|
|
136
|
-
backgroundColor: props.theme
|
|
137
|
+
backgroundColor: props.theme?.global.background,
|
|
137
138
|
marginBottom: cx(8)
|
|
138
139
|
}}>
|
|
139
140
|
<Text
|
|
140
141
|
style={{
|
|
141
|
-
color: props.theme
|
|
142
|
+
color: props.theme?.global.fontColor,
|
|
142
143
|
fontSize: 14,
|
|
143
144
|
marginHorizontal: cx(6),
|
|
144
145
|
marginVertical: cx(9),
|
|
@@ -147,7 +148,7 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
147
148
|
{item.label}
|
|
148
149
|
</Text>
|
|
149
150
|
{progress.length > 1 && <TouchableOpacity onPress={() => handelTimer(item, false)}>
|
|
150
|
-
<Image style={{ width: cx(16), height: cx(16), marginRight: cx(5), tintColor: props.theme
|
|
151
|
+
<Image style={{ width: cx(16), height: cx(16), marginRight: cx(5), tintColor: props.theme?.global.fontColor, }} source={res.ic_arrows_nav_clear} />
|
|
151
152
|
</TouchableOpacity>}
|
|
152
153
|
</View>
|
|
153
154
|
);
|
|
@@ -158,7 +159,7 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
158
159
|
marginHorizontal: cx(24)
|
|
159
160
|
},
|
|
160
161
|
itemTitle: {
|
|
161
|
-
color: props.theme
|
|
162
|
+
color: props.theme?.global.fontColor,
|
|
162
163
|
fontSize: cx(16),
|
|
163
164
|
fontWeight: 'bold',
|
|
164
165
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
@@ -184,7 +185,7 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
184
185
|
},
|
|
185
186
|
activeTimerTitle: {
|
|
186
187
|
fontSize: cx(20),
|
|
187
|
-
color: props.theme
|
|
188
|
+
color: props.theme?.global.fontColor,
|
|
188
189
|
flex: 1,
|
|
189
190
|
paddingRight: cx(10)
|
|
190
191
|
},
|
|
@@ -193,7 +194,7 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
193
194
|
paddingVertical: cx(5),
|
|
194
195
|
alignItems: 'center',
|
|
195
196
|
justifyContent: 'center',
|
|
196
|
-
backgroundColor: props.theme
|
|
197
|
+
backgroundColor: props.theme?.button.cancel,
|
|
197
198
|
borderRadius: cx(5)
|
|
198
199
|
},
|
|
199
200
|
activeTimerTimeBox: {
|
|
@@ -229,14 +230,14 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
229
230
|
<Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline_text')}</Text>
|
|
230
231
|
<View
|
|
231
232
|
style={{
|
|
232
|
-
backgroundColor: props.theme
|
|
233
|
+
backgroundColor: props.theme?.container.background,
|
|
233
234
|
borderRadius: 4,
|
|
234
235
|
minHeight: cx(50),
|
|
235
236
|
flex: 1,
|
|
236
237
|
justifyContent: 'center',
|
|
237
238
|
}}
|
|
238
239
|
>
|
|
239
|
-
{!state.selectedSkill.length ? <Text style={{ marginLeft: cx(10), color: props.theme
|
|
240
|
+
{!state.selectedSkill.length ? <Text style={{ marginLeft: cx(10), color: props.theme?.global.fontColor }}>
|
|
240
241
|
{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}
|
|
241
242
|
</Text> :
|
|
242
243
|
<View
|
|
@@ -256,8 +257,8 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
256
257
|
{state.skillList.map((skill: dpItem) => {
|
|
257
258
|
return (
|
|
258
259
|
<TouchableOpacity style={styles.skillListItem} key={skill.dpId} onPress={() => handelTimer(skill, true)}>
|
|
259
|
-
<Text style={{ color: props.theme
|
|
260
|
-
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
260
|
+
<Text style={{ color: props.theme?.global.fontColor }}>{skill.label}</Text>
|
|
261
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }} source={res.device_panel_timer_add} />
|
|
261
262
|
</TouchableOpacity>
|
|
262
263
|
)
|
|
263
264
|
})}
|
|
@@ -269,7 +270,7 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
269
270
|
text={I18n.getLang('timer_sockets_button_text')}
|
|
270
271
|
onPress={onStartPress}
|
|
271
272
|
textStyle={{ fontSize: cx(14) }}
|
|
272
|
-
style={{ backgroundColor: !state.selectedSkill.length ? props.theme
|
|
273
|
+
style={{ backgroundColor: !state.selectedSkill.length ? props.theme?.button.disabled : props.theme?.button.primary }}
|
|
273
274
|
/>
|
|
274
275
|
<Spacer />
|
|
275
276
|
</>}
|
|
@@ -288,7 +289,7 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
288
289
|
getProgressByDp(timer.dpId).endTimer()
|
|
289
290
|
}}
|
|
290
291
|
style={styles.activeTimerCancelBtn}>
|
|
291
|
-
<Text style={{ color: props.theme
|
|
292
|
+
<Text style={{ color: props.theme?.button.fontColor, fontSize: cx(12) }}>{I18n.getLang('auto_scan_system_cancel')}</Text>
|
|
292
293
|
</TouchableOpacity>
|
|
293
294
|
</View>
|
|
294
295
|
<View style={styles.activeTimerTimeBox}>
|
|
@@ -309,9 +310,9 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
309
310
|
thumbStrokeWidth={2}
|
|
310
311
|
thumbRadius={0}
|
|
311
312
|
/>
|
|
312
|
-
<Text style={{ marginLeft: cx(20), fontSize: cx(22), color: props.theme
|
|
313
|
+
<Text style={{ marginLeft: cx(20), fontSize: cx(22), color: props.theme?.global.fontColor }}>{getActiveTimeString(timer.progressHook.countdown)}</Text>
|
|
313
314
|
</View>
|
|
314
|
-
<Text style={{color: props.theme
|
|
315
|
+
<Text style={{color: props.theme?.global.fontColor}}>
|
|
315
316
|
{I18n.formatValue(timer.enable ? timer.stringOff : timer.stringOn, timeFormatToRealTime(timer.progressHook.countdown))}
|
|
316
317
|
</Text>
|
|
317
318
|
</Card>
|
|
@@ -348,14 +349,14 @@ const TimerPage = (props: {theme?: any}) => {
|
|
|
348
349
|
thumbStroke={'#f60'}
|
|
349
350
|
renderCenterView={
|
|
350
351
|
<View style={{ position: 'absolute' }}>
|
|
351
|
-
<Text style={{ fontSize: cx(22), fontWeight: 'bold', color: props.theme
|
|
352
|
+
<Text style={{ fontSize: cx(22), fontWeight: 'bold', color: props.theme?.global.secondFontColor }}>
|
|
352
353
|
{getActiveTimeString(runningTimer()[0].progressHook.countdown)}
|
|
353
354
|
</Text>
|
|
354
355
|
</View>
|
|
355
356
|
}
|
|
356
357
|
/>
|
|
357
358
|
<View style={{ marginVertical: cx(30) }}>
|
|
358
|
-
<Text style={{color: props.theme
|
|
359
|
+
<Text style={{color: props.theme?.global.fontColor}}>
|
|
359
360
|
{I18n.formatValue(
|
|
360
361
|
runningTimer()[0].enable ?
|
|
361
362
|
runningTimer()[0].stringOff :
|
|
@@ -19,6 +19,7 @@ import Page from '@ledvance/base/src/components/Page'
|
|
|
19
19
|
import Card from '@ledvance/base/src/components/Card'
|
|
20
20
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
21
21
|
import { showDialog } from '@ledvance/base/src/utils/common'
|
|
22
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
22
23
|
|
|
23
24
|
const cx = Utils.RatioUtils.convertX
|
|
24
25
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -37,7 +38,7 @@ export interface BiorhythmEditPageParams {
|
|
|
37
38
|
showDeleteBtn?: boolean
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
const BiorhythmEditPage = (props: { theme?:
|
|
41
|
+
const BiorhythmEditPage = (props: { theme?: ThemeType }) => {
|
|
41
42
|
const navigation = useNavigation()
|
|
42
43
|
const route = useRoute<any>()
|
|
43
44
|
const {
|
|
@@ -112,7 +113,7 @@ const BiorhythmEditPage = (props: { theme?: any }) => {
|
|
|
112
113
|
borderRadius: cx(4),
|
|
113
114
|
},
|
|
114
115
|
title: {
|
|
115
|
-
color: props.theme
|
|
116
|
+
color: props.theme?.global.fontColor,
|
|
116
117
|
fontSize: cx(16),
|
|
117
118
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
118
119
|
paddingVertical: cx(16),
|
|
@@ -134,14 +135,14 @@ const BiorhythmEditPage = (props: { theme?: any }) => {
|
|
|
134
135
|
<View
|
|
135
136
|
style={{
|
|
136
137
|
marginHorizontal: cx(24),
|
|
137
|
-
backgroundColor: props.theme
|
|
138
|
+
backgroundColor: props.theme?.global.background,
|
|
138
139
|
}}>
|
|
139
140
|
<View style={{ height: cx(20) }} />
|
|
140
141
|
<TextField
|
|
141
142
|
value={state.planData.name}
|
|
142
143
|
showError={state.planData.name?.length > 32 || nameRepeatFlag}
|
|
143
144
|
maxLength={33}
|
|
144
|
-
tipColor={nameRepeatFlag ? props.theme
|
|
145
|
+
tipColor={nameRepeatFlag ? props.theme?.global.error : undefined}
|
|
145
146
|
errorText={I18n.getLang(nameRepeatFlag ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text')}
|
|
146
147
|
placeholder={I18n.getLang('add_new_trigger_time_inputfield_value_text')}
|
|
147
148
|
onChangeText={text => {
|
|
@@ -151,8 +152,8 @@ const BiorhythmEditPage = (props: { theme?: any }) => {
|
|
|
151
152
|
<View style={{ height: cx(20) }} />
|
|
152
153
|
<TimerPicker
|
|
153
154
|
itemTextColor='#aeadb5'
|
|
154
|
-
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme
|
|
155
|
-
pickerFontColor={props.theme
|
|
155
|
+
style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme?.global.background }}
|
|
156
|
+
pickerFontColor={props.theme?.global.fontColor}
|
|
156
157
|
is12Hours={!is24Hour}
|
|
157
158
|
singlePicker={true}
|
|
158
159
|
amText={I18n.getLang('manage_user_calendar_label_am')}
|
|
@@ -164,14 +165,14 @@ const BiorhythmEditPage = (props: { theme?: any }) => {
|
|
|
164
165
|
}}
|
|
165
166
|
/>
|
|
166
167
|
{minimumTipEnable() && <View style={{ flexDirection: 'row', marginVertical: cx(5) }}>
|
|
167
|
-
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
168
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }} source={res.ic_info} />
|
|
168
169
|
<Text
|
|
169
|
-
style={{ color: props.theme
|
|
170
|
+
style={{ color: props.theme?.global.fontColor, fontSize: cx(12) }}>{I18n.getLang('add_new_trigger_time_information_text')}</Text>
|
|
170
171
|
</View>}
|
|
171
172
|
<View style={{ height: cx(20) }} />
|
|
172
173
|
<View style={{ flexDirection: 'row' }}>
|
|
173
174
|
<View style={{ flex: 1 }}>
|
|
174
|
-
<Text style={{ fontSize: cx(14), color: props.theme
|
|
175
|
+
<Text style={{ fontSize: cx(14), color: props.theme?.global.fontColor }}>{I18n.getLang('add_new_trigger_time_text')}</Text>
|
|
175
176
|
</View>
|
|
176
177
|
<TouchableOpacity
|
|
177
178
|
activeOpacity={1}
|
|
@@ -188,15 +189,15 @@ const BiorhythmEditPage = (props: { theme?: any }) => {
|
|
|
188
189
|
<View
|
|
189
190
|
style={{ flex: 1, flexDirection: 'row', justifyContent: 'flex-end', alignContent: 'center', alignItems: 'center' }}>
|
|
190
191
|
<Image
|
|
191
|
-
style={{ width: cx(24), height: cx(24), tintColor: props.theme
|
|
192
|
+
style={{ width: cx(24), height: cx(24), tintColor: props.theme?.global.fontColor }}
|
|
192
193
|
source={setImg()}
|
|
193
194
|
/>
|
|
194
|
-
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
195
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.fontColor }} source={BiologicalRes.biorhythom_select_rightIcon} />
|
|
195
196
|
</View>
|
|
196
197
|
</TouchableOpacity>
|
|
197
198
|
</View>
|
|
198
199
|
<Text
|
|
199
|
-
style={{ fontSize: cx(16), color: props.theme
|
|
200
|
+
style={{ fontSize: cx(16), color: props.theme?.global.fontColor, fontFamily: 'helvetica_neue_lt_std_bd', marginTop: cx(33), marginBottom: cx(16) }}>
|
|
200
201
|
{I18n.getLang('add_new_trigger_time_subheadline_text')}
|
|
201
202
|
</Text>
|
|
202
203
|
<Card>
|
|
@@ -32,6 +32,7 @@ import Card from '@ledvance/base/src/components/Card'
|
|
|
32
32
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
33
33
|
import DeleteButton from '@ledvance/base/src/components/DeleteButton'
|
|
34
34
|
import { useParams } from '@ledvance/base/src/hooks/Hooks'
|
|
35
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
35
36
|
|
|
36
37
|
const cx = Utils.RatioUtils.convertX
|
|
37
38
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -58,7 +59,7 @@ export interface BiorhythmPageParams {
|
|
|
58
59
|
isMixLight?: boolean
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
const BiorhythmPage = (props: { theme?:
|
|
62
|
+
const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
62
63
|
const params = useParams<BiorhythmPageParams>()
|
|
63
64
|
const navigation = useNavigation()
|
|
64
65
|
const [biorhythm, setBiorhythm] = useBiorhythm(params.biorhythmDpCode)
|
|
@@ -228,20 +229,20 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
228
229
|
|
|
229
230
|
const sunHomeText = string => {
|
|
230
231
|
const text = string.split('SUN@HOME')
|
|
231
|
-
return text?.length === 1 && <Text style={{ fontSize: cx(14), color: props.theme
|
|
232
|
+
return text?.length === 1 && <Text style={{ fontSize: cx(14), color: props.theme?.global.fontColor }}>{text[0]}</Text> ||
|
|
232
233
|
<Text style={{
|
|
233
234
|
fontSize: cx(14),
|
|
234
235
|
flexDirection: 'row',
|
|
235
236
|
}}>
|
|
236
|
-
<Text style={{color: props.theme
|
|
237
|
+
<Text style={{color: props.theme?.global.fontColor }}>{text[0]}</Text>
|
|
237
238
|
<Text onPress={openLink}
|
|
238
239
|
style={{
|
|
239
240
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
240
|
-
color: props.theme
|
|
241
|
+
color: props.theme?.button.primary,
|
|
241
242
|
textDecorationLine: 'underline',
|
|
242
243
|
flexWrap: 'wrap',
|
|
243
244
|
}}>SUN@HOME</Text>
|
|
244
|
-
<Text style={{color: props.theme
|
|
245
|
+
<Text style={{color: props.theme?.global.fontColor }}>{text[1]}</Text>
|
|
245
246
|
</Text>
|
|
246
247
|
}
|
|
247
248
|
|
|
@@ -265,7 +266,7 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
265
266
|
headlineText={I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
266
267
|
headlineIconContent={<Switch
|
|
267
268
|
value={state.enable}
|
|
268
|
-
thumbColor={props.theme
|
|
269
|
+
thumbColor={props.theme?.icon.primary}
|
|
269
270
|
trackColor={{ false: '#00000026', true: '#ff660036' }}
|
|
270
271
|
onValueChange={async enable => {
|
|
271
272
|
state.loading = true
|
|
@@ -305,14 +306,14 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
305
306
|
justifyContent: 'center',
|
|
306
307
|
alignItems: 'center',
|
|
307
308
|
borderRadius: cx(20),
|
|
308
|
-
backgroundColor: period.enabled ? props.theme
|
|
309
|
+
backgroundColor: period.enabled ? props.theme?.global.thirdBrand : props.theme?.global.background,
|
|
309
310
|
borderWidth: cx(1),
|
|
310
|
-
borderColor: props.theme
|
|
311
|
+
borderColor: props.theme?.global.brand,
|
|
311
312
|
}}
|
|
312
313
|
>
|
|
313
314
|
<Text
|
|
314
315
|
style={{
|
|
315
|
-
color: props.theme
|
|
316
|
+
color: props.theme?.global.brand,
|
|
316
317
|
textAlign: 'center',
|
|
317
318
|
}}
|
|
318
319
|
>
|
|
@@ -324,10 +325,10 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
324
325
|
})}
|
|
325
326
|
</View>
|
|
326
327
|
<View style={{ marginHorizontal: cx(24), marginTop: cx(20) }}>
|
|
327
|
-
<Text style={{color: props.theme
|
|
328
|
+
<Text style={{color: props.theme?.global.fontColor}}>{state.weekString}</Text>
|
|
328
329
|
</View>
|
|
329
330
|
<View style={{ marginHorizontal: cx(24), marginTop: cx(16) }}>
|
|
330
|
-
<Text style={{color: props.theme
|
|
331
|
+
<Text style={{color: props.theme?.global.fontColor}}>
|
|
331
332
|
{I18n.getLang('bio_ryhthm_default_selectionfield_topic_text')}
|
|
332
333
|
</Text>
|
|
333
334
|
<TouchableOpacity
|
|
@@ -339,17 +340,17 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
339
340
|
style={{
|
|
340
341
|
flexDirection: 'row',
|
|
341
342
|
borderRadius: cx(4),
|
|
342
|
-
backgroundColor: props.theme
|
|
343
|
+
backgroundColor: props.theme?.textInput.background,
|
|
343
344
|
alignItems: 'center',
|
|
344
345
|
flex: 1,
|
|
345
346
|
height: cx(44),
|
|
346
347
|
borderBottomWidth: cx(1),
|
|
347
|
-
borderBottomColor: props.theme
|
|
348
|
+
borderBottomColor: props.theme?.textInput.line,
|
|
348
349
|
}}
|
|
349
350
|
>
|
|
350
351
|
<Text style={{
|
|
351
352
|
fontSize: cx(16),
|
|
352
|
-
color: props.theme
|
|
353
|
+
color: props.theme?.textInput.fontColor,
|
|
353
354
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
354
355
|
paddingLeft: cx(16),
|
|
355
356
|
}}>
|
|
@@ -391,12 +392,12 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
391
392
|
}}>
|
|
392
393
|
{state.planList.length === 8 && <View
|
|
393
394
|
style={{ marginVertical: cx(10), flexDirection: 'row', alignItems: 'center', width: width - cx(48) }}>
|
|
394
|
-
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme
|
|
395
|
+
<Image style={{ width: cx(16), height: cx(16), tintColor: props.theme?.global.warning }} source={res.ic_warning_amber} />
|
|
395
396
|
<Text
|
|
396
397
|
style={{
|
|
397
398
|
flexWrap: 'wrap',
|
|
398
399
|
fontSize: cx(12),
|
|
399
|
-
color: props.theme
|
|
400
|
+
color: props.theme?.global.fontColor
|
|
400
401
|
}}>{I18n.getLang('add_new_trigger_time_warning_max_number_text')}</Text>
|
|
401
402
|
</View>}
|
|
402
403
|
{state.planList.length < 8 &&
|
|
@@ -405,7 +406,7 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
405
406
|
style={{
|
|
406
407
|
fontSize: cx(16),
|
|
407
408
|
fontWeight: 'bold',
|
|
408
|
-
color: props.theme
|
|
409
|
+
color: props.theme?.global.fontColor,
|
|
409
410
|
}}>{I18n.getLang('bio_ryhthm_default_subheadline_text')}</Text>
|
|
410
411
|
<TouchableOpacity
|
|
411
412
|
onPress={() => {
|
|
@@ -447,7 +448,7 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
447
448
|
}
|
|
448
449
|
navigation.navigate(ui_biz_routerKey.bi_biz_biological_edit, editPageParams)
|
|
449
450
|
}}>
|
|
450
|
-
<Image source={BiologicalRes.biorhythom_add} style={{ height: cx(24), width: cx(24), tintColor: props.theme
|
|
451
|
+
<Image source={BiologicalRes.biorhythom_add} style={{ height: cx(24), width: cx(24), tintColor: props.theme?.icon.primary }} />
|
|
451
452
|
</TouchableOpacity>
|
|
452
453
|
</>
|
|
453
454
|
}
|
|
@@ -504,13 +505,13 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
504
505
|
height: cx(24),
|
|
505
506
|
marginStart: cx(10),
|
|
506
507
|
marginRight: cx(6),
|
|
507
|
-
tintColor: props.theme
|
|
508
|
+
tintColor: props.theme?.icon.normal,
|
|
508
509
|
}}
|
|
509
510
|
/>
|
|
510
511
|
<Text
|
|
511
512
|
style={{
|
|
512
513
|
fontSize: cx(16),
|
|
513
|
-
color: props.theme
|
|
514
|
+
color: props.theme?.global.fontColor,
|
|
514
515
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
515
516
|
}}
|
|
516
517
|
>
|
|
@@ -519,7 +520,7 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
519
520
|
</View>
|
|
520
521
|
<Switch
|
|
521
522
|
value={item.enable}
|
|
522
|
-
thumbColor={props.theme
|
|
523
|
+
thumbColor={props.theme?.icon.primary}
|
|
523
524
|
trackColor={{ false: '#00000026', true: '#ff660036' }}
|
|
524
525
|
onValueChange={e => {
|
|
525
526
|
item.enable = e
|
|
@@ -532,7 +533,7 @@ const BiorhythmPage = (props: { theme?: any }) => {
|
|
|
532
533
|
<Text
|
|
533
534
|
style={{
|
|
534
535
|
fontSize: cx(12),
|
|
535
|
-
color: props.theme
|
|
536
|
+
color: props.theme?.global.secondFontColor,
|
|
536
537
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
537
538
|
paddingLeft: cx(20),
|
|
538
539
|
}}
|
|
@@ -2,20 +2,22 @@ import { useNavigation, useRoute } from '@react-navigation/native'
|
|
|
2
2
|
import React, { useEffect, useState } from 'react'
|
|
3
3
|
import { Image, ScrollView, Text, TouchableOpacity, View } from 'react-native'
|
|
4
4
|
import { Utils } from 'tuya-panel-kit'
|
|
5
|
-
import iconList from '
|
|
5
|
+
import iconList from '../biorhythm/iconListData'
|
|
6
6
|
import LDVTopBar from '@ledvance/base/src/components/ldvTopBar'
|
|
7
7
|
import I18n from '@ledvance/base/src/i18n'
|
|
8
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
8
9
|
|
|
9
10
|
const cx = Utils.RatioUtils.convertX
|
|
10
11
|
const { withTheme } = Utils.ThemeUtils
|
|
11
12
|
|
|
12
13
|
interface SceneDetailPageParams {
|
|
14
|
+
backText?: string
|
|
13
15
|
id: any
|
|
14
16
|
setIcon: (id) => void,
|
|
15
17
|
iconIdList: any
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
function IconSelect(props: { theme?:
|
|
20
|
+
function IconSelect(props: { theme?: ThemeType }) {
|
|
19
21
|
const [list, setList] = useState(iconList)
|
|
20
22
|
const navigation = useNavigation()
|
|
21
23
|
const params = useRoute().params as SceneDetailPageParams
|
|
@@ -46,14 +48,14 @@ function IconSelect(props: { theme?: any }) {
|
|
|
46
48
|
return (
|
|
47
49
|
<View style={{ flex: 1, flexDirection: 'column' }}>
|
|
48
50
|
<LDVTopBar
|
|
49
|
-
title={I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
51
|
+
title={params.backText ?? I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
50
52
|
onBackPress={() => {
|
|
51
53
|
navigation.goBack()
|
|
52
54
|
}}
|
|
53
55
|
/>
|
|
54
56
|
<ScrollView nestedScrollEnabled={true} style={{ marginHorizontal: cx(24) }}>
|
|
55
57
|
<View style={{ marginTop: cx(40), marginBottom: cx(20) }}>
|
|
56
|
-
<Text style={{ fontSize: cx(24), color: props.theme
|
|
58
|
+
<Text style={{ fontSize: cx(24), color: props.theme?.global.brand }}>{I18n.getLang('add_new_trigger_time_icon_selection_headline_text')}</Text>
|
|
57
59
|
</View>
|
|
58
60
|
<View
|
|
59
61
|
style={{ flexDirection: 'row', flex: 1, flexWrap: 'wrap', justifyContent: 'space-between', alignItems: 'flex-start' }}>
|
|
@@ -72,7 +74,7 @@ function IconSelect(props: { theme?: any }) {
|
|
|
72
74
|
width: cx(32),
|
|
73
75
|
height: cx(32),
|
|
74
76
|
margin: cx(10),
|
|
75
|
-
tintColor: item?.selectStatus ? props.theme
|
|
77
|
+
tintColor: item?.selectStatus ? props.theme?.icon.primary : item?.disabled && props.theme?.icon.disable || props.theme?.icon.normal,
|
|
76
78
|
}}
|
|
77
79
|
/>
|
|
78
80
|
</TouchableOpacity>
|
|
@@ -9,6 +9,7 @@ import {View, Text, StyleSheet, Image} from "react-native";
|
|
|
9
9
|
import {Result} from "@ledvance/base/src/models/modules/Result";
|
|
10
10
|
import res from "@ledvance/base/src/res";
|
|
11
11
|
import {useParams} from "@ledvance/base/src/hooks/Hooks";
|
|
12
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
12
13
|
|
|
13
14
|
const { convertX: cx } = Utils.RatioUtils
|
|
14
15
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -21,7 +22,7 @@ export function useChildLock(childLockCode: string): [boolean, (v: boolean) => P
|
|
|
21
22
|
return useDp(childLockCode)
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
const ChildLockPage = (props: { theme?:
|
|
25
|
+
const ChildLockPage = (props: { theme?: ThemeType }) => {
|
|
25
26
|
const params = useParams<ChildLockPageParams>()
|
|
26
27
|
const devInfo = useDeviceInfo()
|
|
27
28
|
const [childLock, setChildLock] = useChildLock(params.childLockCode)
|
|
@@ -39,7 +40,7 @@ const ChildLockPage = (props: { theme?: any }) => {
|
|
|
39
40
|
width: cx(16),
|
|
40
41
|
height: cx(16),
|
|
41
42
|
marginRight: cx(5),
|
|
42
|
-
tintColor: props.theme
|
|
43
|
+
tintColor: props.theme?.global.fontColor
|
|
43
44
|
},
|
|
44
45
|
titleBGView: {
|
|
45
46
|
flexDirection: 'row',
|
|
@@ -54,13 +55,13 @@ const ChildLockPage = (props: { theme?: any }) => {
|
|
|
54
55
|
borderRadius: cx(4),
|
|
55
56
|
},
|
|
56
57
|
title: {
|
|
57
|
-
color: props.theme
|
|
58
|
+
color: props.theme?.global.fontColor,
|
|
58
59
|
fontSize: cx(14),
|
|
59
60
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
60
61
|
paddingVertical: cx(16),
|
|
61
62
|
},
|
|
62
63
|
shadow: {
|
|
63
|
-
shadowColor: props.theme
|
|
64
|
+
shadowColor: props.theme?.card.shadowColor,
|
|
64
65
|
shadowOpacity: 0.2,
|
|
65
66
|
shadowRadius: 8,
|
|
66
67
|
elevation:8,
|
|
@@ -68,7 +69,7 @@ const ChildLockPage = (props: { theme?: any }) => {
|
|
|
68
69
|
width: 0,
|
|
69
70
|
height: 4,
|
|
70
71
|
},
|
|
71
|
-
backgroundColor: props.theme
|
|
72
|
+
backgroundColor: props.theme?.card.background,
|
|
72
73
|
borderRadius: 8,
|
|
73
74
|
},
|
|
74
75
|
})
|
|
@@ -79,7 +80,7 @@ const ChildLockPage = (props: { theme?: any }) => {
|
|
|
79
80
|
loading={state.loading}>
|
|
80
81
|
<View style={styles.tipInfoContainer}>
|
|
81
82
|
<Image style={styles.image} source={res.ic_info} />
|
|
82
|
-
<Text style={{ color: props.theme
|
|
83
|
+
<Text style={{ color: props.theme?.global.fontColor }}>
|
|
83
84
|
{I18n.getLang('childlock_overview_description_text')}
|
|
84
85
|
</Text>
|
|
85
86
|
</View>
|
|
@@ -10,6 +10,7 @@ import { exportFile } from "@ledvance/base/src/utils/common";
|
|
|
10
10
|
import { OverviewItem } from "./EnergyConsumptionPage";
|
|
11
11
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
12
12
|
import InfoText from "@ledvance/base/src/components/InfoText";
|
|
13
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
13
14
|
|
|
14
15
|
const { convertX: cx, height, width } = Utils.RatioUtils
|
|
15
16
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -22,7 +23,7 @@ export interface EnergyConsumptionChartProps {
|
|
|
22
23
|
over7Days?: boolean
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
const EnergyConsumptionChart = (props: { theme?:
|
|
26
|
+
const EnergyConsumptionChart = (props: { theme?: ThemeType }) => {
|
|
26
27
|
const params = useRoute().params as EnergyConsumptionChartProps
|
|
27
28
|
const computeNum = Platform.OS === 'ios' && 180 || 130
|
|
28
29
|
|
|
@@ -59,7 +60,7 @@ const EnergyConsumptionChart = (props: { theme?: any }) => {
|
|
|
59
60
|
<InfoText
|
|
60
61
|
text={I18n.getLang('energyconsumption_hourlylimit')}
|
|
61
62
|
icon={res.ic_info}
|
|
62
|
-
contentColor={props.theme
|
|
63
|
+
contentColor={props.theme?.global.fontColor}
|
|
63
64
|
/>
|
|
64
65
|
</View>
|
|
65
66
|
) : (
|
|
@@ -20,6 +20,7 @@ import {EnergyConsumptionChartProps} from "./EnergyConsumptionChart";
|
|
|
20
20
|
import {overDays} from "@ledvance/base/src/utils";
|
|
21
21
|
import EnergyPopup, {EnergyData} from "./component/EnergyModal";
|
|
22
22
|
import {carbonDioxideEmission, countryAndRegion} from "./co2Data";
|
|
23
|
+
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
23
24
|
|
|
24
25
|
const { convertX: cx } = Utils.RatioUtils
|
|
25
26
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -32,7 +33,7 @@ export interface EnergyConsumptionDetailProps {
|
|
|
32
33
|
updateEnergyData: (data: EnergyData) => {}
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
const EnergyConsumptionDetail = (props: {theme?:
|
|
36
|
+
const EnergyConsumptionDetail = (props: {theme?: ThemeType}) => {
|
|
36
37
|
const params = useRoute().params as EnergyConsumptionDetailProps
|
|
37
38
|
const devId = useDeviceId()
|
|
38
39
|
const isSolarPlug = useEngergyGeneration()
|
|
@@ -133,7 +134,7 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
133
134
|
padding: cx(16)
|
|
134
135
|
},
|
|
135
136
|
cardTitle: {
|
|
136
|
-
color: props.theme
|
|
137
|
+
color: props.theme?.global.fontColor,
|
|
137
138
|
fontSize: cx(16),
|
|
138
139
|
fontWeight: 'bold'
|
|
139
140
|
},
|
|
@@ -142,7 +143,7 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
142
143
|
flexDirection: 'row',
|
|
143
144
|
},
|
|
144
145
|
consumptionNum: {
|
|
145
|
-
color: props.theme
|
|
146
|
+
color: props.theme?.global.secondBrand,
|
|
146
147
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
147
148
|
},
|
|
148
149
|
subContent: {
|
|
@@ -153,19 +154,19 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
153
154
|
valueText: {
|
|
154
155
|
fontSize: cx(24),
|
|
155
156
|
fontWeight: 'bold',
|
|
156
|
-
color: props.theme
|
|
157
|
+
color: props.theme?.global.secondBrand,
|
|
157
158
|
},
|
|
158
159
|
titleText: {
|
|
159
160
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
160
161
|
fontSize: cx(14),
|
|
161
|
-
color: props.theme
|
|
162
|
+
color: props.theme?.global.secondFontColor,
|
|
162
163
|
textAlign: 'center',
|
|
163
164
|
},
|
|
164
165
|
priceBg: {
|
|
165
166
|
height: cx(40),
|
|
166
167
|
width: cx(40),
|
|
167
168
|
borderRadius: cx(40),
|
|
168
|
-
backgroundColor: props.theme
|
|
169
|
+
backgroundColor: props.theme?.global.thirdBrand,
|
|
169
170
|
justifyContent: 'center',
|
|
170
171
|
alignItems: 'center',
|
|
171
172
|
marginRight: cx(10)
|
|
@@ -178,7 +179,7 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
178
179
|
paddingHorizontal: cx(10),
|
|
179
180
|
paddingVertical: cx(8),
|
|
180
181
|
marginTop: cx(8),
|
|
181
|
-
backgroundColor: props.theme
|
|
182
|
+
backgroundColor: props.theme?.button.primary,
|
|
182
183
|
alignItems: 'center',
|
|
183
184
|
justifyContent: 'center'
|
|
184
185
|
}
|
|
@@ -217,12 +218,12 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
217
218
|
<Image
|
|
218
219
|
source={res.energy_consumption_cash}
|
|
219
220
|
resizeMode="contain"
|
|
220
|
-
style={{ height: cx(20), width: cx(20), tintColor: props.theme
|
|
221
|
+
style={{ height: cx(20), width: cx(20), tintColor: props.theme?.button.primary }}
|
|
221
222
|
/>
|
|
222
223
|
</View>
|
|
223
224
|
<View style={styles.priceNum}>
|
|
224
225
|
<View style={{ flexDirection: 'row' }}>
|
|
225
|
-
<Text style={{ color: props.theme
|
|
226
|
+
<Text style={{ color: props.theme?.global.secondFontColor, marginRight: cx(5) }}>{I18n.getLang('consumption_data_field3_co2_topic_text')}</Text>
|
|
226
227
|
<TouchableOpacity
|
|
227
228
|
onPress={() => {
|
|
228
229
|
state.showPopup = true
|
|
@@ -232,11 +233,11 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
232
233
|
<Image
|
|
233
234
|
source={res.co2Icon}
|
|
234
235
|
resizeMode="contain"
|
|
235
|
-
style={{ height: cx(20), width: cx(20), tintColor: props.theme
|
|
236
|
+
style={{ height: cx(20), width: cx(20), tintColor: props.theme?.button.action }}
|
|
236
237
|
/>
|
|
237
238
|
</TouchableOpacity>
|
|
238
239
|
</View>
|
|
239
|
-
<Text style={{ color: props.theme
|
|
240
|
+
<Text style={{ color: props.theme?.global.fontColor, fontWeight: 'bold' }}>{`${state.co2Saved} kg`}</Text>
|
|
240
241
|
</View>
|
|
241
242
|
</View>
|
|
242
243
|
<Spacer height={cx(10)} />
|
|
@@ -247,20 +248,20 @@ const EnergyConsumptionDetail = (props: {theme?: any}) => {
|
|
|
247
248
|
<Image
|
|
248
249
|
source={res.energy_consumption_cash}
|
|
249
250
|
resizeMode="contain"
|
|
250
|
-
style={{ height: cx(20), width: cx(20), tintColor: props.theme
|
|
251
|
+
style={{ height: cx(20), width: cx(20), tintColor: props.theme?.button.primary }}
|
|
251
252
|
/>
|
|
252
253
|
</View>
|
|
253
254
|
<View>
|
|
254
255
|
<View style={styles.priceNum}>
|
|
255
|
-
<Text style={{ color: props.theme
|
|
256
|
-
<Text style={{ color: props.theme
|
|
256
|
+
<Text style={{ color: props.theme?.global.secondFontColor }}>{I18n.getLang('consumption_data_field3_value_text2')}</Text>
|
|
257
|
+
<Text style={{ color: props.theme?.global.fontColor, fontWeight: 'bold' }}>{state.price ? `${localeNumber(Number(state.price ) * Number(params.curMonth.value), 2)} ${state.unit}` : '-'}</Text>
|
|
257
258
|
</View>
|
|
258
259
|
<TouchableOpacity onPress={() => {
|
|
259
260
|
state.showPopup = true
|
|
260
261
|
state.popupType = 'money'
|
|
261
262
|
}}>
|
|
262
263
|
<View style={styles.priceButton}>
|
|
263
|
-
<Text style={{ color: props.theme
|
|
264
|
+
<Text style={{ color: props.theme?.button.fontColor }}>{I18n.getLang('consumption_data_field3_button_text')}</Text>
|
|
264
265
|
</View>
|
|
265
266
|
</TouchableOpacity>
|
|
266
267
|
</View>
|