@ledvance/ui-biz-bundle 1.1.65 → 1.1.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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/navigation/Routers.ts +1 -0
  3. package/src/newModules/biorhythm/BiorhythmPage.tsx +11 -7
  4. package/src/newModules/fixedTime/FixedTimePage.tsx +4 -3
  5. package/src/newModules/mood/DynamicMoodEditorPage.tsx +16 -24
  6. package/src/newModules/mood/Interface.ts +1 -0
  7. package/src/newModules/mood/MixDynamicMoodEditor.tsx +40 -41
  8. package/src/newModules/mood/MoodActions.ts +45 -48
  9. package/src/newModules/mood/MoodInfo.ts +34 -34
  10. package/src/newModules/mood/MoodItem.tsx +19 -7
  11. package/src/newModules/mood/MoodPage.tsx +31 -30
  12. package/src/newModules/mood/MoodParse.ts +2 -1
  13. package/src/newModules/mood/RecommendMoodItem.tsx +18 -5
  14. package/src/newModules/mood/Router.ts +6 -16
  15. package/src/newModules/mood/StaticMoodEditorPage.tsx +45 -105
  16. package/src/newModules/randomTime/RandomTimePage.tsx +4 -3
  17. package/src/newModules/remoteControl/RemoteControlActions.ts +6 -0
  18. package/src/newModules/remoteControl/RemoteControlPage.tsx +51 -0
  19. package/src/newModules/remoteControl/Router.ts +16 -0
  20. package/src/newModules/select/Route.ts +17 -0
  21. package/src/newModules/select/SelectPage.d.ts +12 -0
  22. package/src/newModules/select/SelectPage.tsx +138 -0
  23. package/src/newModules/sleepWakeUp/Interface.ts +70 -0
  24. package/src/newModules/sleepWakeUp/Router.ts +25 -0
  25. package/src/newModules/sleepWakeUp/SleepWakeUpActions.ts +317 -0
  26. package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +661 -0
  27. package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +456 -0
  28. package/src/newModules/sleepWakeUp/utils.ts +254 -0
  29. package/src/newModules/mood/tools.ts +0 -12
@@ -14,7 +14,7 @@ export const getDefaultMood = (): MoodInfo => {
14
14
  return {
15
15
  version: 0,
16
16
  // 场景号
17
- id: 0,
17
+ id: -1,
18
18
  // 主灯
19
19
  mainLamp: {
20
20
  // 变化方式
@@ -135,43 +135,35 @@ function getRGBDefSceneList(): RemoteMoodInfo[] {
135
135
  s: '',
136
136
  t: 0,
137
137
  e: false,
138
- },
139
- {
138
+ },
139
+ {
140
140
  n: I18n.getLang('mesh_device_detail_lighting_read'),
141
141
  i: '010e0d0000000000000003e803e8',
142
142
  s: '',
143
143
  t: 0,
144
144
  e: false,
145
- },
146
- {
145
+ },
146
+ {
147
147
  n: I18n.getLang('mesh_device_detail_lighting_work'),
148
148
  i: '020e0d0000000000000003e803e8',
149
149
  s: '',
150
150
  t: 0,
151
151
  e: false,
152
- },
153
- {
152
+ },
153
+ {
154
154
  n: I18n.getLang('mesh_device_detail_lighting_leisure'),
155
155
  i: '030e0d0000000000000001f403e8',
156
156
  s: '',
157
157
  t: 0,
158
158
  e: false,
159
- },
160
- {
159
+ },
160
+ {
161
161
  n: I18n.getLang('mesh_device_detail_lighting_color_mode'),
162
- i:
163
- '05464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000464601003d03e803e80000000046460100ae03e803e800000000464601011303e803e800000000',
162
+ i: '05464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000464601003d03e803e80000000046460100ae03e803e800000000464601011303e803e800000000',
164
163
  s: '',
165
164
  t: 0,
166
165
  e: false,
167
- },
168
- {
169
- n: I18n.getLang('mesh_device_detail_lighting_white_mode'),
170
- i: '0646460100000000000003e8000046460100000000000003e8019046460100000000000003e803e8',
171
- s: '',
172
- t: 0,
173
- e: false,
174
- },
166
+ },
175
167
  ...defColorSceneList,
176
168
  ];
177
169
  }
@@ -1454,6 +1446,16 @@ export type RecommendMood = {
1454
1446
  secondaryLamp?: MoodLampInfo;
1455
1447
  };
