@ledvance/group-ui-biz-bundle 1.0.77 → 1.0.78

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.
@@ -13,23 +13,24 @@ import * as MusicManager from './MusicManager'
13
13
  import Spacer from '@ledvance/base/src/components/Spacer'
14
14
  import LdvSlider from '@ledvance/base/src/components/ldvSlider'
15
15
  import TextFieldStyleButton from '@ledvance/base/src/components/TextFieldStyleButton'
16
- import { SelectPageParams } from '@ledvance/group-ui-biz-bundle/src/modules/select/SelectPage'
16
+ import { SelectPageParams } from '../select/SelectPage'
17
17
  import { ui_biz_routerKey } from '../../navigation/Routers'
18
18
  import { cloneDeep } from 'lodash'
19
19
  import { useParams } from '@ledvance/base/src/hooks/Hooks'
20
20
  import { ColorParser } from '@ledvance/base/src/utils/ColorParser'
21
21
  import { WorkMode } from '@ledvance/base/src/utils/interface'
22
22
  const { convertX: cx } = Utils.RatioUtils
23
+ const { withTheme } = Utils.ThemeUtils
23
24
 
24
25
  export interface MusicPageParams {
25
- switchLedDp: string
26
- workModeDp: string
26
+ switchLedDp: string
27
+ workModeDp: string
27
28
  musicDataDp: string
28
29
  dreamMusicDp?: string
29
30
  isMixLight?: boolean
30
31
  }
31
32
 
