@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.
Files changed (51) hide show
  1. package/package.json +1 -1
  2. package/src/modules/flags/FlagEditPage.tsx +2 -2
  3. package/src/modules/flags/FlagItem.tsx +1 -1
  4. package/src/modules/history/HistoryPage.tsx +4 -4
  5. package/src/modules/mood/DynamicMoodEditorPage.tsx +2 -2
  6. package/src/modules/mood/FantasyMoodEditPage.tsx +2 -2
  7. package/src/modules/mood/FantasyMoodItem.tsx +2 -2
  8. package/src/modules/mood/MixMood/MixMoodEditPage.tsx +2 -2
  9. package/src/modules/mood/MixMood/MixMoodItem.tsx +2 -2
  10. package/src/modules/mood/MixMood/RecommendMixMoodItem.tsx +1 -1
  11. package/src/modules/mood/MoodItem.tsx +2 -2
  12. package/src/modules/mood/RecommendMoodItem.tsx +1 -1
  13. package/src/modules/mood/StaticMoodEditorPage.tsx +2 -2
  14. package/src/modules/music/MusicPage.tsx +1 -1
  15. package/src/modules/music/SelecetGenre.tsx +2 -2
  16. package/src/modules/scene/SceneDetailPage.tsx +6 -6
  17. package/src/modules/scene/ScenePage.tsx +3 -3
  18. package/src/modules/select/SelectPage.tsx +3 -3
  19. package/src/modules/timeSchedule/LdvScheduleItem.tsx +3 -3
  20. package/src/modules/timeSchedule/TimeScheduleEditpage.tsx +3 -3
  21. package/src/modules/timer/TimerPage.tsx +1 -1
  22. package/src/newModules/biorhythm/BiorhythmEditPage.tsx +8 -2
  23. package/src/newModules/biorhythm/BiorhythmPage.tsx +5 -5
  24. package/src/newModules/biorhythm/IconSelect.tsx +80 -20
  25. package/src/newModules/childLock/ChildLockPage.tsx +1 -1
  26. package/src/newModules/diyScene/DiySceneEditorPage.tsx +1 -1
  27. package/src/newModules/energyConsumption/EnergyConsumptionActions.ts +2 -7
  28. package/src/newModules/energyConsumption/EnergyConsumptionChart/EnergyChartSection.tsx +14 -22
  29. package/src/newModules/energyConsumption/EnergyConsumptionChart/styles.ts +9 -4
  30. package/src/newModules/energyConsumption/EnergyConsumptionChart/useEnergyData.ts +3 -1
  31. package/src/newModules/energyConsumption/component/DateSwitch.tsx +26 -24
  32. package/src/newModules/energyConsumption/component/NewBarChart.tsx +1 -0
  33. package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +1 -1
  34. package/src/newModules/fixedTime/FixedTimePage.tsx +3 -3
  35. package/src/newModules/lightMode/LightModePage.tsx +1 -1
  36. package/src/newModules/mood/DynamicMoodEditorPage.tsx +2 -2
  37. package/src/newModules/mood/MixDynamicMoodEditor.tsx +2 -2
  38. package/src/newModules/mood/MoodItem.tsx +2 -2
  39. package/src/newModules/mood/RecommendMoodItem.tsx +1 -1
  40. package/src/newModules/mood/StaticMoodEditorPage.tsx +1 -1
  41. package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +1 -1
  42. package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +2 -2
  43. package/src/newModules/randomTime/RandomTimeDetailPage.tsx +1 -1
  44. package/src/newModules/randomTime/RandomTimePage.tsx +3 -3
  45. package/src/newModules/randomTime/Summary.tsx +1 -1
  46. package/src/newModules/select/SelectPage.tsx +3 -3
  47. package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +1 -1
  48. package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +4 -4
  49. package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +1 -1
  50. package/src/newModules/timeSchedule/TimeSchedulePage.tsx +49 -38
  51. package/src/newModules/timeSchedule/components/ScheduleCard.tsx +4 -4
@@ -61,13 +61,8 @@ export async function getElectricity(devId: string, addEleDpCode: string, date:
61
61
  return res
62
62
  }
63
63
 
