@ledvance/ui-biz-bundle 1.1.76 → 1.1.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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.1.76",
7
+ "version": "1.1.78",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -56,11 +56,15 @@ const FlagEditPage = () => {
56
56
  }, [state.currentNode, state.currentWhiteNode])
57
57
 
58
58
  useUpdateEffect(() =>{
59
- state.currentNode = state.mood.colors[state.colorPaintBucketIdx]
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.currentWhiteNode = state.mood.whiteColors[state.whitePaintBucketIdx]
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(() =>{
@@ -48,7 +48,7 @@ export const useBiorhythm: UseBiorhythmType = (dpKey: string, disabledFeature?:
48
48
  if (disabledFeature) return
49
49
  biorhythmTimer = setTimeout(() => {
50
50
  getBiorhythm()
51
- }, 250)
51
+ }, 300)
52
52
 
53
53
  return () => {
54
54
  clearTimeout(biorhythmTimer)
@@ -101,7 +101,7 @@ export const useFixedTime: UseFixedTimeType = (dpKey, isPlug, disableFeature) =>
101
101
  }
102
102
  }
103
103
  })
104
- }, 250)
104
+ }, 200)
105
105
 
106
106
  return () => clearTimeout(fixedTimer)
107
107
  }, [fixedTimeDp])
@@ -197,7 +197,7 @@ const fixedTimeDp2Obj = (fixedDp: string, isPlug?: boolean) => {
197
197
  brightness,
198
198
  temperature
199
199
  },
200
- isColorMode: !!(h && s && v)
200
+ isColorMode: !!(h !== 0 || s !== 0 || v !== 0)
201
201
  }
202
202
  })
203
203
  return {
@@ -38,15 +38,21 @@ const FixedTimeDetailPage = () => {
38
38
  const is24Hour = useSystemTimeFormate()
39
39
  const state = useReactive({
40
40
  loading: false,
41
- isColorMode: false,
42
- fixedTime: cloneDeep(params.scheduleItem)
41
+ fixedTime: cloneDeep(params.scheduleItem),
42
+ initFixedTime: cloneDeep(params.scheduleItem)
43
43
  })
44
44
 
45
45
  useEffect(() => {
46
46
  if (!params.isPlug && state.fixedTime.color) {
47
47
  const { brightness, temperature, h, s, v } = state.fixedTime.color
48
48
  const isColor = brightness === 0 && temperature === 0 && (h !== 0 || s !== 0 || v !== 0)
49
- state.isColorMode = isColor
49
+ if (isColor) {
50
+ state.fixedTime.color.brightness = 100;
51
+ } else {
52
+ state.fixedTime.color.s = 100;
53
+ state.fixedTime.color.v = 100;
54
+ }
55
+ state.initFixedTime = cloneDeep(state.fixedTime)
50
56
  }
51
57
  }, [])
52
58
 
@@ -66,8 +72,8 @@ const FixedTimeDetailPage = () => {
66
72
  }, [JSON.stringify(state.fixedTime)])
67
73
 
68
74
  const checkItemChanged = useMemo(() =>{
69
- return isEqual(state.fixedTime, params.scheduleItem)
70
- }, [params.scheduleItem, JSON.stringify(state.fixedTime)])
75
+ return isEqual(state.fixedTime, state.initFixedTime)
76
+ }, [state.initFixedTime, JSON.stringify(state.fixedTime)])
71
77
 
