@ledvance/ui-biz-bundle 1.1.152 → 1.1.154
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 +2 -2
- package/src/modules/flags/FlagItem.tsx +1 -1
- package/src/modules/history/HistoryPage.tsx +4 -4
- package/src/modules/mood/DynamicMoodEditorPage.tsx +2 -2
- package/src/modules/mood/FantasyMoodEditPage.tsx +2 -2
- package/src/modules/mood/FantasyMoodItem.tsx +2 -2
- package/src/modules/mood/MixMood/MixMoodEditPage.tsx +2 -2
- package/src/modules/mood/MixMood/MixMoodItem.tsx +2 -2
- package/src/modules/mood/MixMood/RecommendMixMoodItem.tsx +1 -1
- package/src/modules/mood/MoodItem.tsx +2 -2
- package/src/modules/mood/RecommendMoodItem.tsx +1 -1
- package/src/modules/mood/StaticMoodEditorPage.tsx +2 -2
- package/src/modules/music/MusicPage.tsx +1 -1
- package/src/modules/music/SelecetGenre.tsx +2 -2
- package/src/modules/scene/SceneDetailPage.tsx +6 -6
- package/src/modules/scene/ScenePage.tsx +3 -3
- package/src/modules/select/SelectPage.tsx +3 -3
- package/src/modules/timeSchedule/LdvScheduleItem.tsx +3 -3
- package/src/modules/timeSchedule/TimeScheduleEditpage.tsx +3 -3
- package/src/modules/timer/TimerPage.tsx +1 -1
- package/src/newModules/biorhythm/BiorhythmEditPage.tsx +8 -2
- package/src/newModules/biorhythm/BiorhythmPage.tsx +5 -5
- package/src/newModules/biorhythm/IconSelect.tsx +80 -20
- package/src/newModules/childLock/ChildLockPage.tsx +1 -1
- package/src/newModules/diyScene/DiySceneEditorPage.tsx +1 -1
- package/src/newModules/energyConsumption/EnergyConsumptionActions.ts +2 -7
- package/src/newModules/energyConsumption/EnergyConsumptionChart/EnergyChartSection.tsx +14 -22
- package/src/newModules/energyConsumption/EnergyConsumptionChart/styles.ts +9 -4
- package/src/newModules/energyConsumption/EnergyConsumptionChart/useEnergyData.ts +3 -1
- package/src/newModules/energyConsumption/component/DateSwitch.tsx +26 -24
- package/src/newModules/energyConsumption/component/NewBarChart.tsx +1 -0
- package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +1 -1
- package/src/newModules/fixedTime/FixedTimePage.tsx +3 -3
- package/src/newModules/lightMode/LightModePage.tsx +1 -1
- package/src/newModules/mood/DynamicMoodEditorPage.tsx +2 -2
- package/src/newModules/mood/MixDynamicMoodEditor.tsx +2 -2
- package/src/newModules/mood/MoodItem.tsx +2 -2
- package/src/newModules/mood/RecommendMoodItem.tsx +1 -1
- package/src/newModules/mood/StaticMoodEditorPage.tsx +1 -1
- package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +1 -1
- package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +2 -2
- package/src/newModules/randomTime/RandomTimeDetailPage.tsx +1 -1
- package/src/newModules/randomTime/RandomTimePage.tsx +3 -3
- package/src/newModules/randomTime/Summary.tsx +1 -1
- package/src/newModules/select/SelectPage.tsx +3 -3
- package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +1 -1
- package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +4 -4
- package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +1 -1
- package/src/newModules/timeSchedule/TimeSchedulePage.tsx +49 -38
- package/src/newModules/timeSchedule/components/ScheduleCard.tsx +4 -4
package/package.json
CHANGED
|
@@ -103,7 +103,7 @@ const FlagEditPage = (props: { theme?: ThemeType }) => {
|
|
|
103
103
|
light: {
|
|
104
104
|
color: props.theme?.global.fontColor,
|
|
105
105
|
fontSize: cx(18),
|
|
106
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
106
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
107
107
|
},
|
|
108
108
|
transitionMode: {
|
|
109
109
|
marginHorizontal: cx(16),
|
|
@@ -171,7 +171,7 @@ const FlagEditPage = (props: { theme?: ThemeType }) => {
|
|
|
171
171
|
deleteBtnText: {
|
|
172
172
|
color: props.theme?.button.fontColor,
|
|
173
173
|
fontSize: cx(16),
|
|
174
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
174
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
175
175
|
},
|
|
176
176
|
})
|
|
177
177
|
|
|
@@ -124,13 +124,13 @@ const SwitchHistoryPage = (props: { theme?: ThemeType }) => {
|
|
|
124
124
|
listEmptyText: {
|
|
125
125
|
color: props.theme?.global.fontColor,
|
|
126
126
|
fontSize: cx(12),
|
|
127
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
127
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
128
128
|
},
|
|
129
129
|
titleText: {
|
|
130
130
|
marginHorizontal: cx(24),
|
|
131
131
|
color: props.theme?.global.fontColor,
|
|
132
132
|
fontSize: cx(16),
|
|
133
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
133
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
134
134
|
},
|
|
135
135
|
switchHistoryItem: {
|
|
136
136
|
marginHorizontal: cx(24),
|
|
@@ -138,7 +138,7 @@ const SwitchHistoryPage = (props: { theme?: ThemeType }) => {
|
|
|
138
138
|
switchHistoryItemTitle: {
|
|
139
139
|
color: props.theme?.global.fontColor,
|
|
140
140
|
fontSize: cx(18),
|
|
141
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
141
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
142
142
|
},
|
|
143
143
|
switchHistoryItemActionItem: {
|
|
144
144
|
flexDirection: 'row',
|
|
@@ -168,7 +168,7 @@ const SwitchHistoryPage = (props: { theme?: ThemeType }) => {
|
|
|
168
168
|
switchHistoryItemActionItemText: {
|
|
169
169
|
color: props.theme?.global.fontColor,
|
|
170
170
|
fontSize: cx(16),
|
|
171
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
171
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
172
172
|
},
|
|
173
173
|
switchHistoryItemTag: {
|
|
174
174
|
paddingHorizontal: cx(10),
|
|
@@ -475,7 +475,7 @@ const styles = StyleSheet.create({
|
|
|
475
475
|
light: {
|
|
476
476
|
color: '#000',
|
|
477
477
|
fontSize: cx(18),
|
|
478
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
478
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
479
479
|
},
|
|
480
480
|
transitionMode: {
|
|
481
481
|
marginHorizontal: cx(16),
|
|
@@ -543,7 +543,7 @@ const styles = StyleSheet.create({
|
|
|
543
543
|
deleteBtnText: {
|
|
544
544
|
color: '#fff',
|
|
545
545
|
fontSize: cx(16),
|
|
546
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
546
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
547
547
|
},
|
|
548
548
|
})
|
|
549
549
|
export default DynamicMoodEditorPage
|
|
@@ -510,7 +510,7 @@ const styles = StyleSheet.create({
|
|
|
510
510
|
light: {
|
|
511
511
|
color: '#000',
|
|
512
512
|
fontSize: cx(18),
|
|
513
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
513
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
514
514
|
},
|
|
515
515
|
transitionMode: {
|
|
516
516
|
marginHorizontal: cx(16),
|
|
@@ -576,7 +576,7 @@ const styles = StyleSheet.create({
|
|
|
576
576
|
deleteBtnText: {
|
|
577
577
|
color: '#fff',
|
|
578
578
|
fontSize: cx(16),
|
|
579
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
579
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
580
580
|
},
|
|
581
581
|
})
|
|
582
582
|
export default FantasyMoodEditPage
|
|
@@ -74,7 +74,7 @@ const styles = StyleSheet.create({
|
|
|
74
74
|
flex: 1,
|
|
75
75
|
color: '#000',
|
|
76
76
|
fontSize: cx(16),
|
|
77
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
77
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
78
78
|
lineHeight: cx(20),
|
|
79
79
|
},
|
|
80
80
|
gradientItem: {
|
|
@@ -97,7 +97,7 @@ const styles = StyleSheet.create({
|
|
|
97
97
|
color: '#000000DD',
|
|
98
98
|
fontSize: cx(10),
|
|
99
99
|
textAlignVertical: 'center',
|
|
100
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
100
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
101
101
|
lineHeight: cx(16),
|
|
102
102
|
},
|
|
103
103
|
})
|
|
@@ -617,7 +617,7 @@ const styles = StyleSheet.create({
|
|
|
617
617
|
light: {
|
|
618
618
|
color: '#000',
|
|
619
619
|
fontSize: cx(18),
|
|
620
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
620
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
621
621
|
},
|
|
622
622
|
transitionMode: {
|
|
623
623
|
marginHorizontal: cx(16),
|
|
@@ -685,7 +685,7 @@ const styles = StyleSheet.create({
|
|
|
685
685
|
deleteBtnText: {
|
|
686
686
|
color: '#fff',
|
|
687
687
|
fontSize: cx(16),
|
|
688
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
688
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
689
689
|
},
|
|
690
690
|
})
|
|
691
691
|
|
|
@@ -92,7 +92,7 @@ const styles = StyleSheet.create({
|
|
|
92
92
|
flex: 1,
|
|
93
93
|
color: '#000',
|
|
94
94
|
fontSize: cx(16),
|
|
95
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
95
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
96
96
|
lineHeight: cx(20),
|
|
97
97
|
},
|
|
98
98
|
gradientItem: {
|
|
@@ -128,7 +128,7 @@ const styles = StyleSheet.create({
|
|
|
128
128
|
color: '#000000DD',
|
|
129
129
|
fontSize: cx(10),
|
|
130
130
|
textAlignVertical: 'center',
|
|
131
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
131
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
132
132
|
lineHeight: cx(16),
|
|
133
133
|
},
|
|
134
134
|
})
|
|
@@ -84,7 +84,7 @@ const styles = StyleSheet.create({
|
|
|
84
84
|
flex: 1,
|
|
85
85
|
color: '#000',
|
|
86
86
|
fontSize: cx(16),
|
|
87
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
87
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
88
88
|
lineHeight: cx(20),
|
|
89
89
|
},
|
|
90
90
|
gradientItem: {
|
|
@@ -107,7 +107,7 @@ const styles = StyleSheet.create({
|
|
|
107
107
|
color: '#000000DD',
|
|
108
108
|
fontSize: cx(10),
|
|
109
109
|
textAlignVertical: 'center',
|
|
110
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
110
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
111
111
|
lineHeight: cx(16),
|
|
112
112
|
},
|
|
113
113
|
})
|
|
@@ -297,7 +297,7 @@ const styles = StyleSheet.create({
|
|
|
297
297
|
light: {
|
|
298
298
|
color: '#000',
|
|
299
299
|
fontSize: cx(18),
|
|
300
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
300
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
301
301
|
},
|
|
302
302
|
preview: {
|
|
303
303
|
width: cx(20),
|
|
@@ -314,7 +314,7 @@ const styles = StyleSheet.create({
|
|
|
314
314
|
deleteBtnText: {
|
|
315
315
|
color: '#fff',
|
|
316
316
|
fontSize: cx(16),
|
|
317
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
317
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
318
318
|
},
|
|
319
319
|
})
|
|
320
320
|
|
|
@@ -31,7 +31,7 @@ const styles = StyleSheet.create({
|
|
|
31
31
|
fontSize: cx(12),
|
|
32
32
|
marginStart: cx(13),
|
|
33
33
|
color: '#666',
|
|
34
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
34
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
35
35
|
},
|
|
36
36
|
textInputGroup: {
|
|
37
37
|
flexDirection: 'row',
|
|
@@ -49,7 +49,7 @@ const styles = StyleSheet.create({
|
|
|
49
49
|
textInput: {
|
|
50
50
|
fontSize: cx(16),
|
|
51
51
|
color: '#000',
|
|
52
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
52
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
53
53
|
},
|
|
54
54
|
line: {
|
|
55
55
|
height: 1,
|
|
@@ -159,7 +159,7 @@ export default function SceneDetailPage() {
|
|
|
159
159
|
marginStart: cx(24),
|
|
160
160
|
fontSize: cx(14),
|
|
161
161
|
color: '#000',
|
|
162
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
162
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
163
163
|
}}>{Strings.getLang('Transform time')}</Text>
|
|
164
164
|
<Slider.Horizontal
|
|
165
165
|
value={state.transitionTime}
|
|
@@ -262,7 +262,7 @@ export default function SceneDetailPage() {
|
|
|
262
262
|
tabTextStyle={{
|
|
263
263
|
fontSize: cx(14),
|
|
264
264
|
color: '#666',
|
|
265
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
265
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
266
266
|
}}
|
|
267
267
|
tabActiveTextStyle={{ color: '#f60' }}
|
|
268
268
|
tabBarUnderlineStyle={{ backgroundColor: '#f60' }}
|
|
@@ -294,12 +294,12 @@ export default function SceneDetailPage() {
|
|
|
294
294
|
<Text style={{
|
|
295
295
|
fontSize: cx(14),
|
|
296
296
|
color: '#000',
|
|
297
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
297
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
298
298
|
}}>{'亮度'}</Text>
|
|
299
299
|
<Text style={{
|
|
300
300
|
fontSize: cx(14),
|
|
301
301
|
color: '#000',
|
|
302
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
302
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
303
303
|
}}>{state.currentNode.v}%</Text>
|
|
304
304
|
</View>
|
|
305
305
|
<Slider.Horizontal
|
|
@@ -351,12 +351,12 @@ export default function SceneDetailPage() {
|
|
|
351
351
|
<Text style={{
|
|
352
352
|
fontSize: cx(14),
|
|
353
353
|
color: '#000',
|
|
354
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
354
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
355
355
|
}}>{Strings.getLang('add_new_trigger_time_field_brightness_text')}</Text>
|
|
356
356
|
<Text style={{
|
|
357
357
|
fontSize: cx(14),
|
|
358
358
|
color: '#000',
|
|
359
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
359
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
360
360
|
}}>{state.currentNode.brightness}%</Text>
|
|
361
361
|
</View>
|
|
362
362
|
<Slider.Horizontal
|
|
@@ -66,7 +66,7 @@ const ScenePage = () => {
|
|
|
66
66
|
color: '#fff',
|
|
67
67
|
fontSize: cx(18),
|
|
68
68
|
letterSpacing: 0.2,
|
|
69
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
69
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
70
70
|
}}>{item.name}</Text>
|
|
71
71
|
</ImageBackground>
|
|
72
72
|
</TouchableOpacity>
|
|
@@ -99,7 +99,7 @@ const ScenePage = () => {
|
|
|
99
99
|
color: '#fff',
|
|
100
100
|
fontSize: cx(40),
|
|
101
101
|
letterSpacing: 4,
|
|
102
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
102
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
103
103
|
}}>{state.currentScene?.name}</Text>
|
|
104
104
|
</View>
|
|
105
105
|
<View
|
|
@@ -114,7 +114,7 @@ const ScenePage = () => {
|
|
|
114
114
|
style={{
|
|
115
115
|
color: '#fff',
|
|
116
116
|
fontSize: cx(16),
|
|
117
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
117
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
118
118
|
}}>{Strings.getLang('Current scene')}</Text>
|
|
119
119
|
<TouchableOpacity
|
|
120
120
|
style={{ padding: cx(10) }}
|
|
@@ -95,7 +95,7 @@ const styles = StyleSheet.create({
|
|
|
95
95
|
marginStart: cx(16),
|
|
96
96
|
color: '#f60',
|
|
97
97
|
fontSize: cx(17),
|
|
98
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
98
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
99
99
|
},
|
|
100
100
|
title: {
|
|
101
101
|
width: '100%',
|
|
@@ -105,7 +105,7 @@ const styles = StyleSheet.create({
|
|
|
105
105
|
color: '#000',
|
|
106
106
|
fontSize: cx(17),
|
|
107
107
|
paddingHorizontal: cx(110),
|
|
108
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
108
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
109
109
|
},
|
|
110
110
|
card: {
|
|
111
111
|
marginHorizontal: cx(16),
|
|
@@ -120,7 +120,7 @@ const styles = StyleSheet.create({
|
|
|
120
120
|
marginStart: cx(13),
|
|
121
121
|
color: '#000',
|
|
122
122
|
fontSize: cx(17),
|
|
123
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
123
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
124
124
|
},
|
|
125
125
|
itemLine: {
|
|
126
126
|
height: cx(1),
|
|
@@ -89,19 +89,19 @@ const styles = StyleSheet.create({
|
|
|
89
89
|
time: {
|
|
90
90
|
marginBottom: convertX(5),
|
|
91
91
|
fontSize: 16,
|
|
92
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
92
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
93
93
|
fontWeight: 'bold',
|
|
94
94
|
},
|
|
95
95
|
loop: {
|
|
96
96
|
color: '#000',
|
|
97
97
|
fontSize: convertX(14),
|
|
98
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
98
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
99
99
|
marginTop: convertX(8),
|
|
100
100
|
},
|
|
101
101
|
name: {
|
|
102
102
|
color: '#000',
|
|
103
103
|
fontSize: convertX(14),
|
|
104
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
104
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
105
105
|
marginTop: convertX(8),
|
|
106
106
|
},
|
|
107
107
|
switchContainer: {
|
|
@@ -692,7 +692,7 @@ const styles = StyleSheet.create({
|
|
|
692
692
|
},
|
|
693
693
|
loopText: {
|
|
694
694
|
fontSize: cx(14),
|
|
695
|
-
fontFamily: 'PingFangSC-Medium',
|
|
695
|
+
// fontFamily: 'PingFangSC-Medium',
|
|
696
696
|
color: '#999999',
|
|
697
697
|
marginTop: cx(10),
|
|
698
698
|
},
|
|
@@ -700,7 +700,7 @@ const styles = StyleSheet.create({
|
|
|
700
700
|
color: '#000',
|
|
701
701
|
fontSize: cx(16),
|
|
702
702
|
fontWeight: 'bold',
|
|
703
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
703
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
704
704
|
marginTop: cx(30),
|
|
705
705
|
marginBottom: cx(10),
|
|
706
706
|
},
|
|
@@ -723,7 +723,7 @@ const styles = StyleSheet.create({
|
|
|
723
723
|
switchCardTitle: {
|
|
724
724
|
color: '#000',
|
|
725
725
|
fontSize: cx(16),
|
|
726
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
726
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
727
727
|
},
|
|
728
728
|
skillListItem: {
|
|
729
729
|
flexDirection: 'row',
|
|
@@ -170,7 +170,7 @@ const TimerPage = (props: {theme?: ThemeType}) => {
|
|
|
170
170
|
color: props.theme?.global.fontColor,
|
|
171
171
|
fontSize: cx(16),
|
|
172
172
|
fontWeight: 'bold',
|
|
173
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
173
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
174
174
|
marginTop: cx(30),
|
|
175
175
|
marginBottom: cx(10)
|
|
176
176
|
},
|
|
@@ -112,7 +112,7 @@ const BiorhythmEditPage = (props: { theme?: ThemeType }) => {
|
|
|
112
112
|
title: {
|
|
113
113
|
color: props.theme?.global.fontColor,
|
|
114
114
|
fontSize: cx(16),
|
|
115
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
115
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
116
116
|
paddingVertical: cx(16),
|
|
117
117
|
},
|
|
118
118
|
})
|
|
@@ -195,7 +195,13 @@ const BiorhythmEditPage = (props: { theme?: ThemeType }) => {
|
|
|
195
195
|
</TouchableOpacity>
|
|
196
196
|
</View>
|
|
197
197
|
<Text
|
|
198
|
-
style={{
|
|
198
|
+
style={{
|
|
199
|
+
fontSize: cx(16),
|
|
200
|
+
color: props.theme?.global.fontColor,
|
|
201
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
202
|
+
marginTop: cx(33),
|
|
203
|
+
marginBottom: cx(16)
|
|
204
|
+
}}>
|
|
199
205
|
{I18n.getLang('add_new_trigger_time_subheadline_text')}
|
|
200
206
|
</Text>
|
|
201
207
|
<Card>
|
|
@@ -224,7 +224,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
224
224
|
<Text
|
|
225
225
|
onPress={openLink}
|
|
226
226
|
style={{
|
|
227
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
227
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
228
228
|
color: props.theme?.button.primary,
|
|
229
229
|
textDecorationLine: 'underline',
|
|
230
230
|
flexWrap: 'wrap',
|
|
@@ -343,7 +343,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
343
343
|
<Text style={{
|
|
344
344
|
fontSize: cx(16),
|
|
345
345
|
color: props.theme?.textInput.fontColor,
|
|
346
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
346
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
347
347
|
paddingLeft: cx(16),
|
|
348
348
|
}}>
|
|
349
349
|
{
|
|
@@ -524,7 +524,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
524
524
|
style={{
|
|
525
525
|
fontSize: cx(16),
|
|
526
526
|
color: props.theme?.global.fontColor,
|
|
527
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
527
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
528
528
|
}}
|
|
529
529
|
>
|
|
530
530
|
{convertMinutesTo12HourFormat(item.time, is24Hour)}
|
|
@@ -546,7 +546,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
546
546
|
style={{
|
|
547
547
|
fontSize: cx(12),
|
|
548
548
|
color: props.theme?.global.secondFontColor,
|
|
549
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
549
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
550
550
|
paddingLeft: cx(20),
|
|
551
551
|
}}
|
|
552
552
|
>
|
|
@@ -576,7 +576,7 @@ const BiorhythmPage = (props: { theme?: ThemeType }) => {
|
|
|
576
576
|
text={I18n.getLang('bio_ryhthm_default_button_reset_text')}
|
|
577
577
|
textStyle={{
|
|
578
578
|
fontSize: cx(16),
|
|
579
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
579
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
580
580
|
}}
|
|
581
581
|
onPress={() => {
|
|
582
582
|
showCommonDialog({
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { useNavigation, useRoute } from '@react-navigation/native'
|
|
2
|
-
import React, { useEffect, useState } from 'react'
|
|
3
|
-
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
|
3
|
+
// 导入 Dimensions API 来获取屏幕宽度
|
|
4
|
+
import { Dimensions, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
|
|
4
5
|
import { Utils } from 'tuya-panel-kit'
|
|
5
6
|
import iconList from '../biorhythm/iconListData'
|
|
6
7
|
import LDVTopBar from '@ledvance/base/src/components/ldvTopBar'
|
|
7
8
|
import I18n from '@ledvance/base/src/i18n'
|
|
8
9
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
10
|
+
import { xLog } from '@ledvance/base/src/utils'
|
|
9
11
|
|
|
10
|
-
const cx = Utils.RatioUtils
|
|
12
|
+
const { convertX: cx } = Utils.RatioUtils
|
|
11
13
|
const { withTheme } = Utils.ThemeUtils
|
|
12
14
|
|
|
13
15
|
interface SceneDetailPageParams {
|
|
@@ -17,6 +19,13 @@ interface SceneDetailPageParams {
|
|
|
17
19
|
iconIdList: any
|
|
18
20
|
}
|
|
19
21
|
|
|
22
|
+
// --- 新增:定义常量,方便维护 ---
|
|
23
|
+
const ICON_WIDTH = cx(32)
|
|
24
|
+
const ICON_MARGIN = cx(10)
|
|
25
|
+
const CONTAINER_HORIZONTAL_PADDING = cx(24)
|
|
26
|
+
// 每个图标占据的总宽度(图片宽度 + 左右margin)
|
|
27
|
+
const ITEM_TOTAL_WIDTH = ICON_WIDTH + ICON_MARGIN * 2
|
|
28
|
+
|
|
20
29
|
function IconSelect(props: { theme?: ThemeType }) {
|
|
21
30
|
const [list, setList] = useState(iconList)
|
|
22
31
|
const navigation = useNavigation()
|
|
@@ -27,7 +36,7 @@ function IconSelect(props: { theme?: ThemeType }) {
|
|
|
27
36
|
...item,
|
|
28
37
|
selectStatus: item?.id === id,
|
|
29
38
|
}
|
|
30
|
-
})
|
|
39
|
+
}) as typeof list
|
|
31
40
|
setList(newList)
|
|
32
41
|
}
|
|
33
42
|
useEffect(() => {
|
|
@@ -39,26 +48,74 @@ function IconSelect(props: { theme?: ThemeType }) {
|
|
|
39
48
|
selectStatus: item?.id === iconId,
|
|
40
49
|
disabled: iconIdList?.some(val => val === item?.id && val !== iconId),
|
|
41
50
|
}
|
|
42
|
-
})
|
|
51
|
+
}) as typeof list
|
|
43
52
|
setList(newList)
|
|
44
53
|
}, [])
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
|
|
55
|
+
const getStyles = useCallback((theme?: ThemeType) => StyleSheet.create({
|
|
56
|
+
container: { flex: 1, flexDirection: 'column' },
|
|
57
|
+
scrollView: { marginHorizontal: CONTAINER_HORIZONTAL_PADDING },
|
|
58
|
+
titleView: { marginTop: cx(40), marginBottom: cx(20) },
|
|
59
|
+
title: { fontSize: cx(24), color: theme?.global.brand },
|
|
60
|
+
iconContainer: {
|
|
61
|
+
flexDirection: 'row',
|
|
62
|
+
flex: 1,
|
|
63
|
+
flexWrap: 'wrap',
|
|
64
|
+
justifyContent: 'space-between',
|
|
65
|
+
alignItems: 'center'
|
|
66
|
+
},
|
|
67
|
+
ghostItem: {
|
|
68
|
+
width: ICON_WIDTH,
|
|
69
|
+
height: 0,
|
|
70
|
+
margin: ICON_MARGIN,
|
|
71
|
+
}
|
|
72
|
+
}), [CONTAINER_HORIZONTAL_PADDING, ICON_WIDTH, ICON_MARGIN])
|
|
73
|
+
|
|
74
|
+
const styles = useMemo(() => getStyles(props.theme), [props.theme])
|
|
75
|
+
|
|
76
|
+
// --- 新增:动态计算需要渲染的幽灵元素数量 ---
|
|
77
|
+
const ghostElements = useMemo(() => {
|
|
78
|
+
|
|
79
|
+
// 1. 获取容器的可用宽度
|
|
80
|
+
const containerWidth = cx(Dimensions.get('window').width) - CONTAINER_HORIZONTAL_PADDING * 2
|
|
81
|
+
|
|
82
|
+
// 2. 计算每行可以容纳多少个元素
|
|
83
|
+
const itemsPerRow = Math.ceil(containerWidth / ITEM_TOTAL_WIDTH)
|
|
84
|
+
// 如果无法容纳任何元素,则不渲染幽灵元素
|
|
85
|
+
if (itemsPerRow <= 0) {
|
|
86
|
+
xLog('No ghost elements needed.')
|
|
87
|
+
return null
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 3. 计算需要补充的幽灵元素数量
|
|
91
|
+
const numberOfItems = list.length
|
|
92
|
+
const itemsInLastRow = numberOfItems % itemsPerRow
|
|
93
|
+
|
|
94
|
+
// 如果最后一行为空或已满,则不需要幽灵元素
|
|
95
|
+
if (itemsInLastRow === 0) {
|
|
96
|
+
return null
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const numberOfGhosts = itemsPerRow - itemsInLastRow
|
|
100
|
+
|
|
101
|
+
// 4. 返回一个包含正确数量幽灵元素的数组
|
|
102
|
+
return Array.from({ length: numberOfGhosts }).map((_, index) => (
|
|
103
|
+
<View key={`ghost-${index}`} style={styles.ghostItem}/>
|
|
104
|
+
))
|
|
105
|
+
}, [list.length]) // 依赖项:当图标总数变化时重新计算
|
|
106
|
+
|
|
48
107
|
return (
|
|
49
|
-
<View style={
|
|
108
|
+
<View style={styles.container}>
|
|
50
109
|
<LDVTopBar
|
|
51
110
|
title={params.backText ?? I18n.getLang('add_new_trigger_time_system_back_text')}
|
|
52
|
-
onBackPress={() =>
|
|
53
|
-
navigation.goBack()
|
|
54
|
-
}}
|
|
111
|
+
onBackPress={() => navigation.goBack()}
|
|
55
112
|
/>
|
|
56
|
-
<ScrollView nestedScrollEnabled={true} style={
|
|
57
|
-
<View style={
|
|
58
|
-
<Text style={
|
|
113
|
+
<ScrollView nestedScrollEnabled={true} style={styles.scrollView}>
|
|
114
|
+
<View style={styles.titleView}>
|
|
115
|
+
<Text style={styles.title}>{I18n.getLang('add_new_trigger_time_icon_selection_headline_text')}</Text>
|
|
59
116
|
</View>
|
|
60
|
-
<View
|
|
61
|
-
|
|
117
|
+
<View style={styles.iconContainer}>
|
|
118
|
+
{/* 渲染真实的图标 */}
|
|
62
119
|
{list?.map(item => {
|
|
63
120
|
return <TouchableOpacity
|
|
64
121
|
onPress={() => {
|
|
@@ -71,14 +128,17 @@ function IconSelect(props: { theme?: ThemeType }) {
|
|
|
71
128
|
<Image
|
|
72
129
|
source={{ uri: item?.icon }}
|
|
73
130
|
style={{
|
|
74
|
-
width:
|
|
75
|
-
height: cx(32),
|
|
76
|
-
margin:
|
|
131
|
+
width: ICON_WIDTH,
|
|
132
|
+
height: cx(32), // 高度保持不变
|
|
133
|
+
margin: ICON_MARGIN,
|
|
77
134
|
tintColor: item?.selectStatus ? props.theme?.icon.primary : item?.disabled && props.theme?.icon.disable || props.theme?.icon.normal,
|
|
78
135
|
}}
|
|
79
136
|
/>
|
|
80
137
|
</TouchableOpacity>
|
|
81
138
|
})}
|
|
139
|
+
|
|
140
|
+
{/* 渲染精确计算出的幽灵元素 */}
|
|
141
|
+
{ghostElements}
|
|
82
142
|
</View>
|
|
83
143
|
</ScrollView>
|
|
84
144
|
</View>
|
|
@@ -48,7 +48,7 @@ const ChildLockPage = (props: { theme?: ThemeType }) => {
|
|
|
48
48
|
title: {
|
|
49
49
|
color: props.theme?.global.fontColor,
|
|
50
50
|
fontSize: cx(14),
|
|
51
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
51
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
52
52
|
paddingVertical: cx(16),
|
|
53
53
|
},
|
|
54
54
|
shadow: {
|
|
@@ -180,7 +180,7 @@ const DiySceneEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
180
180
|
deleteBtnText: {
|
|
181
181
|
color: props.theme?.button.fontColor,
|
|
182
182
|
fontSize: cx(16),
|
|
183
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
183
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
184
184
|
},
|
|
185
185
|
})
|
|
186
186
|
|