@ledvance/group-ui-biz-bundle 1.0.76 → 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.
- package/package.json +1 -1
- package/src/modules/biorhythm/BiorhythmPage.tsx +1 -1
- package/src/modules/flags/FlagEditPage.tsx +183 -180
- package/src/modules/flags/FlagItem.tsx +29 -42
- package/src/modules/flags/FlagPage.tsx +20 -19
- package/src/modules/mood_new/AddMoodPage.tsx +16 -15
- package/src/modules/mood_new/MixDynamicMoodEditor.tsx +108 -104
- package/src/modules/mood_new/MoodItem.tsx +59 -54
- package/src/modules/mood_new/MoodPage.tsx +42 -40
- package/src/modules/mood_new/StaticMoodEditorPage.tsx +39 -46
- package/src/modules/music/MusicPage.tsx +79 -77
- package/src/modules/randomTimingForLight/ItemCard.tsx +29 -26
- package/src/modules/randomTimingForLight/RandomTimingForLightDetailPage.tsx +46 -81
- package/src/modules/randomTimingForLight/RandomTimingForLightPage.tsx +58 -63
- package/src/modules/randomTimingForLight/Summary.tsx +62 -58
- package/src/modules/select/SelectPage.tsx +65 -62
- package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +1 -1
- package/src/modules/switchGradient/SwitchGradientPage.tsx +24 -22
|
@@ -24,6 +24,7 @@ import LdvSwitch from '@ledvance/base/src/components/ldvSwitch';
|
|
|
24
24
|
import { showDialog } from '@ledvance/base/src/utils/common';
|
|
25
25
|
|
|
26
26
|
const cx = Utils.RatioUtils.convertX;
|
|
27
|
+
const { withTheme } = Utils.ThemeUtils
|
|
27
28
|
|
|
28
29
|
export interface StaticMoodEditorPageParams {
|
|
29
30
|
mode: 'add' | 'edit';
|
|
@@ -41,7 +42,7 @@ export interface StaticMoodEditorPageState {
|
|
|
41
42
|
loading: boolean;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
const StaticMoodEditorPage = () => {
|
|
45
|
+
const StaticMoodEditorPage = (props: { theme?: any }) => {
|
|
45
46
|
const navigation = useNavigation();
|
|
46
47
|
const routeParams = useParams<StaticMoodEditorPageParams>();
|
|
47
48
|
const params = cloneDeep(routeParams);
|
|
@@ -117,6 +118,41 @@ const StaticMoodEditorPage = () => {
|
|
|
117
118
|
return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
|
|
118
119
|
}, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
|
|
119
120
|
|
|
121
|
+
|
|
122
|
+
const styles = StyleSheet.create({
|
|
123
|
+
root: {
|
|
124
|
+
flex: 1,
|
|
125
|
+
flexDirection: 'column',
|
|
126
|
+
},
|
|
127
|
+
name: {
|
|
128
|
+
marginHorizontal: cx(24),
|
|
129
|
+
},
|
|
130
|
+
adjustCard: {
|
|
131
|
+
marginTop: cx(12),
|
|
132
|
+
marginHorizontal: cx(24),
|
|
133
|
+
},
|
|
134
|
+
fanAdjustCard: {
|
|
135
|
+
marginHorizontal: cx(24),
|
|
136
|
+
},
|
|
137
|
+
preview: {
|
|
138
|
+
width: cx(20),
|
|
139
|
+
height: cx(20),
|
|
140
|
+
marginStart: cx(12),
|
|
141
|
+
borderRadius: cx(4),
|
|
142
|
+
},
|
|
143
|
+
deleteBtn: {
|
|
144
|
+
width: '100%',
|
|
145
|
+
height: cx(50),
|
|
146
|
+
backgroundColor: props.theme.button.delete,
|
|
147
|
+
borderRadius: cx(8),
|
|
148
|
+
},
|
|
149
|
+
deleteBtnText: {
|
|
150
|
+
color: props.theme.button.fontColor,
|
|
151
|
+
fontSize: cx(16),
|
|
152
|
+
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
|
|
120
156
|
return (
|
|
121
157
|
<Page
|
|
122
158
|
backText={I18n.getLang('mesh_device_detail_mode')}
|
|
@@ -147,7 +183,7 @@ const StaticMoodEditorPage = () => {
|
|
|
147
183
|
}}
|
|
148
184
|
maxLength={33}
|
|
149
185
|
showError={state.mood.name.length > 32 || nameRepeat}
|
|
150
|
-
tipColor={nameRepeat ?
|
|
186
|
+
tipColor={nameRepeat ? props.theme.global.error : undefined}
|
|
151
187
|
tipIcon={nameRepeat ? res.ic_text_field_input_error : undefined}
|
|
152
188
|
errorText={I18n.getLang(
|
|
153
189
|
nameRepeat ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text'
|
|
@@ -253,47 +289,4 @@ const StaticMoodEditorPage = () => {
|
|
|
253
289
|
);
|
|
254
290
|
};
|
|
255
291
|
|
|
256
|
-
|
|
257
|
-
root: {
|
|
258
|
-
flex: 1,
|
|
259
|
-
flexDirection: 'column',
|
|
260
|
-
},
|
|
261
|
-
name: {
|
|
262
|
-
marginHorizontal: cx(24),
|
|
263
|
-
},
|
|
264
|
-
adjustCard: {
|
|
265
|
-
marginTop: cx(12),
|
|
266
|
-
marginHorizontal: cx(24),
|
|
267
|
-
},
|
|
268
|
-
fanAdjustCard: {
|
|
269
|
-
marginHorizontal: cx(24),
|
|
270
|
-
},
|
|
271
|
-
lightLine: {
|
|
272
|
-
flexDirection: 'row',
|
|
273
|
-
marginHorizontal: cx(16),
|
|
274
|
-
},
|
|
275
|
-
light: {
|
|
276
|
-
color: '#000',
|
|
277
|
-
fontSize: cx(18),
|
|
278
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
279
|
-
},
|
|
280
|
-
preview: {
|
|
281
|
-
width: cx(20),
|
|
282
|
-
height: cx(20),
|
|
283
|
-
marginStart: cx(12),
|
|
284
|
-
borderRadius: cx(4),
|
|
285
|
-
},
|
|
286
|
-
deleteBtn: {
|
|
287
|
-
width: '100%',
|
|
288
|
-
height: cx(50),
|
|
289
|
-
backgroundColor: '#666',
|
|
290
|
-
borderRadius: cx(8),
|
|
291
|
-
},
|
|
292
|
-
deleteBtnText: {
|
|
293
|
-
color: '#fff',
|
|
294
|
-
fontSize: cx(16),
|
|
295
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
296
|
-
},
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
export default StaticMoodEditorPage;
|
|
292
|
+
export default withTheme(StaticMoodEditorPage)
|
|
@@ -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 '
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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={
|
|
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
|
-
|
|
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)
|