@ledvance/ui-biz-bundle 1.1.90 → 1.1.91

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 (38) hide show
  1. package/package.json +1 -1
  2. package/src/modules/flags/FlagEditPage.tsx +180 -179
  3. package/src/modules/flags/FlagItem.tsx +26 -42
  4. package/src/modules/flags/FlagPage.tsx +27 -26
  5. package/src/modules/history/HistoryPage.tsx +111 -103
  6. package/src/modules/music/MusicPage.tsx +90 -88
  7. package/src/modules/timer/TimerPage.tsx +13 -9
  8. package/src/newModules/biorhythm/BiorhythmEditPage.tsx +54 -54
  9. package/src/newModules/biorhythm/BiorhythmPage.tsx +163 -162
  10. package/src/newModules/biorhythm/IconSelect.tsx +5 -4
  11. package/src/newModules/childLock/ChildLockPage.tsx +49 -47
  12. package/src/newModules/energyConsumption/component/EnergyModal.tsx +2 -2
  13. package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +127 -124
  14. package/src/newModules/fixedTime/FixedTimePage.tsx +108 -104
  15. package/src/newModules/lightMode/LightModePage.tsx +74 -67
  16. package/src/newModules/mood/AddMoodPage.tsx +18 -15
  17. package/src/newModules/mood/DynamicMoodEditorPage.tsx +103 -100
  18. package/src/newModules/mood/MixDynamicMoodEditor.tsx +107 -104
  19. package/src/newModules/mood/MoodItem.tsx +59 -55
  20. package/src/newModules/mood/MoodPage.tsx +58 -57
  21. package/src/newModules/mood/RecommendMoodItem.tsx +27 -24
  22. package/src/newModules/mood/StaticMoodEditorPage.tsx +77 -85
  23. package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +36 -48
  24. package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +137 -135
  25. package/src/newModules/powerOnBehavior/PlugBehaviorPage.tsx +67 -61
  26. package/src/newModules/randomTime/RandomTimeDetailPage.tsx +114 -151
  27. package/src/newModules/randomTime/RandomTimePage.tsx +110 -105
  28. package/src/newModules/randomTime/Summary.tsx +61 -57
  29. package/src/newModules/remoteControl/RemoteControlPage.tsx +4 -3
  30. package/src/newModules/select/SelectPage.tsx +65 -62
  31. package/src/newModules/sleepWakeUp/SleepWakeUpActions.ts +16 -8
  32. package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +131 -123
  33. package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +144 -140
  34. package/src/newModules/switchGradient/SwitchGradientPage.tsx +24 -25
  35. package/src/newModules/swithInching/SwithInching.tsx +154 -152
  36. package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +83 -83
  37. package/src/newModules/timeSchedule/components/ManuaSettings.tsx +3 -2
  38. package/src/newModules/swithInching/pickerView.tsx +0 -91
@@ -14,6 +14,7 @@ import { exportHistoryFile } from '@ledvance/base/src/utils/common'
14
14
  import { useParams } from '@ledvance/base/src/hooks/Hooks'
15
15
 
16
16
  const cx = Utils.RatioUtils.convertX
17
+ const { withTheme } = Utils.ThemeUtils
17
18
 
