@ledvance/ui-biz-bundle 1.1.107 → 1.1.108
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
|
@@ -43,8 +43,9 @@ const MoodPage = (props: { theme?: ThemeType }) => {
|
|
|
43
43
|
const [moodInfo, setMoodInfo] = useMoodScene(params);
|
|
44
44
|
const [moods, setMoods] = useMoods();
|
|
45
45
|
const [mainWork, setMainWork] = useWorkMode(params.mainWorkMode);
|
|
46
|
-
const [secondaryWork
|
|
46
|
+
const [secondaryWork] = useWorkMode(params.secondaryWorkMode!);
|
|
47
47
|
const [switchLed] = useSwitchLed(params.switchLedDp)
|
|
48
|
+
const [, setSecondarySwitch] = useSwitchLed(params.secondarySwitch!)
|
|
48
49
|
const [flagMode, setFlagMode] = useFlagMode();
|
|
49
50
|
const [sceneStatusId, setSceneStatusId] = useSceneStatusId({
|
|
50
51
|
isSupportSceneStatus: params.isSupportSceneStatus,
|
|
@@ -231,8 +232,8 @@ const MoodPage = (props: { theme?: ThemeType }) => {
|
|
|
231
232
|
setMainWork(work).then();
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
|
-
if (params.isCeilingLight && params.secondaryWorkMode
|
|
235
|
-
|
|
235
|
+
if (params.isCeilingLight && params.secondaryWorkMode) {
|
|
236
|
+
setSecondarySwitch(false)
|
|
236
237
|
}
|
|
237
238
|
}
|
|
238
239
|
return {
|
|
@@ -274,12 +274,22 @@ function ManualSettings(props: ManualSettingProps) {
|
|
|
274
274
|
|
|
275
275
|
const stripLightCard = useMemo(() => {
|
|
276
276
|
const deviceData = state.deviceData as StripLightData
|
|
277
|
+
const getBlockColor = () => {
|
|
278
|
+
if (deviceData.activeKey === 1) {
|
|
279
|
+
const s = Math.round(mapFloatToRange(state.deviceData.s / 100, 30, 100))
|
|
280
|
+
return hsv2Hex(state.deviceData.h, s, 100)
|
|
281
|
+
}
|
|
282
|
+
if (deviceData.activeKey === 0) {
|
|
283
|
+
return cctToColor(state.deviceData.temperature)
|
|
284
|
+
}
|
|
285
|
+
return props.theme?.card.background
|
|
286
|
+
}
|
|
277
287
|
return (
|
|
278
288
|
<View>
|
|
279
289
|
<Card style={{ marginHorizontal: cx(24) }}>
|
|
280
290
|
<LdvSwitch
|
|
281
291
|
title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
|
|
282
|
-
color={
|
|
292
|
+
color={getBlockColor()}
|
|
283
293
|
colorAlpha={1}
|
|
284
294
|
enable={state.applyForList[0]?.enable}
|
|
285
295
|
setEnable={(enable: boolean) => {
|