72
78
  const canSubmit = useMemo(() => {
73
79
  return state.fixedTime.name?.length > 0 && state.fixedTime.name?.length < 33 && !checkItemChanged && inRangeTime && state.fixedTime.channel !== undefined
@@ -91,11 +97,11 @@ const FixedTimeDetailPage = () => {
91
97
  }
92
98
  if (!params.isPlug && state.fixedTime.color) {
93
99
  editFixedTime.color = {
94
- h: state.isColorMode ? state.fixedTime.color?.h : 0,
95
- s: state.isColorMode ? state.fixedTime.color?.s : 0,
96
- v: state.isColorMode ? state.fixedTime.color?.v : 0,
97
- temperature: state.isColorMode ? 0 : state.fixedTime.color?.temperature,
98
- brightness: state.isColorMode ? 0 : state.fixedTime.color?.brightness
100
+ h: state.fixedTime.isColorMode ? state.fixedTime.color?.h : 0,
101
+ s: state.fixedTime.isColorMode ? state.fixedTime.color?.s : 0,
102
+ v: state.fixedTime.isColorMode ? state.fixedTime.color?.v : 0,
103
+ temperature: state.fixedTime.isColorMode ? 0 : state.fixedTime.color?.temperature,
104
+ brightness: state.fixedTime.isColorMode ? 0 : state.fixedTime.color?.brightness
99
105
  }
100
106
  }
101
107
  const res = await params.onPost(params.mode, editFixedTime)
@@ -190,9 +196,9 @@ const FixedTimeDetailPage = () => {
190
196
  isSupportColor={!!params.isSupportColor}
191
197
  isSupportBrightness={!!params.isSupportBrightness}
192
198
  isSupportTemperature={!!params.isSupportTemperature}
193
- isColorMode={state.isColorMode}
199
+ isColorMode={state.fixedTime.isColorMode ?? false}
194
200
  reserveSV={true}
195
- setIsColorMode={(v) => state.isColorMode = v}
201
+ setIsColorMode={(v) => state.fixedTime.isColorMode = v}
196
202
  h={state.fixedTime.color.h}
197
203
  s={state.fixedTime.color.s}
198
204
  v={state.fixedTime.color.v}
@@ -10,7 +10,7 @@ import {
10
10
  } from 'react-native';
11
11
  import { Utils } from 'tuya-panel-kit';
12
12
  import { useReactive } from 'ahooks';
13
- import { cloneDeep, find, isEqual } from 'lodash';
13
+ import { cloneDeep, isEqual } from 'lodash';
14
14
  import Page from '@ledvance/base/src/components/Page';
15
15
  import Strings from '@ledvance/base/src/i18n';
16
16
  import { StaticMoodEditorPageParams } from './StaticMoodEditorPage';
@@ -170,7 +170,7 @@ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: Mood
170
170
  const secondaryDps = {}
171
171
  if (moodInfo) {
172
172
  const { mainLamp, secondaryLamp } = moodInfo
173
- if (mainLamp?.nodes?.length) {
173
+ if (params.isMixLight || mainLamp?.nodes?.length) {
174
174
  const mainHex = getMoodDp(params.isCeilingLight ? {...moodInfo, id: mainLamp.id!} : moodInfo, params);
175
175
  mainDps[params.mainDp] = mainHex
176
176
  mainDps[params.mainWorkMode] = WorkMode.Scene;
@@ -184,7 +184,6 @@ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: Mood
184
184
  id: secondaryLamp.id!,
185
185
  version: 1
186
186
  });
187
- console.log(secondaryHex, secondaryLamp, 'hexxxxx')
188
187
  secondaryDps[params.secondaryDp] = secondaryHex
189
188
  secondaryDps[params.secondaryWorkMode!] = WorkMode.Scene
190
189
  secondaryDps[params.secondarySwitch!] = true
@@ -54,7 +54,7 @@ const MoodItem = (props: MoodItemProps) => {
54
54
  </View>
55
55
  <Spacer />
56
56
  <MixMoodColorsLine mixSubLight={mood.mainLamp} isMix={isMix} type={(mood.mainLamp.mode === gradientMode && !deviceTypeOption?.isCeilingLight) ? 'gradient' : 'separate'}/>
57
- {(isMix && !!mood.secondaryLamp.nodes.length) && (
57
+ {(deviceTypeOption?.isMixLight || (isMix && !!mood.secondaryLamp.nodes.length)) && (
58
58
  <>
59
59
  <Spacer height={cx(7)} />
60
60
  <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === (deviceTypeOption?.isMixLight ? MoodJumpGradientMode.SourceGradient : MoodJumpGradientMode.StripGradient) ? 'gradient' : 'separate'}/>
@@ -8,7 +8,7 @@ import {
8
8
  useFlagMode,
9
9
  useMoods,
10
10
  } from '@ledvance/base/src/models/modules/NativePropsSlice';
11
- import { useReactive, useUpdateEffect } from 'ahooks';
11
+ import { useReactive } from 'ahooks';
12
12
  import Strings from '@ledvance/base/src/i18n';
13
13
  import res from '@ledvance/base/src/res';
14
14
  import { FlatList, StyleSheet, View, Platform } from 'react-native';
@@ -41,7 +41,7 @@ const MoodPage = () => {
41
41
  const [secondaryWork, setSecondaryWork] = useWorkMode(params.secondaryWorkMode!);
42
42
  const [switchLed] = useSwitchLed(params.switchLedDp)
43
43
  const [flagMode, setFlagMode] = useFlagMode();
44
-
44
+
45
45
  const state = useReactive<MoodPageState>({
46
46
  currentMood: undefined,
47
47
  staticTagChecked: true,
@@ -70,7 +70,6 @@ const MoodPage = () => {
70
70
  ).then(res => {
71
71
  state.loading = false
72
72
  if (res.success && Array.isArray(res.data)) {
73
- console.log(res.data, ' <--- res.data')
74
73
  state.originMoods = cloneDeep(res.data);
75
74
  }
76
75
  });
@@ -48,7 +48,7 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
48
48
  <View style={styles.lineStyle}>
49
49
  <MixMoodColorsLine mixSubLight={mood?.mainLamp} isMix={isMix} type={(mood.mainLamp.mode === gradientMode && !deviceTypeOption?.isCeilingLight) ? 'gradient' : 'separate'}/>
50
50
  <Spacer height={cx(7)} />
51
- {(isMix && !!mood.secondaryLamp.nodes.length) && <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === (deviceTypeOption?.isMixLight ? MoodJumpGradientMode.SourceGradient : MoodJumpGradientMode.StripGradient) ? 'gradient' : 'separate'}/>}
51
+ {(deviceTypeOption?.isMixLight || (isMix && !!mood.secondaryLamp.nodes.length)) && <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === (deviceTypeOption?.isMixLight ? MoodJumpGradientMode.SourceGradient : MoodJumpGradientMode.StripGradient) ? 'gradient' : 'separate'}/>}
52
52
  </View>
53
53
  <Spacer height={cx(24)} />
54
54
  </>
@@ -22,6 +22,7 @@ import LampAdjustView2 from '@ledvance/base/src/components/LampAdjustView2';
22
22
  import { ui_biz_routerKey } from '../../navigation/Routers'
23
23
  import LdvSwitch from '@ledvance/base/src/components/ldvSwitch';
24
24
  import { showDialog } from '@ledvance/base/src/utils/common';
25
+ import ColorAdjustView from '@ledvance/base/src/components/ColorAdjustView';
25
26
 
26
27
  const cx = Utils.RatioUtils.convertX;
27
28
 
@@ -54,7 +55,7 @@ const StaticMoodEditorPage = () => {
54
55
  secondaryNode: params.currentMood?.secondaryLamp?.nodes?.[0],
55
56
  loading: false,
56
57
  });
57
-
58
+
58
59
  useEffect(() => {
59
60
  state.headline = I18n.getLang(
60
61
  params.mode === 'add' ? 'add_new_static_mood_headline_text' : 'edit_static_mood_headline_text'
@@ -90,10 +91,10 @@ const StaticMoodEditorPage = () => {
90
91
  nodes: [cloneDeep(state.secondaryNode)],
91
92
  };
92
93
  newMood.mainLamp.type = 2
93
- if(moduleParams.isSupportBrightness && !moduleParams.isSupportTemperature){
94
+ if (moduleParams.isSupportBrightness && !moduleParams.isSupportTemperature) {
94
95
  newMood.mainLamp.type = 1
95
96
  }
96
- if(moduleParams.isSupportColor){
97
+ if (moduleParams.isSupportColor) {
97
98
  newMood.secondaryLamp.type = 3
98
99
  }
99
100
  }
@@ -108,11 +109,11 @@ const StaticMoodEditorPage = () => {
108
109
  return params.nameRepeat(state.mood)
109
110
  }, [state.mood.name]);
110
111
 
111
- const checkMoodChanged = useMemo(() =>{
112
+ const checkMoodChanged = useMemo(() => {
112
113
  return isEqual(state.mood, params.currentMood)
113
114
  }, [JSON.stringify(state.mood), params.currentMood])
114
115
 
115
- const canSaveMoodData = useMemo(() =>{
116
+ const canSaveMoodData = useMemo(() => {
116
117
  return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
117
118
  }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
118
119
 
@@ -194,6 +195,50 @@ const StaticMoodEditorPage = () => {
194
195
  />
195
196
  )}
196
197
  </Card>
198
+ {moduleParams.isMixLight && <Card style={styles.adjustCard}>
199
+ <LdvSwitch
200
+ title={I18n.getLang('add_new_trigger_time_field_headline_text3')}
201
+ color={''}
202
+ colorAlpha={1}
203
+ enable={!!state.mood.secondaryLamp.enable}
204
+ setEnable={(enable: boolean) => {
205
+ if (enable && state.mood.secondaryLamp.nodes.length === 0) {
206
+ state.mood.secondaryLamp.nodes.push(
207
+ {
208
+ h: 0,
209
+ s: 100,
210
+ v: 100,
211
+ brightness: 100,
212
+ colorTemp: 0,
213
+ isColorNode: true,
214
+ }
215
+ );
216
+ }
217
+ state.mood.secondaryLamp.type = 3
218
+ state.secondaryNode = state.mood.secondaryLamp.nodes[0]
219
+ state.mood.secondaryLamp.enable = enable
220
+ }} />
221
+ {state.mood.secondaryLamp.enable &&
222
+ <>
223
+ <ColorAdjustView
224
+ reserveSV={true}
225
+ h={state.secondaryNode.h}
226
+ s={state.secondaryNode.s}
227
+ v={state.secondaryNode.v}
228
+ onHSVChange={(h, s, v) => {
229
+ state.secondaryNode.h = h
230
+ state.secondaryNode.s = s
231
+ state.secondaryNode.v = v
232
+ }}
233
+ onHSVChangeComplete={(h, s, v) => {
234
+ state.secondaryNode.h = h
235
+ state.secondaryNode.s = s
236
+ state.secondaryNode.v = v
237
+ }} />
238
+ <Spacer />
239
+ </>
240
+ }
241
+ </Card>}
197
242
  <Spacer />
198
243
  {!!(moduleParams.isFanLight || moduleParams.isUVCFan) && (
199
244
  <FanAdjustView
@@ -223,7 +268,7 @@ const StaticMoodEditorPage = () => {
223
268
  method: 'confirm',
224
269
  title: I18n.getLang('string_light_pp_dialog_sm_ed_headline_d'),
225
270
  subTitle: I18n.getLang(`strip_light_static_mood_edit_dialog_text`),
226
- onConfirm: async (_, {close})=>{
271
+ onConfirm: async (_, { close }) => {
227
272
  close();
228
273
  state.loading = true;
229
274
  const res = await params.modDeleteMood('del', state.mood);
@@ -102,7 +102,7 @@ export const useRandomTime: UseFixedTimeType = (dpKey: string, isPlug?: boolean,
102
102
  }
103
103
  }
104
104
  })
105
- }, 250)
105
+ }, 200)
106
106
 
107
107
  return () => clearTimeout(randomTimer)
108
108
  }, [randomTimeDp])
@@ -195,7 +195,7 @@ const randomTimeDp2Obj = (randomDp: string, isPlug?: boolean) => {
195
195
  brightness,
196
196
  temperature
197
197
  },
198
- isColorMode: !!(h && s && v)
198
+ isColorMode: !!(h !== 0 || s !== 0 || v !== 0)
199
199
  }
200
200
  })
201
201
  return {
@@ -35,21 +35,28 @@ const RandomTimeDetailPage = () => {
35
35
  const is24Hour = useSystemTimeFormate()
36
36
  const state = useReactive({
37
37
  loading: false,
38
- isColorMode: false,
39
- randomTime: cloneDeep(params.scheduleItem)
38
+ randomTime: cloneDeep(params.scheduleItem),
39
+ initRandomTime: cloneDeep(params.scheduleItem)
40
40
  })
41
41
 
42
42
  useEffect(() => {
43
43
  if (!params.isPlug && state.randomTime.color) {
44
44
  const { brightness, temperature, h, s, v } = state.randomTime.color
45
45
  const isColor = brightness === 0 && temperature === 0 && (h !== 0 || s !== 0 || v !== 0)
46
- state.isColorMode = isColor
46
+ state.randomTime.isColorMode = isColor
47
+ if (isColor) {
48
+ state.randomTime.color.brightness = 100;
49
+ } else {
50
+ state.randomTime.color.s = 100;
51
+ state.randomTime.color.v = 100;
52
+ }
53
+ state.initRandomTime = cloneDeep(state.randomTime)
47
54
  }
48
55
  }, [])
49
56
 
50
57
  const checkItemChanged = useMemo(() =>{
51
- return isEqual(state.randomTime, params.scheduleItem)
52
- }, [params.scheduleItem, JSON.stringify(state.randomTime)])
58
+ return isEqual(state.randomTime, state.initRandomTime)
59
+ }, [JSON.stringify(state.initRandomTime), JSON.stringify(state.randomTime)])
53
60
 
54
61
  const canSubmit = useMemo(() => {
55
62
  return state.randomTime.name?.length > 0 && state.randomTime.name?.length < 33 && !checkItemChanged && state.randomTime.channel !== undefined
@@ -85,11 +92,11 @@ const RandomTimeDetailPage = () => {
85
92
  }
86
93
  if (!params.isPlug && state.randomTime.color) {
87
94
  editRandomTime.color = {
88
- h: state.isColorMode ? state.randomTime.color?.h : 0,
89
- s: state.isColorMode ? state.randomTime.color?.s : 0,
90
- v: state.isColorMode ? state.randomTime.color?.v : 0,
91
- temperature: state.isColorMode ? 0 : state.randomTime.color?.temperature,
92
- brightness: state.isColorMode ? 0 : state.randomTime.color?.brightness
95
+ h: state.randomTime.isColorMode ? state.randomTime.color?.h : 0,
96
+ s: state.randomTime.isColorMode ? state.randomTime.color?.s : 0,
97
+ v: state.randomTime.isColorMode ? state.randomTime.color?.v : 0,
98
+ temperature: state.randomTime.isColorMode ? 0 : state.randomTime.color?.temperature,
99
+ brightness: state.randomTime.isColorMode ? 0 : state.randomTime.color?.brightness
93
100
  }
94
101
  }
95
102
  const res = await params.onPost(params.mode, editRandomTime)
@@ -184,9 +191,9 @@ const RandomTimeDetailPage = () => {
184
191
  isSupportColor={!!params.isSupportColor}
185
192
  isSupportBrightness={!!params.isSupportBrightness}
186
193
  isSupportTemperature={!!params.isSupportTemperature}
187
- isColorMode={state.isColorMode}
194
+ isColorMode={state.randomTime.isColorMode ?? false}
188
195
  reserveSV={true}
189
- setIsColorMode={(v) => state.isColorMode = v}
196
+ setIsColorMode={(v) => state.randomTime.isColorMode = v}
190
197
  h={state.randomTime.color.h}
191
198
  s={state.randomTime.color.s}
192
199
  v={state.randomTime.color.v}
@@ -9,6 +9,7 @@ import { useParams } from '@ledvance/base/src/hooks/Hooks';
9
9
  import Card from '@ledvance/base/src/components/Card';
10
10
  import Spacer from '@ledvance/base/src/components/Spacer';
11
11
  import { Utils } from 'tuya-panel-kit'
12
+ import {showDialog} from "@ledvance/base/src/utils/common";
12
13
 
13
14
  const { convertX: cx } = Utils.RatioUtils
14
15
 
@@ -38,9 +39,26 @@ const RemoteControlPage = () => {
38
39
  colorAlpha={1}
39
40
  enable={remoteControl}
40
41
  setEnable={async v => {
41
- state.loading = true;
42
- await setRemoteControl(v);
43
- state.loading = false;
42
+ if (state.loading) {
43
+ return
44
+ }
45
+ if (v) {
46
+ showDialog({
47
+ method: 'confirm',
48
+ title: I18n.getLang('Remotecontrol_Title'),
49
+ subTitle: I18n.getLang('Remotecontrol_description'),
50
+ onConfirm: async (_, { close }) => {
51
+ close()
52
+ state.loading = true
53
+ await setRemoteControl(v)
54
+ state.loading = false
55
+ }
56
+ })
57
+ } else {
58
+ state.loading = true
59
+ await setRemoteControl(v)
60
+ state.loading = false
61
+ }
44
62
  }}
45
63
  />
46
64
  </Card>
@@ -121,7 +121,7 @@ const wakeUpDp2Obj = (dp: string): WakeUpData | undefined => {
121
121
  enable, weeks, delay, hour, minute, h, s, v, brightness, temperature, last, nodeHex, isSleep: false,
122
122
  startTime,
123
123
  endTime,
124
- isColorMode: !!(h && s && v)
124
+ isColorMode: !!(h !== 0 || s !== 0 || v !== 0)
125
125
  }
126
126
  })
127
127
  return {
@@ -266,7 +266,7 @@ export const sleepDp2Obj = (dp: string): SleepData | undefined => {
266
266
  enable, weeks, delay, hour, minute, h, s, v, brightness, temperature, nodeHex, isSleep: true,
267
267
  startTime,
268
268
  endTime,
269
- isColorMode: !!(h && s && v)
269
+ isColorMode: !!(h !== 0 || s !== 0 || v !== 0)
270
270
  }
271
271
  })
272
272
  return {
@@ -19,8 +19,9 @@ export const defMixDeviceData = {
19
19
 
20
20
  export const defStripDeviceData = {
21
21
  ...defDeviceData,
22
- activeKey: 0,
22
+ activeKey: 1,
23
23
  colors: ColorList[0],
24
+ colorDiskActiveKey: 0
24
25
  };
25
26
 
26
27
  export const getTimeSchedule = async (deviceId: string): Promise<Timer[]> => {
@@ -42,7 +42,7 @@ import ManualSettings from './components/ManuaSettings';
42
42
  import { defDeviceData, defMixDeviceData, defStripDeviceData } from './TimeScheduleActions';
43
43
  import MoodItem from '../mood/MoodItem';
44
44
  import { getRemoteMoodList } from '../mood/MoodActions';
45
- import { MoodUIInfo } from '@ledvance/ui-biz-bundle/src/newModules/mood/Interface';
45
+ import { MoodUIInfo } from '../mood/Interface';
46
46
  import Summary from '@ledvance/base/src/components/Summary'
47
47
 
48
48
  const { convertX: cx } = Utils.RatioUtils;
@@ -161,11 +161,8 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
161
161
  if (typeof time === 'number') {
162
162
  return `${toFixedString(Math.trunc(time / 60), 2)}:${toFixedString(time % 60, 2)}`;
163
163
  }
164
- if (typeof time === 'string') {
165
- const t = time.split(':');
166
- return Number(t[0]) * 60 + Number(t[1]);
167
- }
168
- return time;
164
+ const t = time.split(':');
165
+ return Number(t[0]) * 60 + Number(t[1]);
169
166
  }, []);
170
167
 
171
168
  const isModify = useMemo(() => {
@@ -460,6 +457,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
460
457
  isSupportBrightness={params.isSupportBrightness}
461
458
  isSupportTemperature={params.isSupportTemperature}
462
459
  isStripLight={params.isStripLight}
460
+ isCeilingLight={params.isCeilingLight}
463
461
  manualData={state.manualData}
464
462
  onManualChange={manual => {
465
463
  state.manualData = {
@@ -622,15 +620,19 @@ const newTimeSchedule = () => {
622
620
 
623
621
  const getDefaultManual = (props: TimeScheduleDetailPageParams): ComponentConfig => {
624
622
  const deviceType =
625
- props.isStripLight || props.isCeilingLight
623
+ props.isStripLight
626
624
  ? DeviceType.StripLight
627
625
  : props.isMixLight
628
626
  ? DeviceType.MixLight
629
627
  : props.isPowerStrip
630
628
  ? DeviceType.PowerStrip
631
- : DeviceType.LightSource;
629
+ : props.isFanLight
630
+ ? DeviceType.FanLight
631
+ : props.isCeilingLight
632
+ ? DeviceType.CeilingLight
633
+ : DeviceType.LightSource
632
634
  const deviceData =
633
- deviceType === DeviceType.StripLight
635
+ (deviceType === DeviceType.StripLight || deviceType === DeviceType.CeilingLight)
634
636
  ? defStripDeviceData
635
637
  : deviceType === DeviceType.MixLight
636
638
  ? defMixDeviceData
@@ -194,7 +194,7 @@ const TimeSchedulePage = (props: { theme?: any }) => {
194
194
  iconStyle={{ tintColor: props.theme.global.warning }}
195
195
  />
196
196
  )}
197
- {params.applyForList.length > 1 && !!state.originList.length && showTags}
197
+ {params.applyForList.length > 1 && !!state.originList.length && !(params.isCeilingLight || params.isMixLight) && showTags}
198
198
  {state.timeScheduleList.length > 0 ? <FlatList
199
199
  data={state.timeScheduleList}
200
200
  renderItem={({ item }) => (
@@ -72,7 +72,7 @@ function ManualSettings(props: ManualSettingProps) {
72
72
  <View key={item.dp}>
73
73
  <Card style={{ marginHorizontal: cx(24) }}>
74
74
  <LdvSwitch
75
- title={item.key}
75
+ title={item.name || item.key}
76
76
  color={props.theme.card.background}
77
77
  colorAlpha={1}
78
78
  enable={item.enable}
@@ -253,7 +253,7 @@ function ManualSettings(props: ManualSettingProps) {
253
253
  const deviceData = state.deviceData as StripLightData
254
254
  return (
255
255
  <View>
256
- <Card>
256
+ <Card style={{ marginHorizontal: cx(24) }}>
257
257
  <LdvSwitch
258
258
  title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
259
259
  color={props.theme.card.background}