1456
1448
 
1449
+ const defStripConfig = {
1450
+ expand: 0,
1451
+ reserved1: 0,
1452
+ reserved2: 0,
1453
+ segmented: 0,
1454
+ loop: 0,
1455
+ excessive: 0,
1456
+ direction: 0,
1457
+ };
1458
+
1457
1459
  export function getRecommendMoods(
1458
1460
  isStatic: boolean,
1459
1461
  moduleParams: MoodPageParams
@@ -1697,6 +1699,7 @@ export function getRecommendMoods(
1697
1699
  fanEnable: true,
1698
1700
  fanSpeed: 1,
1699
1701
  enable: true,
1702
+ ...defStripConfig,
1700
1703
  nodes: [
1701
1704
  {
1702
1705
  h: 75,
@@ -1734,6 +1737,7 @@ export function getRecommendMoods(
1734
1737
  fanEnable: true,
1735
1738
  enable: true,
1736
1739
  fanSpeed: 1,
1740
+ ...defStripConfig,
1737
1741
  nodes: [
1738
1742
  {
1739
1743
  h: 40,
@@ -1771,6 +1775,7 @@ export function getRecommendMoods(
1771
1775
  fanEnable: true,
1772
1776
  fanSpeed: 1,
1773
1777
  enable: true,
1778
+ ...defStripConfig,
1774
1779
  nodes: [
1775
1780
  {
1776
1781
  h: 300,
@@ -1815,6 +1820,7 @@ export function getRecommendMoods(
1815
1820
  fanEnable: true,
1816
1821
  fanSpeed: 1,
1817
1822
  enable: true,
1823
+ ...defStripConfig,
1818
1824
  nodes: [
1819
1825
  {
1820
1826
  h: 0,
@@ -1852,6 +1858,7 @@ export function getRecommendMoods(
1852
1858
  fanEnable: true,
1853
1859
  fanSpeed: 1,
1854
1860
  enable: true,
1861
+ ...defStripConfig,
1855
1862
  nodes: [
1856
1863
  {
1857
1864
  h: 0,
@@ -1889,6 +1896,7 @@ export function getRecommendMoods(
1889
1896
  fanEnable: true,
1890
1897
  fanSpeed: 1,
1891
1898
  enable: true,
1899
+ ...defStripConfig,
1892
1900
  nodes: [
1893
1901
  {
1894
1902
  h: 0,
@@ -1933,6 +1941,7 @@ export function getRecommendMoods(
1933
1941
  fanEnable: true,
1934
1942
  fanSpeed: 1,
1935
1943
  enable: true,
1944
+ ...defStripConfig,
1936
1945
  nodes: [
1937
1946
  {
1938
1947
  h: 0,
@@ -1970,6 +1979,7 @@ export function getRecommendMoods(
1970
1979
  fanEnable: true,
1971
1980
  fanSpeed: 1,
1972
1981
  enable: true,
1982
+ ...defStripConfig,
1973
1983
  nodes: [
1974
1984
  {
1975
1985
  h: 0,
@@ -2007,6 +2017,7 @@ export function getRecommendMoods(
2007
2017
  fanEnable: true,
2008
2018
  fanSpeed: 1,
2009
2019
  enable: true,
2020
+ ...defStripConfig,
2010
2021
  nodes: [
2011
2022
  {
2012
2023
  h: 0,
@@ -2039,17 +2050,6 @@ export function getRecommendMoods(
2039
2050
  }
2040
2051
  }
2041
2052
 
2042
- const defSecondly = {
2043
- version: 0,
2044
- expand: 0,
2045
- reserved1: 0,
2046
- reserved2: 0,
2047
- segmented: 0,
2048
- loop: 0,
2049
- excessive: 0,
2050
- direction: 0,
2051
- };
2052
-
2053
2053
  export function getRecommendMixMoods(
2054
2054
  isStatic: boolean,
2055
2055
  moduleParams: MoodPageParams
@@ -2069,7 +2069,7 @@ export function getRecommendMixMoods(
2069
2069
  nodes: [{ h: 0, s: 0, v: 0, brightness: 100, colorTemp: 20, isColorNode: false }],
2070
2070
  },
2071
2071
  secondaryLamp: {
2072
- ...defSecondly,
2072
+ ...defStripConfig,
2073
2073
  enable: false,
2074
2074
  id: -1,
2075
2075
  speed: 100,
@@ -2087,7 +2087,7 @@ export function getRecommendMixMoods(
2087
2087
  nodes: [{ h: 0, s: 0, v: 0, brightness: 100, colorTemp: 40, isColorNode: false }],
2088
2088
  },
2089
2089
  secondaryLamp: {
2090
- ...defSecondly,
2090
+ ...defStripConfig,
2091
2091
  enable: false,
2092
2092
  id: -1,
2093
2093
  speed: 100,
@@ -2105,7 +2105,7 @@ export function getRecommendMixMoods(
2105
2105
  nodes: [{ h: 0, s: 0, v: 0, brightness: 100, colorTemp: 50, isColorNode: false }],
2106
2106
  },
2107
2107
  secondaryLamp: {
2108
- ...defSecondly,
2108
+ ...defStripConfig,
2109
2109
  enable: false,
2110
2110
  id: -1,
2111
2111
  speed: 100,
@@ -2133,7 +2133,7 @@ export function getRecommendMixMoods(
2133
2133
  ],
2134
2134
  },
2135
2135
  secondaryLamp: {
2136
- ...defSecondly,
2136
+ ...defStripConfig,
2137
2137
  id: 0,
2138
2138
  speed: 14,
2139
2139
  mode: moduleParams.isCeilingLight
@@ -7,27 +7,39 @@ import { mapFloatToRange } from '@ledvance/base/src/utils';
7
7
  import Card from '@ledvance/base/src/components/Card';
8
8
  import Spacer from '@ledvance/base/src/components/Spacer';
9
9
  import MoodColorsLine from '@ledvance/base/src/components/MoodColorsLine';
10
- import { MoodLampInfo, MoodUIInfo } from './Interface';
10
+ import { MoodJumpGradientMode, MoodLampInfo, MoodUIInfo } from './Interface';
11
11
  import I18n from '@ledvance/base/src/i18n';
12
12
  import res from '@ledvance/base/src/res';
13
13
 
14
14
  const cx = Utils.RatioUtils.convertX;
15
15
 
16
+ interface LightCategory {
17
+ isMixLight?: boolean
18
+ isStripLight?: boolean
19
+ isStringLight?: boolean
20
+ isCeilingLight?: boolean
21
+ }
22
+
16
23
  interface MoodItemProps extends ViewProps {
17
24
  enable: boolean;
18
25
  isMix: boolean;
19
26
  mood: MoodUIInfo;
20
27
  style?: ViewStyle;
28
+ deviceTypeOption?: LightCategory
21
29
  onPress?: () => void;
22
30
  onSwitch: (enable: boolean) => void;
23
31
  }
24
32
 
25
33
  const MoodItem = (props: MoodItemProps) => {
26
- const { mood, isMix } = props;
34
+ const { mood, isMix, deviceTypeOption } = props;
27
35
  const isDynamic = useMemo(() => {
28
36
  return mood.mainLamp.nodes?.length > 1 || mood.secondaryLamp.nodes?.length > 1;
29
37
  }, [mood.mainLamp.nodes, mood.secondaryLamp.nodes]);
30
38
 
39
+ const gradientMode = useMemo(() => (
40
+ deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : (deviceTypeOption?.isStripLight || deviceTypeOption?.isCeilingLight) ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
41
+ ), [MoodJumpGradientMode, deviceTypeOption])
42
+
31
43
  return (
32
44
  <Card style={[styles.card, props.style]} onPress={props.onPress}>
33
45
  <View>
@@ -41,11 +53,11 @@ const MoodItem = (props: MoodItemProps) => {
41
53
  />
42
54
  </View>
43
55
  <Spacer />
44
- <MixMoodColorsLine mixSubLight={mood.mainLamp} isMix={isMix} />
45
- {isMix && (
56
+ <MixMoodColorsLine mixSubLight={mood.mainLamp} isMix={isMix} type={mood.mainLamp.mode === gradientMode ? 'gradient' : 'separate'}/>
57
+ {(isMix && !!mood.secondaryLamp.nodes.length) && (
46
58
  <>
47
59
  <Spacer height={cx(7)} />
48
- <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} />
60
+ <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === gradientMode ? 'gradient' : 'separate'}/>
49
61
  </>
50
62
  )}
51
63
  <Spacer height={cx(12)} />
@@ -66,7 +78,7 @@ const MoodItem = (props: MoodItemProps) => {
66
78
 
67
79
  export default MoodItem;
68
80
 
69
- export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boolean }) {
81
+ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boolean, type: 'gradient' | 'separate' }) {
70
82
  const { mixSubLight, isMix } = props;
71
83
  const lightColors = !!(mixSubLight.enable && mixSubLight.nodes.length) ? mixSubLight.nodes?.map(n => {
72
84
  return n.isColorNode
@@ -79,7 +91,7 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
79
91
  <MoodColorsLine
80
92
  nodeStyle={{ borderColor: '#ccc', borderWidth: 1 }}
81
93
  width={isMix ? cx(264) : undefined}
82
- type={'separate'}
94
+ type={props.type}
83
95
  colors={lightColors}
84
96
  />
85
97
  {isMix && (
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useEffect } from 'react';
1
+ import React, { useCallback, useEffect, useMemo } from 'react';
2
2
  import Page from '@ledvance/base/src/components/Page';
3
3
  import { Utils } from 'tuya-panel-kit';
4
4
  import { saveMoodList, useWorkMode } from './MoodActions';
@@ -21,8 +21,8 @@ import { useNavigation } from '@react-navigation/core';
21
21
  import { MoodPageParams, MoodPageState, MoodUIInfo } from './Interface';
22
22
  import { getRemoteMoodList, useMoodScene } from './MoodActions';
23
23
  import { useParams } from '@ledvance/base/src/hooks/Hooks';
24
- import { RouterKey } from 'navigation/Router';
25
- import { cloneDeep } from 'lodash';
24
+ import { ui_biz_routerKey } from '../../navigation/Routers'
25
+ import { cloneDeep, filter, map } from 'lodash';
26
26
  import { saveFlagMode } from '@ledvance/ui-biz-bundle/src/modules/flags/FlagActions';
27
27
  import { WorkMode } from '@ledvance/base/src/utils/interface';
28
28
 
@@ -35,16 +35,7 @@ const MoodPage = () => {
35
35
  const deviceInfo = useDeviceInfo();
36
36
  const devId = useDeviceId();
37
37
  const navigation = useNavigation();
38
- const option = {
39
- isCeilingLight: params.isCeilingLight,
40
- isStripLight: params.isStripLight,
41
- isStringLight: params.isStringLight,
42
- isFanLight: params.isFanLight,
43
- isMixLight: params.isMixLight,
44
- isUVCFan: params.isUVCFan,
45
- isMatterLight: params.isMatterLight,
46
- };
47
- const [moodInfo, setMoodInfo] = useMoodScene(params.mainDp, option, params.secondaryDp);
38
+ const [moodInfo, setMoodInfo] = useMoodScene(params);
48
39
  const [moods, setMoods] = useMoods();
49
40
  const [mainWork, setMainWork] = useWorkMode(params.mainWorkMode);
50
41
  const [secondaryWork, setSecondaryWork] = useWorkMode(params.secondaryWorkMode!);
@@ -60,23 +51,28 @@ const MoodPage = () => {
60
51
  timerId: undefined as any,
61
52
  flag: Symbol(),
62
53
  });
54
+
55
+ const moodIds = useMemo(() => {
56
+ const mainIds = map(state.originMoods, 'id').filter(v => v !== undefined)
57
+ const secondaryIds = map(state.originMoods.map(m => m.secondaryLamp) || [], 'id')
58
+ return filter([...mainIds, ...secondaryIds], v => v !== undefined) as number[]
59
+ }, [JSON.stringify(state.originMoods)])
60
+
63
61
  useEffect(() => {
62
+ state.loading = true
64
63
  state.timerId = setTimeout(() => {
65
64
  getRemoteMoodList(
66
65
  devId,
67
- {
68
- ...option,
69
- isSupportBrightness: params.isSupportBrightness,
70
- isSupportColor: params.isSupportColor,
71
- isSupportTemperature: params.isSupportTemperature,
72
- },
66
+ params,
73
67
  params.featureId
74
68
  ).then(res => {
69
+ state.loading = false
75
70
  if (res.success && Array.isArray(res.data)) {
71
+ console.log(res.data, '< --- res.data')
76
72
  state.originMoods = cloneDeep(res.data);
77
73
  }
78
74
  });
79
- }, 400);
75
+ }, 250);
80
76
 
81
77
  return () => {
82
78
  clearTimeout(state.timerId);
@@ -98,18 +94,19 @@ const MoodPage = () => {
98
94
  const navigationRoute = (isStatic: boolean, mode: 'add' | 'edit', currentMood?: MoodUIInfo) => {
99
95
  const path =
100
96
  mode === 'add'
101
- ? RouterKey.ui_biz_mood_add
97
+ ? ui_biz_routerKey.ui_biz_mood_add
102
98
  : isStatic
103
- ? RouterKey.ui_biz_static_mood_edit
99
+ ? ui_biz_routerKey.ui_biz_static_mood_edit
104
100
  : !!(params.isMixLight || params.isCeilingLight)
105
- ? RouterKey.ui_biz_dynamic_mix_mood_edit
106
- : RouterKey.ui_biz_dynamic_mood_edit;
101
+ ? ui_biz_routerKey.ui_biz_dynamic_mix_mood_edit
102
+ : ui_biz_routerKey.ui_biz_dynamic_mood_edit;
107
103
  navigation.navigate(path, {
108
104
  mode,
109
105
  isStatic,
110
- moods: state.originMoods,
111
106
  currentMood,
112
107
  moduleParams: params,
108
+ moodIds,
109
+ nameRepeat,
113
110
  modDeleteMood,
114
111
  });
115
112
  };
@@ -139,7 +136,7 @@ const MoodPage = () => {
139
136
  },
140
137
  secondaryLamp: {
141
138
  ...currentMood.secondaryLamp,
142
- nodes: currentMood.secondaryLamp
139
+ nodes: currentMood.secondaryLamp && currentMood.secondaryLamp.nodes?.length
143
140
  ? currentMood.secondaryLamp.nodes.map(node => {
144
141
  if (mode !== 'del') {
145
142
  if (node.isColorNode) {
@@ -161,7 +158,7 @@ const MoodPage = () => {
161
158
  },
162
159
  };
163
160
  if (mode === 'set') {
164
- return setMoodInfo(checkedMood, params);
161
+ return setMoodInfo(checkedMood);
165
162
  }
166
163
  let newScene: MoodUIInfo[] = [];
167
164
  if (mode === 'add') {
@@ -177,7 +174,7 @@ const MoodPage = () => {
177
174
  });
178
175
  }
179
176
  const mood = mode === 'del' ? (newScene.length === 0 ? undefined : newScene[0]) : checkedMood;
180
- const res = await saveMoodList(devId, newScene, option, params.featureId);
177
+ const res = await saveMoodList(devId, newScene, params, params.featureId);
181
178
  if (res.success) {
182
179
  state.originMoods = cloneDeep(newScene);
183
180
  setMoods(cloneDeep(newScene));
@@ -196,7 +193,7 @@ const MoodPage = () => {
196
193
  };
197
194
  }
198
195
  }
199
- setMoodInfo(mood, params).then();
196
+ setMoodInfo(mood).then();
200
197
  } else {
201
198
  if (mainWork === WorkMode.Scene) {
202
199
  if (params.isCeilingLight) {
@@ -255,7 +252,7 @@ const MoodPage = () => {
255
252
 
256
253
  const getItemEnable = useCallback(
257
254
  (moodItem: MoodUIInfo) => {
258
- if (option.isCeilingLight) {
255
+ if (params.isCeilingLight) {
259
256
  return (
260
257
  moodInfo.mainLamp.id === moodItem.mainLamp.id &&
261
258
  moodInfo.secondaryLamp.id === moodItem.secondaryLamp.id &&
@@ -268,6 +265,10 @@ const MoodPage = () => {
268
265
  [moodInfo, mainWork]
269
266
  );
270
267
 
268
+ const nameRepeat = useCallback((mood: MoodUIInfo) => {
269
+ return !!state.originMoods.filter(m => !(params.isCeilingLight ? (m.mainLamp.id === mood.mainLamp.id && m.secondaryLamp.id === mood.secondaryLamp.id) : (m.id === mood.id))).find(m => m.name === mood.name)
270
+ }, [state.originMoods, params.isCeilingLight])
271
+
271
272
  return (
272
273
  <>
273
274
  <Page
@@ -6,7 +6,8 @@ const { nToHS, toFixed, sToN } = Utils;
6
6
 
7
7
  // light source
8
8
  export function dp2Obj(dp: string, isFan: boolean = false, isUVCFan?: boolean): MoodInfo {
9
- if (!dp) return getDefaultMood();
9
+ console.log(dp, '< ---- dppppp')
10
+ if (!dp || dp?.length <= 8) return getDefaultMood();
10
11
  let dpCopy = dp;
11
12
  let fanEnable: undefined | boolean = undefined;
12
13
  let fanSpeed: undefined | number = undefined;
@@ -1,23 +1,35 @@
1
- import React from 'react';
1
+ import React, { useMemo } from 'react';
2
2
  import { Utils } from 'tuya-panel-kit';
3
3
  import Card from '@ledvance/base/src/components/Card';
4
4
  import { CellContent } from '@ledvance/base/src/components/Cell';
5
5
  import { StyleSheet, View } from 'react-native';
6
6
  import Spacer from '@ledvance/base/src/components/Spacer';
7
- import { MoodUIInfo } from './Interface';
7
+ import { MoodJumpGradientMode, MoodUIInfo } from './Interface';
8
8
  import { MixMoodColorsLine } from './MoodItem';
9
9
 
10
10
  const cx = Utils.RatioUtils.convertX;
11
11
 
12
+ interface LightCategory {
13
+ isMixLight?: boolean
14
+ isStripLight?: boolean
15
+ isStringLight?: boolean
16
+ isCeilingLight?: boolean
17
+ }
18
+
12
19
  interface RecommendMixMoodItemProps {
13
20
  title: string;
14
21
  isMix: boolean;
15
22
  mood: MoodUIInfo;
23
+ deviceTypeOption?: LightCategory
16
24
  onPress: () => void;
17
25
  }
18
26
 
19
27
  const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
20
- const { mood, isMix } = props;
28
+ const { mood, isMix, deviceTypeOption } = props;
29
+
30
+ const gradientMode = useMemo(() => (
31
+ deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : (deviceTypeOption?.isStripLight || deviceTypeOption?.isCeilingLight) ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
32
+ ), [MoodJumpGradientMode, deviceTypeOption])
21
33
 
22
34
  return (
23
35
  <Card style={styles.root} onPress={props.onPress}>
@@ -34,9 +46,9 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
34
46
  {!!(mood.mainLamp) && (
35
47
  <>
36
48
  <View style={styles.lineStyle}>
37
- <MixMoodColorsLine mixSubLight={mood?.mainLamp} isMix={isMix} />
49
+ <MixMoodColorsLine mixSubLight={mood?.mainLamp} isMix={isMix} type={mood.mainLamp.mode === gradientMode ? 'gradient' : 'separate'}/>
38
50
  <Spacer height={cx(7)} />
39
- {isMix && <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} />}
51
+ {(isMix && !!mood.secondaryLamp.nodes.length) && <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === gradientMode ? 'gradient' : 'separate'}/>}
40
52
  </View>
41
53
  <Spacer height={cx(24)} />
42
54
  </>
@@ -54,6 +66,7 @@ const styles = StyleSheet.create({
54
66
  content: {
55
67
  height: cx(56),
56
68
  marginHorizontal: cx(16),
69
+ width: cx(295)
57
70
  },
58
71
  title: {
59
72
  color: '#000',
@@ -1,9 +1,8 @@
1
- import {NavigationRoute, TransitionPresets} from "tuya-panel-kit";
2
- import DynamicMoodEditorPage from "../../modules/mood/DynamicMoodEditorPage";
3
- import StaticMoodEditorPage from "../../modules/mood/StaticMoodEditorPage";
4
- import AddMoodPage from "../../modules/mood/AddMoodPage";
5
- import MoodPage from "../../modules/mood/MoodPage";
6
- import SelectPage from "../../modules/select/SelectPage";
1
+ import {NavigationRoute} from "tuya-panel-kit";
2
+ import DynamicMoodEditorPage from "./DynamicMoodEditorPage";
3
+ import StaticMoodEditorPage from "./StaticMoodEditorPage";
4
+ import AddMoodPage from "./AddMoodPage";
5
+ import MoodPage from "./MoodPage";
7
6
  import {ui_biz_routerKey} from "../../navigation/Routers";
8
7
 
9
8
  const MoodPageRouters: NavigationRoute[] = [
@@ -38,16 +37,7 @@ const MoodPageRouters: NavigationRoute[] = [
38
37
  hideTopbar: true,
39
38
  showOfflineView: false,
40
39
  },
41
- },
42
- {
43
- name: ui_biz_routerKey.ui_biz_select_page,
44
- component: SelectPage,
45
- options: {
46
- gesture: true,
47
- hideTopbar: true,
48
- ...TransitionPresets.ModalPresentationIOS,
49
- },
50
- },
40
+ }
51
41
  ]
52
42
 
53
43
  export default MoodPageRouters