32
- const MusicPage = () => {
33
+ const MusicPage = (props: { theme?: any }) => {
33
34
  const deviceInfo = useDeviceInfo()
34
35
  const tyGroupId = useUAGroupInfo().tyGroupId
35
36
  const params = useParams<MusicPageParams>()
@@ -43,7 +44,7 @@ const MusicPage = () => {
43
44
  useUpdateEffect(() =>{
44
45
  state.musicData = cloneDeep(musicData)
45
46
  }, [musicData])
46
-
47
+
47
48
  const openMusic = () =>{
48
49
  if(workMode !== WorkMode.Music) state.musicData.lastWorkMode = workMode
49
50
  state.musicData.musicSwitch = true
@@ -60,7 +61,7 @@ const MusicPage = () => {
60
61
  () => {},
61
62
  async (v) =>{
62
63
  const musicDpData = ColorParser.encodeControlData(
63
- v.mode,
64
+ v.mode,
64
65
  v.hue,
65
66
  v.saturation,
66
67
  v.value,
@@ -94,6 +95,25 @@ const MusicPage = () => {
94
95
  return [title, selectModeData]
95
96
  }
96
97
 
98
+ const styles = StyleSheet.create({
99
+ content: {
100
+ flex: 1,
101
+ marginHorizontal: cx(18)
102
+ },
103
+ headSwitch: {
104
+ position: 'absolute',
105
+ right: 0,
106
+ top: - cx(40),
107
+ zIndex: 2,
108
+ marginBottom: cx(24)
109
+ },
110
+ tiptext: {
111
+ color: props.theme.global.fontColor,
112
+ fontSize: cx(14),
113
+ lineHeight: cx(14),
114
+ }
115
+ })
116
+
97
117
  return (
98
118
  <Page
99
119
  backText={deviceInfo.name}
@@ -112,16 +132,17 @@ const MusicPage = () => {
112
132
  }
113
133
  }} />
114
134
  {params.dreamMusicDp && <TabBar
115
- type='radio'
116
- tabs={musicTabs}
117
- style={{ borderRadius: cx(8), backgroundColor: '#f6f6f6', height: cx(36) }}
118
- tabTextStyle={{ color: '#000', fontSize: cx(14) }}
119
- tabActiveTextStyle={{ color: '#000', fontSize: cx(14), fontWeight: 'bold' }}
120
- activeKey={state.musicData.musicType}
121
- onChange={async (v) => {
122
- state.musicData.musicType = Number(v)
123
- if(state.musicData.musicSwitch && workMode === WorkMode.Music) openMusic()
124
- }}
135
+ type='radio'
136
+ tabs={musicTabs}
137
+ style={{ borderRadius: cx(8), backgroundColor: props.theme.segment.background, height: cx(36) }}
138
+ tabTextStyle={{ color: props.theme.segment.fontColor, fontSize: cx(14) }}
139
+ tabActiveTextStyle={{ color: props.theme.segment.fontColor, fontSize: cx(14), fontWeight: 'bold' }}
140
+ activeColor={props.theme.segment.active}
141
+ activeKey={state.musicData.musicType}
142
+ onChange={async (v) => {
143
+ state.musicData.musicType = Number(v)
144
+ if(state.musicData.musicSwitch && workMode === WorkMode.Music) openMusic()
145
+ }}
125
146
  />}
126
147
  <Spacer />
127
148
  <Text style={styles.tiptext}>{I18n.getLang(state.musicData.musicType === 0 ? 'devicemusic_devicemic_description_text' : 'devicemusic_description_text')}</Text>
@@ -134,71 +155,52 @@ const MusicPage = () => {
134
155
  </View>
135
156
  {
136
157
  state.musicData.musicSwitch && workMode === WorkMode.Music &&
137
- <>
138
- {params.dreamMusicDp && state.musicData.musicType === 0 &&
139
- <LdvSlider
140
- title={I18n.getLang('devicemusic_switch_tab_device_sensitivity')}
141
- value={state.musicData.deviceMusicData[state.musicData.deviceGenreMode]?.sensitivity || 50}
142
- min={1}
143
- max={100}
144
- onValueChange={() => { }}
145
- onSlidingComplete={(v: number) => {
146
- state.musicData.deviceMusicData = state.musicData.deviceMusicData.map(m => {
147
- if(m.id === state.musicData.deviceGenreMode){
148
- return {
149
- ...m,
150
- sensitivity: v
158
+ <>
159
+ {params.dreamMusicDp && state.musicData.musicType === 0 &&
160
+ <LdvSlider
161
+ title={I18n.getLang('devicemusic_switch_tab_device_sensitivity')}
162
+ value={state.musicData.deviceMusicData[state.musicData.deviceGenreMode]?.sensitivity || 50}
163
+ min={1}
164
+ max={100}
165
+ onValueChange={() => { }}
166
+ onSlidingComplete={(v: number) => {
167
+ state.musicData.deviceMusicData = state.musicData.deviceMusicData.map(m => {
168
+ if(m.id === state.musicData.deviceGenreMode){
169
+ return {
170
+ ...m,
171
+ sensitivity: v
172
+ }
173
+ }
174
+ return m
175
+ })
176
+ openMusic()
177
+ }}
178
+ subTitleStr={''} />
179
+ }
180
+ <TextFieldStyleButton
181
+ text={getSelectModeData()[0] || I18n.getLang('devicemusic_music_text')}
182
+ placeholder={I18n.getLang('devicemusic_subheadline_text')}
183
+ onPress={() => {
184
+ const paramsSelect: SelectPageParams<number> = {
185
+ title: I18n.getLang('devicemusic_subheadline_text'),
186
+ data: getSelectModeData()[1],
187
+ onSelect: selectPageData => {
188
+ if (params.dreamMusicDp && state.musicData.musicType === 0) {
189
+ state.musicData.deviceGenreMode = selectPageData.value
190
+ } else {
191
+ state.musicData.phoneGenreMode = selectPageData.value
192
+ }
193
+ openMusic()
194
+ },
151
195
  }
152
- }
153
- return m
154
- })
155
- openMusic()
156
- }}
157
- subTitleStr={''} />
158
- }
159
- <TextFieldStyleButton
160
- text={getSelectModeData()[0] || I18n.getLang('devicemusic_music_text')}
161
- placeholder={I18n.getLang('devicemusic_subheadline_text')}
162
- onPress={() => {
163
- const paramsSelect: SelectPageParams<number> = {
164
- title: I18n.getLang('devicemusic_subheadline_text'),
165
- data: getSelectModeData()[1],
166
- onSelect: selectPageData => {
167
- if (params.dreamMusicDp && state.musicData.musicType === 0) {
168
- state.musicData.deviceGenreMode = selectPageData.value
169
- } else {
170
- state.musicData.phoneGenreMode = selectPageData.value
171
- }
172
- openMusic()
173
- },
174
- }
175
- navigation.navigate(ui_biz_routerKey.group_ui_biz_select_page, paramsSelect)
176
- }}
177
- />
178
- </>
196
+ navigation.navigate(ui_biz_routerKey.group_ui_biz_select_page, paramsSelect)
197
+ }}
198
+ />
199
+ </>
179
200
  }
180
201
  </View>
181
202
  </Page>
182
203
  )
183
204
  }
184
205
 
185
- const styles = StyleSheet.create({
186
- content: {
187
- flex: 1,
188
- marginHorizontal: cx(18)
189
- },
190
- headSwitch: {
191
- position: 'absolute',
192
- right: 0,
193
- top: - cx(40),
194
- zIndex: 2,
195
- marginBottom: cx(24)
196
- },
197
- tiptext: {
198
- color: '#000',
199
- fontSize: cx(14),
200
- lineHeight: cx(14),
201
- }
202
- })
203
-
204
- export default MusicPage
206
+ export default withTheme(MusicPage)
@@ -7,9 +7,11 @@ import {getIsClosed, loopText} from "@ledvance/base/src/utils/common";
7
7
  import {parseHour12} from "@tuya/tuya-panel-lamp-sdk/lib/utils";
8
8
 
9
9
  const {convertX: cx} = Utils.RatioUtils
10
+ const { withTheme } = Utils.ThemeUtils
10
11
  const {parseTimer} = Utils.TimeUtils
11
12
 
12
13
  export interface ItemCardProps<T> {
14
+ theme?: any
13
15
  item: T & {
14
16
  power: boolean
15
17
  startTime: number
@@ -25,8 +27,33 @@ export interface ItemCardProps<T> {
25
27
 
26
28
  const ItemCard = <T, >(props: ItemCardProps<T>) => {
27
29
  const {item, is24Hour, onSwitch, onPress} = props
28
- // 判断是否关闭
30
+ // 判断是否关闭
29
31
  const closed = getIsClosed(item)
32
+
33
+ const styles = StyleSheet.create({
34
+ itemCard: {
35
+ marginHorizontal: cx(24),
36
+ paddingHorizontal: cx(16),
37
+ },
38
+ switchLine: {
39
+ flexDirection: 'row',
40
+ alignItems: 'center',
41
+ },
42
+ time: {
43
+ flex: 1,
44
+ color: props.theme.global.fontColor,
45
+ fontSize: cx(16),
46
+ fontWeight: 'bold',
47
+ fontFamily: 'helvetica_neue_lt_std_bd',
48
+ },
49
+ switchBtn: {},
50
+ loopText: {
51
+ color: props.theme.global.fontColor,
52
+ fontSize: cx(14),
53
+ fontFamily: 'helvetica_neue_lt_std_roman',
54
+ },
55
+ })
56
+
30
57
  return (
31
58
  <Card style={styles.itemCard} onPress={onPress}>
32
59
  <Spacer height={cx(16)}/>
@@ -52,28 +79,4 @@ const ItemCard = <T, >(props: ItemCardProps<T>) => {
52
79
  )
53
80
  }
54
81
 
55
- const styles = StyleSheet.create({
56
- itemCard: {
57
- marginHorizontal: cx(24),
58
- paddingHorizontal: cx(16),
59
- },
60
- switchLine: {
61
- flexDirection: 'row',
62
- alignItems: 'center',
63
- },
64
- time: {
65
- flex: 1,
66
- color: '#000',
67
- fontSize: cx(16),
68
- fontWeight: 'bold',
69
- fontFamily: 'helvetica_neue_lt_std_bd',
70
- },
71
- switchBtn: {},
72
- loopText: {
73
- color: '#000',
74
- fontSize: cx(14),
75
- fontFamily: 'helvetica_neue_lt_std_roman',
76
- },
77
- })
78
-
79
- export default ItemCard
82
+ export default withTheme(ItemCard)
@@ -23,6 +23,7 @@ import {parseHour12} from "@tuya/tuya-panel-lamp-sdk/lib/utils";
23
23
 
24
24
  const {parseTimer} = Utils.TimeUtils
25
25
  const {convertX: cx} = Utils.RatioUtils;
26
+ const { withTheme } = Utils.ThemeUtils
26
27
 
27
28
  interface RandomTimeDetailParam extends RandomTimingParam {
28
29
  mode: 'add' | 'edit',
@@ -49,7 +50,7 @@ const newRandomTimingItem = (): RandomTimingItem => {
49
50
  }
50
51
  }
51
52
 
52
- const RandomTimingForLightDetailPage = () => {
53
+ const RandomTimingForLightDetailPage = (props: { theme?: any }) => {
53
54
  const navigation = useNavigation()
54
55
  const params = useRoute().params as RandomTimeDetailParam
55
56
  const initItem = newRandomTimingItem();
@@ -125,6 +126,36 @@ const RandomTimingForLightDetailPage = () => {
125
126
  }
126
127
  })
127
128
  }
129
+
130
+ const styles = StyleSheet.create({
131
+ cardContainer: {
132
+ marginHorizontal: cx(24)
133
+ },
134
+ itemTitle: {
135
+ color: props.theme.global.fontColor,
136
+ fontSize: cx(16),
137
+ fontWeight: 'bold',
138
+ fontFamily: 'helvetica_neue_lt_std_bd',
139
+ },
140
+ applyContent: {
141
+ backgroundColor: props.theme.container.background,
142
+ borderRadius: 4,
143
+ minHeight: cx(55),
144
+ flex: 1,
145
+ justifyContent: 'center',
146
+ paddingHorizontal: cx(10),
147
+ paddingTop: cx(10)
148
+ },
149
+ applyItem: {
150
+ paddingLeft: cx(5),
151
+ flexDirection: 'row',
152
+ justifyContent: 'space-between',
153
+ alignItems: 'center',
154
+ backgroundColor: props.theme.global.background,
155
+ height: cx(35),
156
+ },
157
+ })
158
+
128
159
  return (
129
160
  <Page
130
161
  backText={I18n.getLang('randomtimecycle_sockets_headline_text')}
@@ -154,7 +185,8 @@ const RandomTimingForLightDetailPage = () => {
154
185
  {/* pick */}
155
186
  <TimerPicker
156
187
  itemTextColor='#aeadb5'
157
- style={{paddingVertical: cx(0), marginVertical: cx(0)}}
188
+ style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme.global.background }}
189
+ pickerFontColor={props.theme.global.fontColor}
158
190
  is12Hours={!params.is24Hour}
159
191
  startTime={state.item.startTime}
160
192
  endTime={state.item.endTime}
@@ -170,7 +202,9 @@ const RandomTimingForLightDetailPage = () => {
170
202
  state.item.weeks[rawIndex] = state.item.weeks[rawIndex] === 1 ? 0 : 1
171
203
  }}/>
172
204
  <Spacer/>
173
- <Text style={styles.cardContainer}>{loopText(state.item.weeks, parseTimer(state.item.endTime * 60))}</Text>
205
+ <Text style={{ ...styles.cardContainer, color: props.theme.global.fontColor, fontSize: cx(14) }}>
206
+ {loopText(state.item.weeks, parseTimer(state.item.endTime * 60))}
207
+ </Text>
174
208
  <Spacer/>
175
209
  {/*Apply for */}
176
210
  <View style={styles.cardContainer}>
@@ -178,15 +212,17 @@ const RandomTimingForLightDetailPage = () => {
178
212
  <Spacer height={cx(10)}/>
179
213
  <View style={styles.applyContent}>
180
214
  {state.item.channel === undefined ?
181
- <Text>{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}</Text> :
215
+ <Text style={{color: props.theme.global.fontColor}}>
216
+ {I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}
217
+ </Text> :
182
218
  <View style={[styles.applyItem, {marginBottom: cx(10), borderRadius: 4}]}>
183
- <Text style={{color: '#000'}}>{params.channels[state.item.channel]}</Text>
219
+ <Text style={{color: props.theme.global.fontColor}}>{params.channels[state.item.channel]}</Text>
184
220
  {params.channels.length > 1 && <TouchableOpacity
185
221
  onPress={() => {
186
222
  state.item.channel = undefined
187
223
  }}
188
224
  style={{paddingHorizontal: cx(5)}}>
189
- <Image style={{width: cx(16), height: cx(16)}} source={res.ic_arrows_nav_clear}/>
225
+ <Image style={{width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor}} source={res.ic_arrows_nav_clear}/>
190
226
  </TouchableOpacity>}
191
227
  </View>
192
228
  }
@@ -203,8 +239,8 @@ const RandomTimingForLightDetailPage = () => {
203
239
  state.item.channel = index
204
240
  }}
205
241
  >
206
- <Text style={{color: '#000'}}>{item}</Text>
207
- <Image style={{width: cx(16), height: cx(16)}} source={res.device_panel_timer_add}/>
242
+ <Text style={{color: props.theme.global.fontColor}}>{item}</Text>
243
+ <Image style={{width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor}} source={res.device_panel_timer_add}/>
208
244
  </TouchableOpacity>
209
245
  )
210
246
  })}
@@ -217,7 +253,7 @@ const RandomTimingForLightDetailPage = () => {
217
253
  <Card>
218
254
  <LdvSwitch
219
255
  title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
220
- color={'#fff'}
256
+ color={props.theme.card.background}
221
257
  colorAlpha={1}
222
258
  enable={true}
223
259
  setEnable={() => { }}
@@ -283,75 +319,4 @@ const RandomTimingForLightDetailPage = () => {
283
319
  )
284
320
  }
285
321
 
286
- const styles = StyleSheet.create({
287
- cardContainer: {
288
- marginHorizontal: cx(24)
289
- },
290
- itemTitle: {
291
- color: '#000',
292
- fontSize: cx(16),
293
- fontWeight: 'bold',
294
- fontFamily: 'helvetica_neue_lt_std_bd',
295
- },
296
- applyContent: {
297
- backgroundColor: '#f6f6f6',
298
- borderRadius: 4,
299
- minHeight: cx(55),
300
- flex: 1,
301
- justifyContent: 'center',
302
- paddingHorizontal: cx(10),
303
- paddingTop: cx(10)
304
- },
305
- applyItem: {
306
- paddingLeft: cx(5),
307
- flexDirection: 'row',
308
- justifyContent: 'space-between',
309
- alignItems: 'center',
310
- backgroundColor: '#fff',
311
- height: cx(35),
312
- },
313
- summaryContainer: {
314
- flexDirection: 'row',
315
- justifyContent: 'flex-start',
316
- marginBottom: cx(10)
317
- },
318
- summaryLeft: {
319
- flexDirection: 'row',
320
- justifyContent: 'flex-start',
321
- alignItems: 'center',
322
- },
323
- summaryImg: {
324
- width: cx(12),
325
- height: cx(12),
326
- marginRight: cx(6)
327
- },
328
- leftTitle: {
329
- fontSize: cx(14),
330
- color: '#000'
331
- },
332
- summaryRight: {
333
- flexDirection: 'column',
334
- marginLeft: cx(21),
335
- borderRadius: cx(16),
336
- backgroundColor: '#cbcbcb',
337
- },
338
- rightItem: {
339
- paddingHorizontal: cx(12),
340
- color: '#000',
341
- },
342
- rightTitle: {
343
- paddingLeft: cx(12),
344
- paddingRight: cx(12),
345
- fontSize: cx(10),
346
- textAlign: 'center',
347
- alignSelf: 'flex-start'
348
- },
349
- filletCorner: {
350
- flexDirection: 'row',
351
- backgroundColor: '#cbcbcb',
352
- borderRadius: cx(16),
353
- alignSelf: 'flex-start'
354
- }
355
- })
356
-
357
- export default RandomTimingForLightDetailPage
322
+ export default withTheme(RandomTimingForLightDetailPage)
@@ -12,11 +12,13 @@ import {RandomTimingItem, RandomTimingParam, useRandomTiming} from "./RandomTimi
12
12
  import Spacer from "@ledvance/base/src/components/Spacer";
13
13
  import ItemCard from "./ItemCard";
14
14
  import {cloneDeep} from "lodash";
15
+ import InfoText from "@ledvance/base/src/components/InfoText";
15
16
 
16
17
  const {convertX: cx, topBarHeight} = Utils.RatioUtils;
18
+ const { withTheme } = Utils.ThemeUtils
17
19
  const MAX_NUM = 4
18
20
 
19
- const RandomTimeForLightPage = () => {
21
+ const RandomTimeForLightPage = (props: { theme?: any}) => {
20
22
  const devInfo = useDeviceInfo()
21
23
  const navigation = useNavigation()
22
24
  const params = useRoute().params as RandomTimingParam
@@ -58,17 +60,59 @@ const RandomTimeForLightPage = () => {
58
60
  }
59
61
  }, [randomTimingList])
60
62
 
63
+ const styles = StyleSheet.create({
64
+ bg: {
65
+ marginTop: topBarHeight,
66
+ flex: 1,
67
+ },
68
+ emptyListCon: {
69
+ justifyContent: 'center',
70
+ alignItems: 'center',
71
+ marginTop: cx(30),
72
+ },
73
+ emptyImage: {
74
+ width: cx(225),
75
+ height: cx(198)
76
+ },
77
+ emptyNoTime: {
78
+ fontSize: cx(12),
79
+ color: props.theme.global.fontColor,
80
+ },
81
+ maxImg: {
82
+ width: cx(16),
83
+ height: cx(16),
84
+ tintColor: props.theme.global.warning
85
+ },
86
+ maxTip: {
87
+ color: props.theme.global.secondFontColor,
88
+ },
89
+ addButton: {
90
+ height: cx(36),
91
+ width: cx(150),
92
+ marginVertical: cx(25),
93
+ marginHorizontal: cx(24),
94
+ borderRadius: cx(6),
95
+ backgroundColor: props.theme.button.primary,
96
+ },
97
+ addButtonText: {
98
+ fontSize: cx(12),
99
+ fontWeight: 'bold',
100
+ color: props.theme.button.fontColor,
101
+ textAlign: 'center'
102
+ }
103
+ })
104
+
61
105
  const renderList = () => {
62
106
  return (
63
107
  <ScrollView nestedScrollEnabled={true}>
64
108
  <Text style={{
65
- color: '#000',
109
+ color: props.theme.global.fontColor,
66
110
  marginLeft: cx(24),
67
111
  }}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
68
112
  <Spacer height={cx(10)}/>
69
113
  {isMaxNum && <View style={{marginHorizontal: cx(24), flexDirection: 'row'}}>
70
- <Image style={{width: cx(16), height: cx(16), tintColor: '#ff9500'}} source={res.ic_warning_amber}/>
71
- <Text>{I18n.getLang('fixedtimecycle_warning_max_number_text')}</Text>
114
+ <Image style={styles.maxImg} source={res.ic_warning_amber}/>
115
+ <Text style={styles.maxTip}>{I18n.getLang('fixedtimecycle_warning_max_number_text')}</Text>
72
116
  </View>}
73
117
  <FlatList
74
118
  data={randomTimingList}
@@ -103,30 +147,15 @@ const RandomTimeForLightPage = () => {
103
147
  style={styles.emptyImage}
104
148
  source={{uri: res.ldv_timer_empty}}
105
149
  resizeMode="contain"/>
150
+ <InfoText
151
+ style={{width: 'auto', alignItems: 'center'}}
152
+ icon={res.device_panel_schedule_alert}
153
+ text={I18n.getLang('randomtimecycle_empty_information_text')}
154
+ textStyle={{flex: undefined}}
155
+ contentColor={props.theme.global.secondFontColor}
156
+ />
106
157
  <View
107
- style={{
108
- marginHorizontal: cx(24),
109
- marginTop: cx(30),
110
- flexDirection: 'row',
111
- alignItems: 'center',
112
- }}
113
- >
114
- <Image
115
- source={{uri: res.device_panel_schedule_alert}}
116
- style={{width: cx(16), height: cx(16)}}
117
- />
118
- <Text style={styles.emptyNoTime}>{I18n.getLang('randomtimecycle_empty_information_text')}</Text>
119
- </View>
120
- <View
121
- style={{
122
- height: cx(36),
123
- width: cx(150),
124
- marginVertical: cx(25),
125
- marginHorizontal: cx(24),
126
- borderRadius: cx(6),
127
- backgroundColor: '#f60',
128
- }}
129
- >
158
+ style={styles.addButton}>
130
159
  <TouchableOpacity
131
160
  style={{
132
161
  flex: 1,
@@ -135,7 +164,7 @@ const RandomTimeForLightPage = () => {
135
164
  }}
136
165
  onPress={() => onAddOrEditItem('add')}
137
166
  >
138
- <Text style={{fontSize: cx(12), fontWeight: 'bold', color: '#fff', textAlign: 'center'}}>
167
+ <Text style={styles.addButtonText}>
139
168
  {I18n.getLang('randomtimecycle_empty_bttn_text')}
140
169
  </Text>
141
170
  </TouchableOpacity>
@@ -156,38 +185,4 @@ const RandomTimeForLightPage = () => {
156
185
  )
157
186
  }
158
187
 
159
- const styles = StyleSheet.create({
160
- bg: {
161
- marginTop: topBarHeight,
162
- flex: 1,
163
- },
164
- emptyListCon: {
165
- justifyContent: 'center',
166
- alignItems: 'center',
167
- marginTop: cx(30),
168
- },
169
- emptyImage: {
170
- width: cx(225),
171
- height: cx(198)
172
- },
173
- emptyNoTime: {
174
- fontSize: cx(12),
175
- color: '#000'
176
- },
177
- emptyTimeTip: {
178
- fontSize: cx(12),
179
- lineHeight: cx(17),
180
- marginTop: cx(6),
181
- width: '76%',
182
- textAlign: 'center'
183
- },
184
- listContainer: {
185
- bottom: cx(74)
186
- },
187
- categoryList: {
188
- marginHorizontal: cx(24),
189
- marginBottom: cx(12),
190
- },
191
- })
192
-
193
- export default RandomTimeForLightPage
188
+ export default withTheme(RandomTimeForLightPage)