@ledvance/group-ui-biz-bundle 1.0.12 → 1.0.14
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
|
@@ -300,7 +300,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
300
300
|
version: 0,
|
|
301
301
|
mode: SceneNodeTransitionMode.Jump,
|
|
302
302
|
speed: 70,
|
|
303
|
-
name:
|
|
303
|
+
name: '',
|
|
304
304
|
icon: res.leverkusen_icon,
|
|
305
305
|
whiteColors: [
|
|
306
306
|
{ brightness: 100, colorTemp: 0},
|
|
@@ -28,8 +28,8 @@ export default function FlagItem(props: RecommendMoodItemProps) {
|
|
|
28
28
|
<Spacer height={cx(16)} />
|
|
29
29
|
<View style={styles.headline}>
|
|
30
30
|
<View style={{ flexDirection: 'row', flex: 1, paddingRight: cx(5), justifyContent: 'flex-start' }}>
|
|
31
|
-
<Text style={styles.headText}>{props.title}</Text>
|
|
32
|
-
{props.icon
|
|
31
|
+
{props.title ? <Text style={styles.headText}>{props.title}</Text> : undefined}
|
|
32
|
+
{props.icon ? <Image source={icon} style={{ width: cx(60), aspectRatio: 2.14, marginRight: cx(10) }} /> : undefined}
|
|
33
33
|
</View>
|
|
34
34
|
<SwitchButton
|
|
35
35
|
thumbStyle={{ elevation: 0 }}
|
|
@@ -63,9 +63,12 @@ const StaticMoodEditorPage = () => {
|
|
|
63
63
|
if (state.currentNode.isColorNode) {
|
|
64
64
|
return hsv2Hex(state.currentNode.h, s, 100)
|
|
65
65
|
}
|
|
66
|
-
if (moduleParams.
|
|
67
|
-
return
|
|
66
|
+
if (moduleParams.isSupportColor) {
|
|
67
|
+
return hsv2Hex(state.currentNode.h, s, 100)
|
|
68
|
+
} else if (moduleParams.isSupportTemperature) {
|
|
69
|
+
return cctToColor(state.currentNode.colorTemp.toFixed());
|
|
68
70
|
}
|
|
71
|
+
return '#fff'
|
|
69
72
|
}, [state.currentNode.colorTemp])
|
|
70
73
|
|
|
71
74
|
const getButtonStatus = () => {
|
|
@@ -2,9 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { ViewStyle, View, Text, StyleSheet } from "react-native";
|
|
3
3
|
import Card from "@ledvance/base/src/components/Card";
|
|
4
4
|
import { SwitchButton, Utils } from 'tuya-panel-kit';
|
|
5
|
-
import { convertTo12HourFormat, loopText } from '@ledvance/base/src/utils/common';
|
|
5
|
+
import { convertTo12HourFormat, loopText, showDialog } from '@ledvance/base/src/utils/common';
|
|
6
6
|
import { Timer } from "./Interface";
|
|
7
7
|
import { useSystemTimeFormate } from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
8
|
+
import I18n from "@ledvance/base/src/i18n";
|
|
8
9
|
const { convertX: cx } = Utils.RatioUtils;
|
|
9
10
|
|
|
10
11
|
interface ScheduleCardProps {
|
|
@@ -44,7 +45,21 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
44
45
|
value={!!item.status}
|
|
45
46
|
thumbStyle={{ elevation: 0 }}
|
|
46
47
|
onValueChange={() => {
|
|
47
|
-
|
|
48
|
+
if (!item.status) {
|
|
49
|
+
showDialog({
|
|
50
|
+
method: 'confirm',
|
|
51
|
+
title: I18n.getLang('conflict_dialog_active_item_timeschedule_titel'),
|
|
52
|
+
subTitle: I18n.getLang('group_conflict_feature'),
|
|
53
|
+
confirmText: I18n.getLang('registration_dialog_button_yes'),
|
|
54
|
+
cancelText: I18n.getLang('registration_dialog_button_no'),
|
|
55
|
+
onConfirm: (_, {close}) => {
|
|
56
|
+
onEnableChange(!item.status);
|
|
57
|
+
close()
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
onEnableChange(!item.status);
|
|
62
|
+
}
|
|
48
63
|
}}
|
|
49
64
|
/>
|
|
50
65
|
</View>
|
|
@@ -110,4 +125,4 @@ const styles = StyleSheet.create({
|
|
|
110
125
|
}
|
|
111
126
|
});
|
|
112
127
|
|
|
113
|
-
export default ScheduleCard
|
|
128
|
+
export default ScheduleCard
|
|
@@ -420,18 +420,28 @@ const TimeScheduleDetailPage = () => {
|
|
|
420
420
|
rightButtonIcon={allowSubmit ? res.ic_check : res.ic_uncheck}
|
|
421
421
|
rightButtonIconClick={async () => {
|
|
422
422
|
if (!allowSubmit || state.loading) return
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
423
|
+
showDialog({
|
|
424
|
+
method: 'confirm',
|
|
425
|
+
title: I18n.getLang('conflict_dialog_active_item_timeschedule_titel'),
|
|
426
|
+
subTitle: I18n.getLang('group_conflict_feature'),
|
|
427
|
+
confirmText: I18n.getLang('registration_dialog_button_yes'),
|
|
428
|
+
cancelText: I18n.getLang('registration_dialog_button_no'),
|
|
429
|
+
onConfirm: async (_, { close }) => {
|
|
430
|
+
state.loading = true
|
|
431
|
+
const res = await props.modDeleteTimeSchedule(props.mode, {
|
|
432
|
+
...state.timeSchedule,
|
|
433
|
+
status: 1,
|
|
434
|
+
dps: getActions()
|
|
435
|
+
}, '')
|
|
436
|
+
console.log(res, '< ---- resss')
|
|
437
|
+
state.loading = false
|
|
438
|
+
if (res.success) {
|
|
439
|
+
close()
|
|
440
|
+
props.refreshFn()
|
|
441
|
+
navigation.goBack()
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
})
|
|
435
445
|
}}
|
|
436
446
|
backDialogTitle={I18n.getLang('cancel_dialog_leave_unsaved_titel')}
|
|
437
447
|
backDialogContent={I18n.getLang('cancel_dialog_leave_unsaved_timeschedule_note')}
|