18
19
  export type SwitchHistoryPageRouteParams = {
19
20
  dpIds: string[],
@@ -24,7 +25,7 @@ export type SwitchHistoryPageRouteParams = {
24
25
  getActionsText: (dpData: any) => I18nKey
25
26
  }
26
27
 
27
- const SwitchHistoryPage = () => {
28
+ const SwitchHistoryPage = (props: { theme?: any }) => {
28
29
  const deviceInfo = useDeviceInfo()
29
30
  const { dpIds, tags, headlineText, backText, showLimit, getActionsText } = useParams<SwitchHistoryPageRouteParams>()
30
31
 
@@ -83,6 +84,86 @@ const SwitchHistoryPage = () => {
83
84
  exportHistoryFile(state.data)
84
85
  }
85
86
 
87
+ const styles = StyleSheet.create({
88
+ content: {
89
+ flex: 1,
90
+ },
91
+ list: {
92
+ flex: 1,
93
+ },
94
+ listEmptyView: {
95
+ alignItems: 'center',
96
+ },
97
+ listEmptyImage: {
98
+ width: cx(200),
99
+ height: cx(200),
100
+ },
101
+ listEmptyTextIcon: {
102
+ width: cx(16),
103
+ height: cx(16),
104
+ tintColor: props.theme.global.fontColor,
105
+ },
106
+ listEmptyText: {
107
+ color: props.theme.global.fontColor,
108
+ fontSize: cx(12),
109
+ fontFamily: 'helvetica_neue_lt_std_roman',
110
+ },
111
+ titleText: {
112
+ marginHorizontal: cx(24),
113
+ color: props.theme.global.fontColor,
114
+ fontSize: cx(16),
115
+ fontFamily: 'helvetica_neue_lt_std_roman',
116
+ },
117
+ switchHistoryItem: {
118
+ marginHorizontal: cx(24),
119
+ },
120
+ switchHistoryItemTitle: {
121
+ color: props.theme.global.fontColor,
122
+ fontSize: cx(18),
123
+ fontFamily: 'helvetica_neue_lt_std_bd',
124
+ },
125
+ switchHistoryItemActionItem: {
126
+ flexDirection: 'row',
127
+ alignItems: 'center',
128
+ flex: 1
129
+ },
130
+ switchHistoryItemActionItemLineGroup: {
131
+ width: cx(7),
132
+ minHeight: cx(30),
133
+ height: '100%',
134
+ alignItems: 'center',
135
+ },
136
+ switchHistoryItemActionItemLine: {
137
+ width: cx(1),
138
+ flex: 1,
139
+ backgroundColor: props.theme.container.divider,
140
+ },
141
+ switchHistoryItemActionItemPoint: {
142
+ width: cx(7),
143
+ height: cx(7),
144
+ backgroundColor: props.theme.icon.primary,
145
+ borderRadius: cx(4),
146
+ position: 'absolute',
147
+ top: '50%',
148
+ transform: [{ translateY: cx(-3) }]
149
+ },
150
+ switchHistoryItemActionItemText: {
151
+ color: props.theme.global.fontColor,
152
+ fontSize: cx(16),
153
+ fontFamily: 'helvetica_neue_lt_std_roman',
154
+ },
155
+ switchHistoryItemTag: {
156
+ paddingHorizontal: cx(10),
157
+ borderRadius: cx(10),
158
+ backgroundColor: props.theme.tag.background,
159
+ marginLeft: cx(5),
160
+ },
161
+ switchHistoryItemTagText: {
162
+ fontSize: cx(14),
163
+ color: props.theme.tag.fontColor
164
+ }
165
+ })
166
+
86
167
  return (
87
168
  <Page
88
169
  backText={backText || deviceInfo.name}
@@ -94,31 +175,31 @@ const SwitchHistoryPage = () => {
94
175
  <Text style={styles.titleText}>{I18n.getLang('history_contact_sensor_description_text')}</Text>
95
176
  <Spacer />
96
177
  {!isEmpty(state.filterTags) && !!state.data.length &&
97
- <View style={{
98
- display: 'flex',
99
- flexDirection: 'row',
100
- flexWrap: 'wrap',
101
- marginHorizontal: cx(24),
102
- marginBottom: cx(12),
103
- alignSelf: 'flex-start'
104
- }}>
105
- {
106
- Object.keys(state.filterTags)?.map((tag) => {
107
- return <Tag
108
- key={tag}
109
- text={tags && tags[tag]}
110
- checked={state.filterTags[tag]}
111
- onCheckedChange={(v) => changeFilter(v, tag)}
112
- style={{ marginTop: cx(5), marginHorizontal: cx(5) }}
113
- />
114
- })
115
- }
116
- </View>
178
+ <View style={{
179
+ display: 'flex',
180
+ flexDirection: 'row',
181
+ flexWrap: 'wrap',
182
+ marginHorizontal: cx(24),
183
+ marginBottom: cx(12),
184
+ alignSelf: 'flex-start'
185
+ }}>
186
+ {
187
+ Object.keys(state.filterTags)?.map((tag) => {
188
+ return <Tag
189
+ key={tag}
190
+ text={tags && tags[tag]}
191
+ checked={state.filterTags[tag]}
192
+ onCheckedChange={(v) => changeFilter(v, tag)}
193
+ style={{ marginTop: cx(5), marginHorizontal: cx(5) }}
194
+ />
195
+ })
196
+ }
197
+ </View>
117
198
  }
118
199
  <FlatList
119
200
  data={state.data}
120
201
  style={styles.list}
121
- renderItem={({ item }) => <SwitchHistoryItem {...{ itemData: item, tags }} />}
202
+ renderItem={({ item }) => <SwitchHistoryItem {...{ itemData: item, tags, styles }} />}
122
203
  keyExtractor={(_, index) => `${index}`}
123
204
  ListFooterComponent={<Spacer />}
124
205
  ListEmptyComponent={(
@@ -149,12 +230,13 @@ const SwitchHistoryPage = () => {
149
230
  }
150
231
 
151
232
  interface SwitchHistoryItemBean {
233
+ styles: StyleSheet.NamedStyles<any>
152
234
  itemData: SwitchHistoryUIItemData
153
235
  tags?: object
154
236
  }
155
237
 
156
238
  const SwitchHistoryItem = (props: SwitchHistoryItemBean) => {
157
- const { itemData, tags } = props
239
+ const { itemData, tags, styles } = props
158
240
  return (
159
241
  <View style={styles.switchHistoryItem}>
160
242
  <Text style={styles.switchHistoryItemTitle}>{itemData.title}</Text>
@@ -169,9 +251,11 @@ const SwitchHistoryItem = (props: SwitchHistoryItemBean) => {
169
251
  <Text style={styles.switchHistoryItemActionItemText}>{`${actionData.time}`}</Text>
170
252
  <Spacer width={cx(10)} height={0} />
171
253
  <View style={{ flex: 1, display: 'flex', flexDirection: 'row', flexWrap: 'wrap',alignItems: 'baseline'
172
- }}>
254
+ }}>
173
255
  <Text style={styles.switchHistoryItemActionItemText}>{`${actionData.action}`}</Text>
174
- {!!tags && <View style={styles.switchHistoryItemTag}><Text style={{ fontSize: cx(14), color: '#000' }}>{tags[actionData.dpId]}</Text></View>}
256
+ {!!tags && <View style={styles.switchHistoryItemTag}>
257
+ <Text style={styles.switchHistoryItemTagText}>{tags[actionData.dpId]}</Text>
258
+ </View>}
175
259
  </View>
176
260
  </View>
177
261
  ))}
@@ -180,83 +264,7 @@ const SwitchHistoryItem = (props: SwitchHistoryItemBean) => {
180
264
  )
181
265
  }
182
266
 
183
- const styles = StyleSheet.create({
184
- content: {
185
- flex: 1,
186
- },
187
- list: {
188
- flex: 1,
189
- },
190
- listEmptyView: {
191
- alignItems: 'center',
192
- },
193
- listEmptyImage: {
194
- width: cx(200),
195
- height: cx(200),
196
- },
197
- listEmptyTextIcon: {
198
- width: cx(16),
199
- height: cx(16),
200
- tintColor: '#000',
201
- },
202
- listEmptyText: {
203
- color: '#000',
204
- fontSize: cx(12),
205
- fontFamily: 'helvetica_neue_lt_std_roman',
206
- },
207
- titleText: {
208
- marginHorizontal: cx(24),
209
- color: '#000',
210
- fontSize: cx(16),
211
- fontFamily: 'helvetica_neue_lt_std_roman',
212
- },
213
- switchHistoryItem: {
214
- marginHorizontal: cx(24),
215
- },
216
- switchHistoryItemTitle: {
217
- color: '#000',
218
- fontSize: cx(18),
219
- fontFamily: 'helvetica_neue_lt_std_bd',
220
- },
221
- switchHistoryItemActionItem: {
222
- flexDirection: 'row',
223
- alignItems: 'center',
224
- flex: 1
225
- },
226
- switchHistoryItemActionItemLineGroup: {
227
- width: cx(7),
228
- minHeight: cx(30),
229
- height: '100%',
230
- alignItems: 'center',
231
- },
232
- switchHistoryItemActionItemLine: {
233
- width: cx(1),
234
- flex: 1,
235
- backgroundColor: '#E6E7E8',
236
- },
237
- switchHistoryItemActionItemPoint: {
238
- width: cx(7),
239
- height: cx(7),
240
- backgroundColor: '#f60',
241
- borderRadius: cx(4),
242
- position: 'absolute',
243
- top: '50%',
244
- transform: [{ translateY: cx(-3) }]
245
- },
246
- switchHistoryItemActionItemText: {
247
- color: '#000',
248
- fontSize: cx(16),
249
- fontFamily: 'helvetica_neue_lt_std_roman',
250
- },
251
- switchHistoryItemTag: {
252
- paddingHorizontal: cx(10),
253
- borderRadius: cx(10),
254
- backgroundColor: '#cbcbcb',
255
- marginLeft: cx(5),
256
- }
257
- })
258
-
259
- export default SwitchHistoryPage
267
+ export default withTheme(SwitchHistoryPage)
260
268
 
261
269
  type RefreshType = 'refresh' | 'loadMore'
262
270
 
@@ -269,4 +277,4 @@ interface SwitchHistoryPageState {
269
277
  hasNext: boolean
270
278
  dataOffset: number
271
279
  filterTags: object
272
- }
280
+ }
@@ -19,6 +19,7 @@ import { SelectPageParams } from '@ledvance/ui-biz-bundle/src/modules/select/Sel
19
19
  import { ui_biz_routerKey } from '@ledvance/ui-biz-bundle/src/navigation/Routers'
20
20
  import { cloneDeep } from 'lodash'
21
21
  const { convertX: cx } = Utils.RatioUtils
22
+ const { withTheme } = Utils.ThemeUtils
22
23
 
23
24
  export interface MusicPageRouterParams extends JudgeTimeScheduleProps {
24
25
  switch_led: string
@@ -29,21 +30,21 @@ export interface MusicPageRouterParams extends JudgeTimeScheduleProps {
29
30
  dreamMusicDp?: string
30
31
  }
31
32
 
32
- const MusicPage = () => {
33
+ const MusicPage = (props: { theme?: any }) => {
33
34
  const deviceInfo = useDeviceInfo()
34
35
  const deviceId = useDeviceId()
35
36
  const navigation = useNavigation()
36
- const props = useRoute().params as MusicPageRouterParams
37
- const [workMode, setWorkMode] = useWorkMode(props.work_mode)
38
- const [mixLight] = useMixRgbcw(props.mix_rgbcw, props.switch_led)
39
- const [, setMixScene] = useMixScene(props.mix_light_scene, props.work_mode)
40
- const [, setMusicData] = useMusicData(props.music_data)
41
- const [dreamMusic, setDreamMusic] = props.dreamMusicDp ? useDreamMusic(props.dreamMusicDp) : []
42
- const [switchLed, setSwitchLed] = useEnable(props.switch_led)
37
+ const params = useRoute().params as MusicPageRouterParams
38
+ const [workMode, setWorkMode] = useWorkMode(params.work_mode)
39
+ const [mixLight] = useMixRgbcw(params.mix_rgbcw, params.switch_led)
40
+ const [, setMixScene] = useMixScene(params.mix_light_scene, params.work_mode)
41
+ const [, setMusicData] = useMusicData(params.music_data)
42
+ const [dreamMusic, setDreamMusic] = params.dreamMusicDp ? useDreamMusic(params.dreamMusicDp) : []
43
+ const [switchLed, setSwitchLed] = useEnable(params.switch_led)
43
44
 
44
45
  const state = useReactive({
45
46
  musicEnable: false,
46
- musicType: props.dreamMusicDp ? 0 : 1, // 0 设备麦克风, 1 手机麦克风
47
+ musicType: params.dreamMusicDp ? 0 : 1, // 0 设备麦克风, 1 手机麦克风
47
48
  isColourExist: true,
48
49
  isTempExist: true,
49
50
  deviceGenreMode: dreamMusic ? dreamMusic.id : 0,
@@ -55,7 +56,7 @@ const MusicPage = () => {
55
56
  })
56
57
 
57
58
  useEffect(() => {
58
- if (props.dreamMusicDp) {
59
+ if (params.dreamMusicDp) {
59
60
  getRemoteDreamMusic(deviceId).then(res => {
60
61
  if (res.success) {
61
62
  state.musicModeData = res.data
@@ -67,7 +68,7 @@ const MusicPage = () => {
67
68
  useUpdateEffect(() => {
68
69
  // 设备麦克风
69
70
  if (!state.musicEnable) return
70
- if (props.dreamMusicDp && state.musicType === 0) {
71
+ if (params.dreamMusicDp && state.musicType === 0) {
71
72
  openMusic()
72
73
  } else {
73
74
  changeMusic(state.phoneGenreMode)
@@ -99,9 +100,9 @@ const MusicPage = () => {
99
100
  savePreWorkmode().then()
100
101
  }
101
102
  const extraDp = {}
102
- if (!switchLed) extraDp[props.switch_led] = true
103
- if (workMode !== 'music') extraDp[props.work_mode] = 'music'
104
- if (props.dreamMusicDp && state.musicType === 0) {
103
+ if (!switchLed) extraDp[params.switch_led] = true
104
+ if (workMode !== 'music') extraDp[params.work_mode] = 'music'
105
+ if (params.dreamMusicDp && state.musicType === 0) {
105
106
  setDreamMusic && setDreamMusic({
106
107
  ...state.currentMusic,
107
108
  power: true
@@ -118,14 +119,14 @@ const MusicPage = () => {
118
119
  { isColourExist: true, isTempExist: true }
119
120
  )
120
121
  }
121
- }, [state.musicType, state.phoneGenreMode, props.dreamMusicDp, state.currentMusic, switchLed, workMode])
122
+ }, [state.musicType, state.phoneGenreMode, params.dreamMusicDp, state.currentMusic, switchLed, workMode])
122
123
 
123
124
  const closeMusic = useCallback(async () => {
124
125
  await MusicManager.close()
125
126
  const res: any = await NativeApi.getJson(deviceId, 'musicPreWorkMode')
126
127
  const workMode = res?.data && JSON.parse(res?.data)?.workMode
127
128
  if (state.musicType === 1) {
128
- if (props.isMixRGBWLamp) {
129
+ if (params.isMixRGBWLamp) {
129
130
  const mixRes: any = await NativeApi.getJson(deviceId, 'musicPreMixLight')
130
131
  const getLight = mixRes?.data && JSON.parse(mixRes?.data)?.mixLight
131
132
  await setMixScene({
@@ -173,7 +174,7 @@ const MusicPage = () => {
173
174
 
174
175
  const savePreWorkmode = async () => {
175
176
  await NativeApi.putJson(deviceId, 'musicPreWorkMode', JSON.stringify({ workMode }));
176
- if (props.isMixRGBWLamp) {
177
+ if (params.isMixRGBWLamp) {
177
178
  await NativeApi.putJson(deviceId, 'musicPreMixLight', JSON.stringify({ mixLight }));
178
179
  }
179
180
  }
@@ -181,7 +182,7 @@ const MusicPage = () => {
181
182
  const getSelect = async () => {
182
183
  const res: any = await NativeApi.getJson(deviceId, 'musicSelect')
183
184
  const type = res?.data ? (JSON.parse(res?.data)?.type || 0) : 0
184
- state.musicType = res?.data ? JSON.parse(res?.data)?.musicType : props.dreamMusicDp ? 0 : 1
185
+ state.musicType = res?.data ? JSON.parse(res?.data)?.musicType : params.dreamMusicDp ? 0 : 1
185
186
  state.phoneGenreMode = musicDefalutDatasource[type]?.id
186
187
  state.musicEnable = workMode === 'music' && !!switchLed
187
188
  if (type !== '' && state.musicType === 1 && state.musicEnable) {
@@ -216,8 +217,8 @@ const MusicPage = () => {
216
217
  }, [])
217
218
 
218
219
  const getSelectModeData = useCallback((): [string | undefined, any[]] => {
219
- const genreModeData = props.dreamMusicDp && state.musicType === 0 ? state.musicModeData : musicDefalutDatasource
220
- const genreMode = props.dreamMusicDp && state.musicType === 0 ? state.deviceGenreMode : state.phoneGenreMode
220
+ const genreModeData = params.dreamMusicDp && state.musicType === 0 ? state.musicModeData : musicDefalutDatasource
221
+ const genreMode = params.dreamMusicDp && state.musicType === 0 ? state.deviceGenreMode : state.phoneGenreMode
221
222
  const title = genreModeData.find(mode => mode.id === genreMode)?.title
222
223
  const selectModeData = genreModeData.map(music => {
223
224
  return {
@@ -227,7 +228,26 @@ const MusicPage = () => {
227
228
  }
228
229
  })
229
230
  return [title, selectModeData]
230
- }, [state.deviceGenreMode, state.phoneGenreMode, state.musicModeData, state.musicType, props.dreamMusicDp])
231
+ }, [state.deviceGenreMode, state.phoneGenreMode, state.musicModeData, state.musicType, params.dreamMusicDp])
232
+
233
+ const styles = StyleSheet.create({
234
+ content: {
235
+ flex: 1,
236
+ marginHorizontal: cx(18)
237
+ },
238
+ headSwitch: {
239
+ position: 'absolute',
240
+ right: 0,
241
+ top: - cx(40),
242
+ zIndex: 2,
243
+ marginBottom: cx(24)
244
+ },
245
+ tiptext: {
246
+ color: props.theme.global.fontColor,
247
+ fontSize: cx(14),
248
+ lineHeight: cx(14),
249
+ }
250
+ })
231
251
 
232
252
  return (
233
253
  <Page
@@ -261,17 +281,18 @@ const MusicPage = () => {
261
281
  }
262
282
  }
263
283
  }} />
264
- {props.dreamMusicDp && <TabBar
265
- type='radio'
266
- tabs={musicTabs}
267
- style={{ borderRadius: cx(8), backgroundColor: '#f6f6f6', height: cx(36) }}
268
- tabTextStyle={{ color: '#000' }}
269
- tabActiveTextStyle={{ color: '#000', fontWeight: 'bold' }}
270
- activeKey={state.musicType}
271
- onChange={async (v) => {
272
- state.musicType = Number(v)
273
- await saveSelect(state.phoneGenreMode)
274
- }}
284
+ {params.dreamMusicDp && <TabBar
285
+ type='radio'
286
+ tabs={musicTabs}
287
+ style={{ borderRadius: cx(8), backgroundColor: props.theme.segment.background, height: cx(36) }}
288
+ tabTextStyle={{ color: props.theme.segment.fontColor, fontSize: cx(14) }}
289
+ tabActiveTextStyle={{ color: props.theme.segment.fontColor, fontSize: cx(14), fontWeight: 'bold' }}
290
+ activeColor={props.theme.segment.active}
291
+ activeKey={state.musicType}
292
+ onChange={async (v) => {
293
+ state.musicType = Number(v)
294
+ await saveSelect(state.phoneGenreMode)
295
+ }}
275
296
  />}
276
297
  <Spacer />
277
298
  <Text style={styles.tiptext}>{Strings.getLang(state.musicType === 0 ? 'devicemusic_devicemic_description_text' : 'devicemusic_description_text')}</Text>
@@ -284,65 +305,46 @@ const MusicPage = () => {
284
305
  </View>
285
306
  {
286
307
  state.musicEnable &&
287
- <>
288
- {props.dreamMusicDp && state.musicType === 0 &&
289
- <LdvSlider
290
- title={Strings.getLang('devicemusic_switch_tab_device_sensitivity')}
291
- value={state.currentMusic?.sensitivity || 50}
292
- min={1}
293
- max={100}
294
- onValueChange={() => { }}
295
- onSlidingComplete={(v: number) => {
296
- if (state.currentMusic) {
297
- state.currentMusic.sensitivity = v
298
- updateRemoteDreamMusic()
299
- }
300
- }}
301
- subTitleStr={''} />
302
- }
303
- <TextFieldStyleButton
304
- text={getSelectModeData()[0] || Strings.getLang('devicemusic_music_text')}
305
- placeholder={Strings.getLang('devicemusic_subheadline_text')}
306
- onPress={() => {
307
- const paramsSelect: SelectPageParams<number> = {
308
- title: Strings.getLang('devicemusic_subheadline_text'),
309
- data: getSelectModeData()[1],
310
- onSelect: selectPageData => {
311
- if (props.dreamMusicDp && state.musicType === 0) {
312
- state.deviceGenreMode = selectPageData.value
313
- state.currentMusic = state.musicModeData.find(music => music.id === selectPageData.value) as DreamLightMicMusicData
314
- } else {
315
- state.phoneGenreMode = selectPageData.value
316
- }
317
- },
318
- }
319
- navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect)
320
- }}
321
- />
322
- </>
308
+ <>
309
+ {params.dreamMusicDp && state.musicType === 0 &&
310
+ <LdvSlider
311
+ title={Strings.getLang('devicemusic_switch_tab_device_sensitivity')}
312
+ value={state.currentMusic?.sensitivity || 50}
313
+ min={1}
314
+ max={100}
315
+ onValueChange={() => { }}
316
+ onSlidingComplete={(v: number) => {
317
+ if (state.currentMusic) {
318
+ state.currentMusic.sensitivity = v
319
+ updateRemoteDreamMusic()
320
+ }
321
+ }}
322
+ subTitleStr={''} />
323
+ }
324
+ <TextFieldStyleButton
325
+ text={getSelectModeData()[0] || Strings.getLang('devicemusic_music_text')}
326
+ placeholder={Strings.getLang('devicemusic_subheadline_text')}
327
+ onPress={() => {
328
+ const paramsSelect: SelectPageParams<number> = {
329
+ title: Strings.getLang('devicemusic_subheadline_text'),
330
+ data: getSelectModeData()[1],
331
+ onSelect: selectPageData => {
332
+ if (params.dreamMusicDp && state.musicType === 0) {
333
+ state.deviceGenreMode = selectPageData.value
334
+ state.currentMusic = state.musicModeData.find(music => music.id === selectPageData.value) as DreamLightMicMusicData
335
+ } else {
336
+ state.phoneGenreMode = selectPageData.value
337
+ }
338
+ },
339
+ }
340
+ navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect)
341
+ }}
342
+ />
343
+ </>
323
344
  }
324
345
  </View>
325
346
  </Page>
326
347
  )
327
348
  }
328
349
 
329
- const styles = StyleSheet.create({
330
- content: {
331
- flex: 1,
332
- marginHorizontal: cx(18)
333
- },
334
- headSwitch: {
335
- position: 'absolute',
336
- right: 0,
337
- top: - cx(40),
338
- zIndex: 2,
339
- marginBottom: cx(24)
340
- },
341
- tiptext: {
342
- color: '#000',
343
- fontSize: cx(14),
344
- lineHeight: cx(14),
345
- }
346
- })
347
-
348
- export default MusicPage
350
+ export default withTheme(MusicPage)
@@ -147,7 +147,7 @@ const TimerPage = (props: {theme?: any}) => {
147
147
  {item.label}
148
148
  </Text>
149
149
  {progress.length > 1 && <TouchableOpacity onPress={() => handelTimer(item, false)}>
150
- <Image style={{ width: cx(16), height: cx(16), marginRight: cx(5) }} source={res.ic_arrows_nav_clear} />
150
+ <Image style={{ width: cx(16), height: cx(16), marginRight: cx(5), tintColor: props.theme.global.fontColor, }} source={res.ic_arrows_nav_clear} />
151
151
  </TouchableOpacity>}
152
152
  </View>
153
153
  );
@@ -193,7 +193,7 @@ const TimerPage = (props: {theme?: any}) => {
193
193
  paddingVertical: cx(5),
194
194
  alignItems: 'center',
195
195
  justifyContent: 'center',
196
- backgroundColor: '#666',
196
+ backgroundColor: props.theme.button.cancel,
197
197
  borderRadius: cx(5)
198
198
  },
199
199
  activeTimerTimeBox: {
@@ -229,14 +229,16 @@ const TimerPage = (props: {theme?: any}) => {
229
229
  <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline_text')}</Text>
230
230
  <View
231
231
  style={{
232
- backgroundColor: props.theme.card.border,
232
+ backgroundColor: props.theme.container.background,
233
233
  borderRadius: 4,
234
234
  minHeight: cx(50),
235
235
  flex: 1,
236
236
  justifyContent: 'center',
237
237
  }}
238
238
  >
239
- {!state.selectedSkill.length ? <Text style={{ marginLeft: cx(10) }}>{I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}</Text> :
239
+ {!state.selectedSkill.length ? <Text style={{ marginLeft: cx(10), color: props.theme.global.fontColor }}>
240
+ {I18n.getLang('timer_ceiling_fan_selectionfield_no_components_text')}
241
+ </Text> :
240
242
  <View
241
243
  style={{
242
244
  marginHorizontal: cx(8),
@@ -255,7 +257,7 @@ const TimerPage = (props: {theme?: any}) => {
255
257
  return (
256
258
  <TouchableOpacity style={styles.skillListItem} key={skill.dpId} onPress={() => handelTimer(skill, true)}>
257
259
  <Text style={{ color: props.theme.global.fontColor }}>{skill.label}</Text>
258
- <Image style={{ width: cx(16), height: cx(16) }} source={res.device_panel_timer_add} />
260
+ <Image style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor }} source={res.device_panel_timer_add} />
259
261
  </TouchableOpacity>
260
262
  )
261
263
  })}
@@ -286,7 +288,7 @@ const TimerPage = (props: {theme?: any}) => {
286
288
  getProgressByDp(timer.dpId).endTimer()
287
289
  }}
288
290
  style={styles.activeTimerCancelBtn}>
289
- <Text style={{ color: '#fff', fontSize: cx(12) }}>{I18n.getLang('auto_scan_system_cancel')}</Text>
291
+ <Text style={{ color: props.theme.button.fontColor, fontSize: cx(12) }}>{I18n.getLang('auto_scan_system_cancel')}</Text>
290
292
  </TouchableOpacity>
291
293
  </View>
292
294
  <View style={styles.activeTimerTimeBox}>
@@ -307,9 +309,11 @@ const TimerPage = (props: {theme?: any}) => {
307
309
  thumbStrokeWidth={2}
308
310
  thumbRadius={0}
309
311
  />
310
- <Text style={{ marginLeft: cx(20), fontSize: cx(22) }}>{getActiveTimeString(timer.progressHook.countdown)}</Text>
312
+ <Text style={{ marginLeft: cx(20), fontSize: cx(22), color: props.theme.global.fontColor }}>{getActiveTimeString(timer.progressHook.countdown)}</Text>
311
313
  </View>
312
- <Text>{I18n.formatValue(timer.enable ? timer.stringOff : timer.stringOn, timeFormatToRealTime(timer.progressHook.countdown))}</Text>
314
+ <Text style={{color: props.theme.global.fontColor}}>
315
+ {I18n.formatValue(timer.enable ? timer.stringOff : timer.stringOn, timeFormatToRealTime(timer.progressHook.countdown))}
316
+ </Text>
313
317
  </Card>
314
318
  <Spacer height={cx(40)} />
315
319
  </View>
@@ -351,7 +355,7 @@ const TimerPage = (props: {theme?: any}) => {
351
355
  }
352
356
  />
353
357
  <View style={{ marginVertical: cx(30) }}>
354
- <Text>
358
+ <Text style={{color: props.theme.global.fontColor}}>
355
359
  {I18n.formatValue(
356
360
  runningTimer()[0].enable ?
357
361
  runningTimer()[0].stringOff :