@ledvance/group-ui-biz-bundle 1.0.65 → 1.0.67
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
CHANGED
|
@@ -56,11 +56,15 @@ const FlagEditPage = () => {
|
|
|
56
56
|
}, [state.currentNode, state.currentWhiteNode])
|
|
57
57
|
|
|
58
58
|
useUpdateEffect(() =>{
|
|
59
|
-
state.
|
|
59
|
+
if (state.colorPaintBucketIdx < state.mood.colors.length){
|
|
60
|
+
state.currentNode = state.mood.colors[state.colorPaintBucketIdx]
|
|
61
|
+
}
|
|
60
62
|
}, [JSON.stringify(state.mood.colors), state.colorPaintBucketIdx])
|
|
61
63
|
|
|
62
64
|
useUpdateEffect(() =>{
|
|
63
|
-
state.
|
|
65
|
+
if (state.whitePaintBucketIdx < state.mood.whiteColors.length ){
|
|
66
|
+
state.currentWhiteNode = state.mood.whiteColors[state.whitePaintBucketIdx]
|
|
67
|
+
}
|
|
64
68
|
}, [JSON.stringify(state.mood.whiteColors), state.whitePaintBucketIdx])
|
|
65
69
|
|
|
66
70
|
const checkMoodDataChanged = useMemo(() =>{
|
|
@@ -7,6 +7,7 @@ import {useReactive} from "ahooks";
|
|
|
7
7
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
8
8
|
import {useRemoteSwitch} from "./RemoteSwitchAction";
|
|
9
9
|
import {View, Text, StyleSheet} from "react-native";
|
|
10
|
+
import {showDialog} from "@ledvance/base/src/utils/common";
|
|
10
11
|
|
|
11
12
|
const { convertX: cx } = Utils.RatioUtils
|
|
12
13
|
|
|
@@ -24,9 +25,26 @@ const RemoteSwitchPage = () => {
|
|
|
24
25
|
<View style={[styles.colorBlock, { backgroundColor: 'red', opacity: 0 }]} />
|
|
25
26
|
<Spacer style={{ flex: 1 }} height={0} width={0} />
|
|
26
27
|
<SwitchButton value={remoteSwitch} onValueChange={async v => {
|
|
27
|
-
state.loading
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
if (state.loading) {
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
if (v) {
|
|
32
|
+
showDialog({
|
|
33
|
+
method: 'confirm',
|
|
34
|
+
title: I18n.getLang('Remotecontrol_Title'),
|
|
35
|
+
subTitle: I18n.getLang('Remotecontrol_description'),
|
|
36
|
+
onConfirm: async (_, { close }) => {
|
|
37
|
+
close()
|
|
38
|
+
state.loading = true
|
|
39
|
+
await setRemoteSwitch(v)
|
|
40
|
+
state.loading = false
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
} else {
|
|
44
|
+
state.loading = true
|
|
45
|
+
await setRemoteSwitch(v)
|
|
46
|
+
state.loading = false
|
|
47
|
+
}
|
|
30
48
|
} } />
|
|
31
49
|
</View>
|
|
32
50
|
</Page>)
|
|
@@ -14,11 +14,12 @@ import Spacer from '@ledvance/base/src/components/Spacer';
|
|
|
14
14
|
import InfoText from '@ledvance/base/src/components/InfoText';
|
|
15
15
|
import DeleteButton from '@ledvance/base/src/components/DeleteButton';
|
|
16
16
|
import { useReactive, useUpdateEffect } from 'ahooks';
|
|
17
|
-
import { addTimeSchedule, modDelTimeSchedule, getTimeSchedule, modifyTimeSchedule } from "
|
|
18
|
-
import {
|
|
17
|
+
import { addTimeSchedule, modDelTimeSchedule, getTimeSchedule, modifyTimeSchedule } from "./TimeScheduleActions";
|
|
18
|
+
import { DeviceStateType, Timer } from './Interface';
|
|
19
19
|
import { useParams } from '@ledvance/base/src/hooks/Hooks';
|
|
20
|
-
import ScheduleCard from '
|
|
21
|
-
import { ui_biz_routerKey } from "
|
|
20
|
+
import ScheduleCard from './components/ScheduleCard';
|
|
21
|
+
import { ui_biz_routerKey } from "../../navigation/Routers";
|
|
22
|
+
import { ApplyForItem } from '@ledvance/base/src/utils/interface';
|
|
22
23
|
|
|
23
24
|
const { convertX: cx } = Utils.RatioUtils;
|
|
24
25
|
const MAX_NUM = 30;
|
|
@@ -141,6 +142,7 @@ const TimeSchedulePage = () => {
|
|
|
141
142
|
iconStyle={{ tintColor: '#ff9500' }}
|
|
142
143
|
/>
|
|
143
144
|
)}
|
|
145
|
+
{ state.timeScheduleList.length > 0 ?
|
|
144
146
|
<FlatList
|
|
145
147
|
data={state.timeScheduleList}
|
|
146
148
|
renderItem={({ item }) => (
|
|
@@ -161,36 +163,36 @@ const TimeSchedulePage = () => {
|
|
|
161
163
|
/>
|
|
162
164
|
)}
|
|
163
165
|
keyExtractor={item => item.id.toString()}
|
|
164
|
-
ListEmptyComponent={
|
|
165
|
-
<View style={styles.emptyContainer}>
|
|
166
|
-
<Spacer height={cx(60)} />
|
|
167
|
-
<Image
|
|
168
|
-
style={styles.emptyImage}
|
|
169
|
-
source={{ uri: res.ldv_timer_empty }}
|
|
170
|
-
resizeMode="contain"
|
|
171
|
-
/>
|
|
172
|
-
<InfoText
|
|
173
|
-
icon={res.device_panel_schedule_alert}
|
|
174
|
-
text={I18n.getLang('timeschedule_overview_empty_information_text')}
|
|
175
|
-
style={{ width: 'auto', alignItems: 'center' }}
|
|
176
|
-
textStyle={{ color: '#000', fontSize: cx(12), flex: undefined }}
|
|
177
|
-
iconStyle={{ tintColor: '#000' }}
|
|
178
|
-
/>
|
|
179
|
-
<Spacer height={cx(16)} />
|
|
180
|
-
<DeleteButton
|
|
181
|
-
style={styles.addBtn}
|
|
182
|
-
text={`${I18n.getLang('timeschedule_overview_empty_button_add_text')}`}
|
|
183
|
-
textStyle={{ fontSize: cx(12) }}
|
|
184
|
-
onPress={() => {
|
|
185
|
-
navigateToEdit('add');
|
|
186
|
-
}}
|
|
187
|
-
/>
|
|
188
|
-
</View>
|
|
189
|
-
)}
|
|
166
|
+
ListEmptyComponent={<Spacer />}
|
|
190
167
|
ListHeaderComponent={() => <Spacer height={cx(10)} />}
|
|
191
168
|
ItemSeparatorComponent={() => <Spacer />}
|
|
192
169
|
ListFooterComponent={() => <Spacer height={cx(30)} />}
|
|
193
|
-
/>
|
|
170
|
+
/> :
|
|
171
|
+
<View style={styles.emptyContainer}>
|
|
172
|
+
<Spacer height={cx(60)}/>
|
|
173
|
+
<Image
|
|
174
|
+
style={styles.emptyImage}
|
|
175
|
+
source={{uri: res.ldv_timer_empty}}
|
|
176
|
+
resizeMode="contain"
|
|
177
|
+
/>
|
|
178
|
+
<InfoText
|
|
179
|
+
icon={res.device_panel_schedule_alert}
|
|
180
|
+
text={I18n.getLang('timeschedule_overview_empty_information_text')}
|
|
181
|
+
style={{width: 'auto', alignItems: 'center'}}
|
|
182
|
+
textStyle={{color: '#000', fontSize: cx(12), flex: undefined}}
|
|
183
|
+
iconStyle={{tintColor: '#000'}}
|
|
184
|
+
/>
|
|
185
|
+
<Spacer height={cx(16)}/>
|
|
186
|
+
<DeleteButton
|
|
187
|
+
style={styles.addBtn}
|
|
188
|
+
text={`${I18n.getLang('timeschedule_overview_empty_button_add_text')}`}
|
|
189
|
+
textStyle={{fontSize: cx(12)}}
|
|
190
|
+
onPress={() => {
|
|
191
|
+
navigateToEdit('add');
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
194
|
+
</View>
|
|
195
|
+
}
|
|
194
196
|
</ScrollView>
|
|
195
197
|
</Page>
|
|
196
198
|
);
|
|
@@ -71,7 +71,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
71
71
|
<View key={item.dp}>
|
|
72
72
|
<Card style={{ marginHorizontal: cx(24) }}>
|
|
73
73
|
<LdvSwitch
|
|
74
|
-
title={item.key}
|
|
74
|
+
title={item.name || item.key}
|
|
75
75
|
color={'#fff'}
|
|
76
76
|
colorAlpha={1}
|
|
77
77
|
enable={item.enable}
|
|
@@ -170,7 +170,7 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
170
170
|
// @ts-ignore
|
|
171
171
|
fanSpeed={deviceData.fanSpeed}
|
|
172
172
|
onFanSwitch={() => {}}
|
|
173
|
-
onFanSpeedChangeComplete={(fanSpeed) => {
|
|
173
|
+
onFanSpeedChangeComplete={(fanSpeed) => {
|
|
174
174
|
state.deviceData = {
|
|
175
175
|
...state.deviceData,
|
|
176
176
|
fanSpeed
|