@ledvance/ui-biz-bundle 1.1.153 → 1.1.155
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/childLock/ChildLockPage.tsx +1 -1
- package/src/newModules/diyScene/DiySceneEditorPage.tsx +1 -1
- package/src/newModules/energyConsumption/EnergyConsumptionActions.ts +1 -0
- package/src/newModules/energyConsumption/EnergyConsumptionCard.tsx +1 -1
- package/src/newModules/energyConsumption/EnergyConsumptionChart/EnergyChartSection.tsx +1 -1
- package/src/newModules/energyConsumption/EnergyConsumptionChart/useEnergyData.ts +3 -0
- package/src/newModules/energyConsumption/EnergyConsumptionPage.tsx +31 -23
- 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 +8 -7
- 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({
|
|
@@ -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
|
|
|
@@ -43,6 +43,7 @@ export async function updatePrice(devId: string, energyData: EnergyData) {
|
|
|
43
43
|
export async function resetElectricity(devId) {
|
|
44
44
|
const res = await TYSdk.apiRequest('tuya.m.dp.statistics.reset', {devId}, '1.0')
|
|
45
45
|
xLog('resetElectricity res', res)
|
|
46
|
+
return res
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export async function getElectricity(devId: string, addEleDpCode: string, date: string, dateType: DateType): Promise<OverviewItem[]> {
|
|
@@ -148,7 +148,7 @@ const EnergyConsumptionCard = (props: EnergyConsumptionProp) => {
|
|
|
148
148
|
addEleDpCode: props.addEleDpCode,
|
|
149
149
|
} as EnergyConsumptionPageProps)}>
|
|
150
150
|
<Spacer height={cx(16)}/>
|
|
151
|
-
<View style={styles.consumedEnergyHeadline}>
|
|
151
|
+
<View accessibilityLabel={'AdvanceCard'} accessibilityHint={I18n.getLang(state.isGeneration ? 'sockets_headline_power' : 'sockets_ce')} style={styles.consumedEnergyHeadline}>
|
|
152
152
|
<Text
|
|
153
153
|
style={styles.consumedEnergyCardTitle}>{I18n.getLang(state.isGeneration ? 'sockets_headline_power' : 'sockets_ce')}</Text>
|
|
154
154
|
<Image source={Res.energyChart} style={{ width: cx(24), height: cx(24), tintColor: props.theme?.icon.normal }}/>
|
|
@@ -34,7 +34,7 @@ export const EnergyChartSection = ({ isLandscape, state, actions, params, styles
|
|
|
34
34
|
<>
|
|
35
35
|
<View style={styles.dateTypeContainer}>
|
|
36
36
|
<DateTypeItem
|
|
37
|
-
style={{ flex:
|
|
37
|
+
style={{ flex: 1 }}
|
|
38
38
|
dateType={state.dateType}
|
|
39
39
|
onDateTypeChange={actions.setDateType}
|
|
40
40
|
/>
|
|
@@ -121,6 +121,9 @@ export const useEnergyData = (params: EnergyConsumptionChartProps, devId: string
|
|
|
121
121
|
|
|
122
122
|
// 封装所有修改状态的函数
|
|
123
123
|
const actions = {
|
|
124
|
+
cleanChartData: useCallback(() => {
|
|
125
|
+
state.chartData = []
|
|
126
|
+
}, []),
|
|
124
127
|
setChartType: useCallback((type: ChartType) => {
|
|
125
128
|
state.chartType = type
|
|
126
129
|
}, []),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Segmented from '@ledvance/base/src/components/Segmented'
|
|
2
|
+
import { resetElectricity } from './EnergyConsumptionActions'
|
|
2
3
|
import { ChartType } from './co2Data'
|
|
3
4
|
import { EnergyChartSection } from './EnergyConsumptionChart/EnergyChartSection'
|
|
4
5
|
import { PowerChartSection } from './EnergyConsumptionChart/PowerChartSection'
|
|
@@ -21,8 +22,10 @@ import {useDeviceId, useSolarPlug, useTimeZoneCity} from "@ledvance/base/src/mod
|
|
|
21
22
|
import { flattenDeep, isEmpty } from "lodash";
|
|
22
23
|
import { exchangeNumber, localeNumber, monthFormat, monthFormatShort, showDialog } from "@ledvance/base/src/utils/common";
|
|
23
24
|
import {
|
|
24
|
-
EnergyGeneration,
|
|
25
|
-
|
|
25
|
+
EnergyGeneration,
|
|
26
|
+
EnergyHistory,
|
|
27
|
+
getEnergyGenerationValue,
|
|
28
|
+
setEnergyGenerationValue,
|
|
26
29
|
updatePrice,
|
|
27
30
|
useElectricCurrent,
|
|
28
31
|
usePower,
|
|
@@ -136,8 +139,8 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
136
139
|
}, [isSolarPlug, state.generationMode])
|
|
137
140
|
|
|
138
141
|
const totalElectricity = useMemo(() => {
|
|
139
|
-
return
|
|
140
|
-
}, [state.totalElectricity
|
|
142
|
+
return Number(state.totalElectricity)
|
|
143
|
+
}, [state.totalElectricity])
|
|
141
144
|
|
|
142
145
|
useUpdateEffect(() =>{
|
|
143
146
|
if(totalElectricity >= 0 && timeZoneCity){
|
|
@@ -167,16 +170,17 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
167
170
|
const item: EnergyHistory = {
|
|
168
171
|
time,
|
|
169
172
|
generationMode: value,
|
|
170
|
-
value:
|
|
173
|
+
value: 0,
|
|
171
174
|
type: isSolarPlug ? (value ? 'Consumption' : 'Generation') : (value ? 'Generation' : 'Consumption')
|
|
172
175
|
}
|
|
173
176
|
const data: EnergyGeneration = {
|
|
174
177
|
generationMode: value,
|
|
175
|
-
totalElectricity:
|
|
178
|
+
totalElectricity: 0,
|
|
176
179
|
history: [item, ...state.energyGeneration.history]
|
|
177
180
|
}
|
|
178
181
|
const res = await setEnergyGenerationValue(devId, data)
|
|
179
182
|
if (res) {
|
|
183
|
+
await cleanEnergyData()
|
|
180
184
|
state.generationMode = value
|
|
181
185
|
state.energyGeneration = data
|
|
182
186
|
} else {
|
|
@@ -185,9 +189,15 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
185
189
|
state.loading = false
|
|
186
190
|
}
|
|
187
191
|
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
|
|
192
|
+
const cleanEnergyData = async () => {
|
|
193
|
+
const res = await resetElectricity(devId)
|
|
194
|
+
if (res) {
|
|
195
|
+
state.todayElectricity = 0
|
|
196
|
+
state.totalElectricity = 0
|
|
197
|
+
state.overviewList = []
|
|
198
|
+
actions.cleanChartData()
|
|
199
|
+
}
|
|
200
|
+
return res
|
|
191
201
|
}
|
|
192
202
|
|
|
193
203
|
const getElectricity = async () => {
|
|
@@ -212,6 +222,8 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
212
222
|
return monthData
|
|
213
223
|
})
|
|
214
224
|
state.overviewList = flattenDeep(monthList)
|
|
225
|
+
} else {
|
|
226
|
+
state.overviewList = []
|
|
215
227
|
}
|
|
216
228
|
}
|
|
217
229
|
}
|
|
@@ -344,10 +356,17 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
344
356
|
style={{ position: 'relative' }}
|
|
345
357
|
backText={backTitle}
|
|
346
358
|
headlineText={backTitle}
|
|
347
|
-
headlineIcon={
|
|
359
|
+
headlineIcon={res.ic_refresh}
|
|
348
360
|
onHeadlineIconClick={() => {
|
|
349
|
-
|
|
350
|
-
|
|
361
|
+
showDialog({
|
|
362
|
+
method: 'confirm',
|
|
363
|
+
title: I18n.getLang('reset_energy'),
|
|
364
|
+
subTitle: '',
|
|
365
|
+
onConfirm: (_, { close }) => {
|
|
366
|
+
close()
|
|
367
|
+
cleanEnergyData().then()
|
|
368
|
+
}
|
|
369
|
+
})
|
|
351
370
|
}}
|
|
352
371
|
showGreenery={isGeneration}
|
|
353
372
|
greeneryIcon={res.energy_consumption_greenery}
|
|
@@ -508,17 +527,6 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
508
527
|
if (state.loading) {
|
|
509
528
|
return
|
|
510
529
|
}
|
|
511
|
-
if (onceByDay()) {
|
|
512
|
-
showDialog({
|
|
513
|
-
method: 'alert',
|
|
514
|
-
title: I18n.getLang('switchonlyonce', 'Switching the mode is only allowed once a day.'),
|
|
515
|
-
confirmText: I18n.getLang('home_screen_home_dialog_yes_con'),
|
|
516
|
-
onConfirm: (_, {close}) => {
|
|
517
|
-
close()
|
|
518
|
-
}
|
|
519
|
-
})
|
|
520
|
-
return
|
|
521
|
-
}
|
|
522
530
|
showDialog({
|
|
523
531
|
method: 'confirm',
|
|
524
532
|
title: getEnergyModeTitle(value),
|
|
@@ -87,7 +87,7 @@ const FixedTimeDetailPage = (props: { theme?: ThemeType }) => {
|
|
|
87
87
|
color: props.theme?.global.fontColor,
|
|
88
88
|
fontSize: cx(16),
|
|
89
89
|
fontWeight: 'bold',
|
|
90
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
90
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
91
91
|
},
|
|
92
92
|
applyContent: {
|
|
93
93
|
backgroundColor: props.theme?.container.background,
|
|
@@ -150,13 +150,13 @@ const FixedTimePage = (props: { theme?: ThemeType }) => {
|
|
|
150
150
|
color: props.theme?.global.fontColor,
|
|
151
151
|
fontSize: cx(16),
|
|
152
152
|
fontWeight: 'bold',
|
|
153
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
153
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
154
154
|
},
|
|
155
155
|
switchBtn: {},
|
|
156
156
|
loopText: {
|
|
157
157
|
color: props.theme?.global.fontColor,
|
|
158
158
|
fontSize: cx(14),
|
|
159
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
159
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
160
160
|
},
|
|
161
161
|
categoryList: {
|
|
162
162
|
display: 'flex',
|
|
@@ -179,7 +179,7 @@ const FixedTimePage = (props: { theme?: ThemeType }) => {
|
|
|
179
179
|
tagTitle: {
|
|
180
180
|
fontSize: cx(10),
|
|
181
181
|
textAlign: 'center',
|
|
182
|
-
fontFamily: 'PingFangSC-Medium',
|
|
182
|
+
// fontFamily: 'PingFangSC-Medium',
|
|
183
183
|
color: props.theme?.tag.fontColor,
|
|
184
184
|
},
|
|
185
185
|
})
|
|
@@ -158,7 +158,7 @@ const DynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
158
158
|
light: {
|
|
159
159
|
color: props.theme?.global.fontColor,
|
|
160
160
|
fontSize: cx(18),
|
|
161
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
161
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
162
162
|
},
|
|
163
163
|
transitionMode: {
|
|
164
164
|
marginHorizontal: cx(16),
|
|
@@ -224,7 +224,7 @@ const DynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
224
224
|
deleteBtnText: {
|
|
225
225
|
color: props.theme?.button.fontColor,
|
|
226
226
|
fontSize: cx(16),
|
|
227
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
227
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
228
228
|
},
|
|
229
229
|
})
|
|
230
230
|
|
|
@@ -170,7 +170,7 @@ const MixDynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
170
170
|
light: {
|
|
171
171
|
color: props.theme?.global.fontColor,
|
|
172
172
|
fontSize: cx(18),
|
|
173
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
173
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
174
174
|
},
|
|
175
175
|
transitionMode: {
|
|
176
176
|
marginHorizontal: cx(16),
|
|
@@ -236,7 +236,7 @@ const MixDynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
236
236
|
deleteBtnText: {
|
|
237
237
|
color: props.theme?.button.fontColor,
|
|
238
238
|
fontSize: cx(16),
|
|
239
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
239
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
240
240
|
},
|
|
241
241
|
})
|
|
242
242
|
|
|
@@ -57,7 +57,7 @@ const MoodItem = (props: MoodItemProps) => {
|
|
|
57
57
|
flex: 1,
|
|
58
58
|
color: props.theme?.global.fontColor,
|
|
59
59
|
fontSize: cx(16),
|
|
60
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
60
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
61
61
|
lineHeight: cx(20),
|
|
62
62
|
},
|
|
63
63
|
checkbox: {
|
|
@@ -80,7 +80,7 @@ const MoodItem = (props: MoodItemProps) => {
|
|
|
80
80
|
color: props.theme?.tag.fontColor,
|
|
81
81
|
fontSize: cx(10),
|
|
82
82
|
textAlignVertical: 'center',
|
|
83
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
83
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
84
84
|
lineHeight: cx(16),
|
|
85
85
|
},
|
|
86
86
|
})
|
|
@@ -49,7 +49,7 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
|
|
|
49
49
|
title: {
|
|
50
50
|
color: props.theme?.global.fontColor,
|
|
51
51
|
fontSize: cx(16),
|
|
52
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
52
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
53
53
|
},
|
|
54
54
|
lineStyle: {
|
|
55
55
|
alignItems: 'center',
|
|
@@ -149,7 +149,7 @@ const StaticMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
149
149
|
deleteBtnText: {
|
|
150
150
|
color: props.theme?.button.fontColor,
|
|
151
151
|
fontSize: cx(16),
|
|
152
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
152
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
153
153
|
},
|
|
154
154
|
})
|
|
155
155
|
|
|
@@ -36,7 +36,7 @@ const OverchargeSwitchPage = (props: { theme?: ThemeType }) => {
|
|
|
36
36
|
color: props.theme?.global.fontColor,
|
|
37
37
|
fontSize: cx(16),
|
|
38
38
|
fontWeight: 'bold',
|
|
39
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
39
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
40
40
|
paddingTop: cx(16),
|
|
41
41
|
paddingHorizontal: cx(16),
|
|
42
42
|
},
|
|
@@ -55,7 +55,7 @@ const LightBehaviorPage = (props: { theme?: ThemeType }) => {
|
|
|
55
55
|
marginHorizontal: cx(24),
|
|
56
56
|
color: props.theme?.global.fontColor,
|
|
57
57
|
fontSize: cx(14),
|
|
58
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
58
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
59
59
|
},
|
|
60
60
|
modeSelectGroup: {
|
|
61
61
|
marginHorizontal: cx(24),
|
|
@@ -210,7 +210,7 @@ const LightBehaviorPage = (props: { theme?: ThemeType }) => {
|
|
|
210
210
|
marginHorizontal: cx(8),
|
|
211
211
|
color: props.theme?.global.fontColor,
|
|
212
212
|
fontSize: cx(12),
|
|
213
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
213
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
214
214
|
}}>
|
|
215
215
|
{I18n.getLang('groups_settings_power_on_behavior_disturbbox_note')}
|
|
216
216
|
</Text>
|
|
@@ -73,7 +73,7 @@ const RandomTimeDetailPage = (props: { theme?: ThemeType }) => {
|
|
|
73
73
|
color: props.theme?.global.fontColor,
|
|
74
74
|
fontSize: cx(16),
|
|
75
75
|
fontWeight: 'bold',
|
|
76
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
76
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
77
77
|
},
|
|
78
78
|
applyContent: {
|
|
79
79
|
backgroundColor: props.theme?.container.background,
|
|
@@ -152,13 +152,13 @@ const RandomTimePage = (props: { theme?: ThemeType }) => {
|
|
|
152
152
|
color: props.theme?.global.fontColor,
|
|
153
153
|
fontSize: cx(16),
|
|
154
154
|
fontWeight: 'bold',
|
|
155
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
155
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
156
156
|
},
|
|
157
157
|
switchBtn: {},
|
|
158
158
|
loopText: {
|
|
159
159
|
color: props.theme?.global.fontColor,
|
|
160
160
|
fontSize: cx(14),
|
|
161
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
161
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
162
162
|
},
|
|
163
163
|
categoryList: {
|
|
164
164
|
display: 'flex',
|
|
@@ -181,7 +181,7 @@ const RandomTimePage = (props: { theme?: ThemeType }) => {
|
|
|
181
181
|
tagTitle: {
|
|
182
182
|
fontSize: cx(10),
|
|
183
183
|
textAlign: 'center',
|
|
184
|
-
fontFamily: 'PingFangSC-Medium',
|
|
184
|
+
// fontFamily: 'PingFangSC-Medium',
|
|
185
185
|
color: props.theme?.tag.fontColor
|
|
186
186
|
},
|
|
187
187
|
})
|
|
@@ -47,7 +47,7 @@ const SelectPage = (props: { theme?: ThemeType }) => {
|
|
|
47
47
|
marginStart: cx(16),
|
|
48
48
|
color: props.theme?.button.cancel,
|
|
49
49
|
fontSize: cx(17),
|
|
50
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
50
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
51
51
|
},
|
|
52
52
|
title: {
|
|
53
53
|
width: '100%',
|
|
@@ -57,7 +57,7 @@ const SelectPage = (props: { theme?: ThemeType }) => {
|
|
|
57
57
|
color: props.theme?.global.fontColor,
|
|
58
58
|
fontSize: cx(17),
|
|
59
59
|
paddingHorizontal: cx(110),
|
|
60
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
60
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
61
61
|
},
|
|
62
62
|
card: {
|
|
63
63
|
backgroundColor: props.theme?.card.background,
|
|
@@ -73,7 +73,7 @@ const SelectPage = (props: { theme?: ThemeType }) => {
|
|
|
73
73
|
marginStart: cx(13),
|
|
74
74
|
color: props.theme?.global.fontColor,
|
|
75
75
|
fontSize: cx(17),
|
|
76
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
76
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
77
77
|
},
|
|
78
78
|
itemLine: {
|
|
79
79
|
height: cx(1),
|
|
@@ -210,7 +210,7 @@ const SleepWakeUpDetailPage = (props: { theme?: ThemeType }) => {
|
|
|
210
210
|
color: props.theme?.global.fontColor,
|
|
211
211
|
fontSize: cx(16),
|
|
212
212
|
fontWeight: 'bold',
|
|
213
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
213
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
214
214
|
marginBottom: cx(10),
|
|
215
215
|
},
|
|
216
216
|
skillListItem: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo } from "react";
|
|
2
|
-
import { StyleSheet, View, Text, Image, FlatList } from 'react-native'
|
|
2
|
+
import { StyleSheet, View, Text, Image, FlatList, Platform } from 'react-native'
|
|
3
3
|
import Page from '@ledvance/base/src/components/Page'
|
|
4
4
|
import Tag from '@ledvance/base/src/components/Tag'
|
|
5
5
|
import Spacer from '@ledvance/base/src/components/Spacer'
|
|
@@ -256,8 +256,9 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
|
|
|
256
256
|
addMoodPopover: {
|
|
257
257
|
width: cx(210),
|
|
258
258
|
height: cx(90.5),
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
position: 'absolute',
|
|
260
|
+
right: cx(60),
|
|
261
|
+
top: Platform.OS === 'android' ? cx(90) : cx(130),
|
|
261
262
|
backgroundColor: props.theme?.card.background,
|
|
262
263
|
},
|
|
263
264
|
popoverItem: {
|
|
@@ -281,7 +282,7 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
|
|
|
281
282
|
fontSize: cx(12),
|
|
282
283
|
lineHeight: cx(20),
|
|
283
284
|
textAlign: 'center',
|
|
284
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
285
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
285
286
|
color: props.theme?.global.fontColor
|
|
286
287
|
},
|
|
287
288
|
emptyBtnView: {
|
|
@@ -316,13 +317,13 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
|
|
|
316
317
|
color: props.theme?.global.fontColor,
|
|
317
318
|
fontSize: cx(16),
|
|
318
319
|
fontWeight: 'bold',
|
|
319
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
320
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
320
321
|
},
|
|
321
322
|
switchBtn: {},
|
|
322
323
|
loopText: {
|
|
323
324
|
color: props.theme?.global.fontColor,
|
|
324
325
|
fontSize: cx(14),
|
|
325
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
326
|
+
// fontFamily: 'helvetica_neue_lt_std_roman',
|
|
326
327
|
height: cx(20)
|
|
327
328
|
},
|
|
328
329
|
tag: {
|
|
@@ -335,7 +336,7 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
|
|
|
335
336
|
tagTitle: {
|
|
336
337
|
fontSize: cx(10),
|
|
337
338
|
textAlign: 'center',
|
|
338
|
-
fontFamily: 'PingFangSC-Medium',
|
|
339
|
+
// fontFamily: 'PingFangSC-Medium',
|
|
339
340
|
color: props.theme?.tag.fontColor
|
|
340
341
|
},
|
|
341
342
|
})
|
|
@@ -271,7 +271,7 @@ const TimeScheduleDetailPage = (props: { theme?: ThemeType }) => {
|
|
|
271
271
|
color: props.theme?.global.fontColor,
|
|
272
272
|
fontSize: cx(16),
|
|
273
273
|
fontWeight: 'bold',
|
|
274
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
274
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
275
275
|
},
|
|
276
276
|
applyContent: {
|
|
277
277
|
backgroundColor: props.theme?.container.background,
|
|
@@ -114,6 +114,17 @@ const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
|
114
114
|
return {
|
|
115
115
|
success: true,
|
|
116
116
|
};
|
|
117
|
+
} else {
|
|
118
|
+
if (mode === 'add') {
|
|
119
|
+
const title = res.msg?.includes('LINKAGE_TIMER_OVER_MAX_LIMIT_30') ? I18n.getLang('repeater_schedule_error_limit') :I18n.getLang('repeater_schedule_error_common.add_fail')
|
|
120
|
+
showDialog({
|
|
121
|
+
method: 'alert',
|
|
122
|
+
title: title,
|
|
123
|
+
onConfirm: (_, { close }) => {
|
|
124
|
+
close()
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
}
|
|
117
128
|
}
|
|
118
129
|
return res;
|
|
119
130
|
};
|
|
@@ -207,44 +218,44 @@ const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
|
207
218
|
)}
|
|
208
219
|
{params.applyForList.length > 1 && !!state.originList.length && !(params.isCeilingLight || params.isMixLight) && showTags}
|
|
209
220
|
{state.timeScheduleList.length > 0 ? <FlatList
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
221
|
+
data={state.timeScheduleList}
|
|
222
|
+
renderItem={({ item }) => (
|
|
223
|
+
<ScheduleCard
|
|
224
|
+
item={item}
|
|
225
|
+
tags={params.applyForList}
|
|
226
|
+
showTag={params.applyForList.length > 1}
|
|
227
|
+
onEnableChange={async enable => {
|
|
228
|
+
state.loading = true;
|
|
229
|
+
await modDeleteTimeSchedule('update', {
|
|
230
|
+
...item,
|
|
231
|
+
enable,
|
|
232
|
+
});
|
|
233
|
+
state.loading = false;
|
|
234
|
+
}}
|
|
235
|
+
onPress={() => {
|
|
236
|
+
navigateToEdit('update', item);
|
|
237
|
+
}}
|
|
238
|
+
onLongPress={() =>{
|
|
239
|
+
showDialog({
|
|
240
|
+
method: 'confirm',
|
|
241
|
+
title: I18n.getLang('cancel_dialog_delete_item_timeschedule_titel'),
|
|
242
|
+
subTitle: I18n.getLang('cancel_dialog_delete_item_timeschedule_description'),
|
|
243
|
+
onConfirm: async (_, { close }) => {
|
|
244
|
+
state.loading = true;
|
|
245
|
+
close();
|
|
246
|
+
await modDeleteTimeSchedule('delete', item);
|
|
247
|
+
state.loading = false;
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
}}
|
|
251
|
+
/>
|
|
252
|
+
)}
|
|
253
|
+
keyExtractor={item => item.id.toString()}
|
|
254
|
+
ListEmptyComponent={<Spacer />}
|
|
255
|
+
ListHeaderComponent={() => <Spacer height={cx(10)} />}
|
|
256
|
+
ItemSeparatorComponent={() => <Spacer />}
|
|
257
|
+
ListFooterComponent={() => <Spacer height={cx(30)} />}
|
|
258
|
+
/> :
|
|
248
259
|
<View style={styles.emptyContainer}>
|
|
249
260
|
<Spacer height={cx(60)} />
|
|
250
261
|
<Image
|
|
@@ -47,19 +47,19 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
47
47
|
color: props.theme?.global.fontColor,
|
|
48
48
|
marginBottom: cx(5),
|
|
49
49
|
fontSize: 16,
|
|
50
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
50
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
51
51
|
fontWeight: 'bold',
|
|
52
52
|
},
|
|
53
53
|
loop: {
|
|
54
54
|
color: props.theme?.global.fontColor,
|
|
55
55
|
fontSize: cx(14),
|
|
56
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
56
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
57
57
|
marginTop: cx(8),
|
|
58
58
|
},
|
|
59
59
|
name: {
|
|
60
60
|
color: props.theme?.global.fontColor,
|
|
61
61
|
fontSize: cx(14),
|
|
62
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
62
|
+
// fontFamily: 'helvetica_neue_lt_std_bd',
|
|
63
63
|
marginTop: cx(8),
|
|
64
64
|
},
|
|
65
65
|
switchContainer: {
|
|
@@ -84,7 +84,7 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
84
84
|
tagTitle: {
|
|
85
85
|
fontSize: cx(10),
|
|
86
86
|
textAlign: 'center',
|
|
87
|
-
fontFamily: 'PingFangSC-Medium',
|
|
87
|
+
// fontFamily: 'PingFangSC-Medium',
|
|
88
88
|
color: '#000'
|
|
89
89
|
},
|
|
90
90
|
});
|