64
- let dpResultByMonthCache: DpResultByMonthResData | undefined = undefined
65
64
  const getDpResultByYear = async (devId: string, addEleDpCode: string, dateStr: string): Promise<OverviewItem[]> => {
66
- let res: DpResultByMonthResData | undefined
67
- if (!dpResultByMonthCache) {
68
- dpResultByMonthCache = await getDpResultByMonth(devId, addEleDpCode, 'sum')
69
- }
70
- res = dpResultByMonthCache
65
+ const res = await getDpResultByMonth(devId, addEleDpCode, 'sum')
71
66
  if (!isEmpty(res)) {
72
67
  if (!isEmpty(res.years)) {
73
68
  const year = dateStr
@@ -75,7 +70,7 @@ const getDpResultByYear = async (devId: string, addEleDpCode: string, dateStr: s
75
70
  if (!curMonth) {
76
71
  return []
77
72
  }
78
- const curMonthList = Object.keys(curMonth).sort((a, b) => parseInt(b) - parseInt(a))
73
+ const curMonthList = Object.keys(curMonth).sort((a, b) => parseInt(a) - parseInt(b))
79
74
  return curMonthList.map(month => {
80
75
  return {
81
76
  key: `${monthFormat(month)} ${year}`,
@@ -3,7 +3,6 @@ import res from '@ledvance/base/src/res'
3
3
  import React, { useCallback } from 'react'
4
4
  import { Image, TouchableOpacity, View } from 'react-native'
5
5
  import { Utils } from 'tuya-panel-kit'
6
- import DateSelectedItem from '../component/DateSelectedItem'
7
6
  import DateSwitch from '../component/DateSwitch'
8
7
  import { DateType } from '../co2Data'
9
8
  import DateTypeItem from '../component/DateTypeItem'
@@ -33,30 +32,13 @@ export const EnergyChartSection = ({ isLandscape, state, actions, params, styles
33
32
 
34
33
  return (
35
34
  <>
36
- {!isLandscape && (
37
- <View style={styles.dateSwitchContainer}>
38
- <DateSwitch
39
- style={{ flex: 1 }}
40
- date={state.date}
41
- dateType={state.dateType}
42
- headlineText={state.headlineText}
43
- onDateChange={actions.setDate}
44
- />
45
- <TouchableOpacity style={{ width: cx(30) }} onPress={handleExportCsv}>
46
- <Image
47
- style={styles.downloadIcon}
48
- source={{ uri: !isDataEmpty ? res.download_icon : undefined }}
49
- />
50
- </TouchableOpacity>
51
- </View>
52
- )}
53
35
  <View style={styles.dateTypeContainer}>
54
36
  <DateTypeItem
55
- style={{ flex: 1, marginHorizontal: cx(5) }}
37
+ style={{ flex: 0.5 }}
56
38
  dateType={state.dateType}
57
39
  onDateTypeChange={actions.setDateType}
58
40
  />
59
- <DateSelectedItem
41
+ <DateSwitch
60
42
  style={{ flex: 1 }}
61
43
  dateType={state.dateType}
62
44
  date={state.date}
@@ -67,8 +49,18 @@ export const EnergyChartSection = ({ isLandscape, state, actions, params, styles
67
49
  {(state.loading || isDataEmpty) ? (
68
50
  <EmptyDataView text={getEmptyDataTip()} theme={theme} styles={styles}/>
69
51
  ) : (
70
- !state.loading &&
71
- <NewBarChart height={chartHeight} data={state.chartData} price={state.price} unit={params.unit}/>
52
+ !state.loading && <>
53
+ {!isLandscape && <View style={styles.downloadContainer}>
54
+ <TouchableOpacity
55
+ style={{ width: cx(30) }}
56
+ onPress={handleExportCsv}>
57
+ <Image
58
+ style={styles.downloadIcon}
59
+ source={{ uri: res.download_icon }}/>
60
+ </TouchableOpacity>
61
+ </View>}
62
+ <NewBarChart height={chartHeight} data={state.chartData} price={state.price} unit={params.unit}/>
63
+ </>
72
64
  )}
73
65
  </>
74
66
  )
@@ -16,13 +16,17 @@ export const getStyles = (theme: ThemeType | undefined) => StyleSheet.create({
16
16
  listEmptyText: {
17
17
  flex: 0,
18
18
  },
19
+ downloadContainer: {
20
+ flexDirection: 'row',
21
+ justifyContent: 'flex-end',
22
+ // marginHorizontal: cx(24),
23
+ marginTop: cx(15),
24
+ marginBottom: cx(-15)
25
+ },
19
26
  downloadIcon: {
20
27
  width: cx(24),
21
28
  height: cx(24),
22
29
  tintColor: theme?.global.brand,
23
- position: 'absolute',
24
- right: 0,
25
- top: cx(10),
26
30
  },
27
31
  intervalContainer: {
28
32
  flexDirection: 'row',
@@ -79,7 +83,8 @@ export const getStyles = (theme: ThemeType | undefined) => StyleSheet.create({
79
83
  },
80
84
  dateTypeContainer: {
81
85
  flexDirection: 'row',
82
- marginBottom: cx(15),
86
+ marginTop: cx(15),
87
+ // marginBottom: cx(15),
83
88
  },
84
89
  scrollViewContent: {
85
90
  marginHorizontal: cx(24),
@@ -9,9 +9,11 @@ import { useCallback, useEffect } from 'react'
9
9
  import { ChartType, DateType } from '../co2Data'
10
10
  import { getElectricity, getPowerData, PowerDataItem } from '../EnergyConsumptionActions'
11
11
  import { EnergyConsumptionChartProps } from '../EnergyConsumptionChart'
12
+ import {useIsPad} from "@ledvance/base/src/models/modules/NativePropsSlice"
12
13
 
13
14
  export const useEnergyData = (params: EnergyConsumptionChartProps, devId: string) => {
14
15
  const isFocused = useIsFocused()
16
+ const isPad = useIsPad()
15
17
  const { addEleDpCode, powerDpCode, price, unit, date, over365Days, over7Days, chartData } = params
16
18
 
17
19
  const getDateType = useCallback((d: string) => {
@@ -26,7 +28,7 @@ export const useEnergyData = (params: EnergyConsumptionChartProps, devId: string
26
28
 
27
29
  const state = useReactive({
28
30
  loading: false,
29
- isSupportLandscape: OrientationService.isSupported(),
31
+ isSupportLandscape: OrientationService.isSupported() && !isPad,
30
32
  isLandscape: false,
31
33
  chartType: ChartType.kWh as ChartType,
32
34
  dateType: getDateType(date),
@@ -1,6 +1,7 @@
1
1
  import ThemeType from "@ledvance/base/src/config/themeType";
2
+ import DateSelectedItem from './DateSelectedItem'
2
3
  import React, {PropsWithChildren, useCallback, useEffect} from "react";
3
- import {Image, Text, TouchableOpacity, View, ViewProps} from "react-native";
4
+ import {Image, TouchableOpacity, View, ViewProps} from "react-native";
4
5
  import {Utils} from "tuya-panel-kit";
5
6
  import {useReactive} from "ahooks";
6
7
  import {DateType} from "../co2Data";
@@ -79,33 +80,34 @@ export default withTheme(function DateSwitch(props: DateSwitchProps) {
79
80
 
80
81
  return (<View style={[props.style, {flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}]}>
81
82
  <TouchableOpacity
82
- disabled={state.disableArrowLeft}
83
- onPress={() => {
84
- changeDate(false);
85
- }}>
83
+ disabled={state.disableArrowLeft}
84
+ onPress={() => {
85
+ changeDate(false);
86
+ }}>
86
87
  <Image
87
- source={{ uri: res.arrow_left}}
88
- style={{tintColor: state.disableArrowLeft ? theme?.global.disabledFontColor : theme?.global.brand}}
89
- height={cx(36)}
90
- width={cx(36)}/>
88
+ source={{ uri: res.arrow_left}}
89
+ style={{tintColor: state.disableArrowLeft ? theme?.global.disabledFontColor : theme?.global.brand}}
90
+ height={cx(36)}
91
+ width={cx(36)}/>
91
92
  </TouchableOpacity>
92
- <Text style={{
93
- fontSize: cx(24),
94
- minWidth: cx(200),
95
- textAlign: 'center',
96
- color: theme?.global.brand,
97
- // fontFamily: 'helvetica_neue_lt_std_roman',
98
- }}>{state.headlineText}</Text>
93
+ <DateSelectedItem
94
+ style={{flex: 1}}
95
+ dateType={state.dateType}
96
+ date={state.date}
97
+ onDateChange={date => {
98
+ props.onDateChange(date)
99
+ }}
100
+ />
99
101
  <TouchableOpacity
100
- disabled={state.disableArrowRight}
101
- onPress={() => {
102
- changeDate(true);
103
- }}>
102
+ disabled={state.disableArrowRight}
103
+ onPress={() => {
104
+ changeDate(true);
105
+ }}>
104
106
  <Image
105
- source={{ uri: res.arrow_right}}
106
- style={{tintColor: state.disableArrowRight ? theme?.global.disabledFontColor : theme?.global.brand}}
107
- height={cx(36)}
108
- width={cx(36)}/>
107
+ source={{ uri: res.arrow_right}}
108
+ style={{tintColor: state.disableArrowRight ? theme?.global.disabledFontColor : theme?.global.brand}}
109
+ height={cx(36)}
110
+ width={cx(36)}/>
109
111
  </TouchableOpacity>
110
112
  </View>)
111
113
  })
@@ -62,6 +62,7 @@ const BarChartWithTouch = (props: BarChartProps) => {
62
62
  legend: {
63
63
  show: true,
64
64
  data: ['kWh', unit],
65
+ top: '5%',
65
66
  textStyle: {
66
67
  color: theme?.global?.fontColor,
67
68
  }
@@ -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
  })
@@ -84,7 +84,7 @@ const LightModePage = (props: { theme?: ThemeType }) => {
84
84
  color: props.theme?.global.fontColor,
85
85
  fontSize: cx(14),
86
86
  fontWeight: 'bold',
87
- fontFamily: 'helvetica_neue_lt_std_bd',
87
+ // fontFamily: 'helvetica_neue_lt_std_bd',
88
88
  },
89
89
  })
90
90
 
@@ -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
  })
@@ -29,7 +29,7 @@ const Summary = (props: SummaryProps) => {
29
29
  color: props.theme?.global.fontColor,
30
30
  fontSize: cx(16),
31
31
  fontWeight: 'bold',
32
- fontFamily: 'helvetica_neue_lt_std_bd',
32
+ // fontFamily: 'helvetica_neue_lt_std_bd',
33
33
  },
34
34
  summaryContainer: {
35
35
  flex: 1,
@@ -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: {
@@ -281,7 +281,7 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
281
281
  fontSize: cx(12),
282
282
  lineHeight: cx(20),
283
283
  textAlign: 'center',
284
- fontFamily: 'helvetica_neue_lt_std_roman',
284
+ // fontFamily: 'helvetica_neue_lt_std_roman',
285
285
  color: props.theme?.global.fontColor
286
286
  },
287
287
  emptyBtnView: {
@@ -316,13 +316,13 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
316
316
  color: props.theme?.global.fontColor,
317
317
  fontSize: cx(16),
318
318
  fontWeight: 'bold',
319
- fontFamily: 'helvetica_neue_lt_std_bd',
319
+ // fontFamily: 'helvetica_neue_lt_std_bd',
320
320
  },
321
321
  switchBtn: {},
322
322
  loopText: {
323
323
  color: props.theme?.global.fontColor,
324
324
  fontSize: cx(14),
325
- fontFamily: 'helvetica_neue_lt_std_roman',
325
+ // fontFamily: 'helvetica_neue_lt_std_roman',
326
326
  height: cx(20)
327
327
  },
328
328
  tag: {
@@ -335,7 +335,7 @@ const SleepWakeUpPage = (props: { theme?: ThemeType }) => {
335
335
  tagTitle: {
336
336
  fontSize: cx(10),
337
337
  textAlign: 'center',
338
- fontFamily: 'PingFangSC-Medium',
338
+ // fontFamily: 'PingFangSC-Medium',
339
339
  color: props.theme?.tag.fontColor
340
340
  },
341
341
  })
@@ -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
- data={state.timeScheduleList}
211
- renderItem={({ item }) => (
212
- <ScheduleCard
213
- item={item}
214
- tags={params.applyForList}
215
- showTag={params.applyForList.length > 1}
216
- onEnableChange={async enable => {
217
- state.loading = true;
218
- await modDeleteTimeSchedule('update', {
219
- ...item,
220
- enable,
221
- });
222
- state.loading = false;
223
- }}
224
- onPress={() => {
225
- navigateToEdit('update', item);
226
- }}
227
- onLongPress={() =>{
228
- showDialog({
229
- method: 'confirm',
230
- title: I18n.getLang('cancel_dialog_delete_item_timeschedule_titel'),
231
- subTitle: I18n.getLang('cancel_dialog_delete_item_timeschedule_description'),
232
- onConfirm: async (_, { close }) => {
233
- state.loading = true;
234
- close();
235
- await modDeleteTimeSchedule('delete', item);
236
- state.loading = false;
237
- },
238
- });
239
- }}
240
- />
241
- )}
242
- keyExtractor={item => item.id.toString()}
243
- ListEmptyComponent={<Spacer />}
244
- ListHeaderComponent={() => <Spacer height={cx(10)} />}
245
- ItemSeparatorComponent={() => <Spacer />}
246
- ListFooterComponent={() => <Spacer height={cx(30)} />}
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
  });