@ledvance/group-ui-biz-bundle 1.0.8 → 1.0.9
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
|
@@ -110,7 +110,7 @@ const FlagPage = () => {
|
|
|
110
110
|
})
|
|
111
111
|
}
|
|
112
112
|
state.flags = cloneFlag
|
|
113
|
-
setFlags(cloneFlag)
|
|
113
|
+
setFlags(cloneDeep(cloneFlag))
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -187,7 +187,7 @@ const FlagPage = () => {
|
|
|
187
187
|
<FlatList
|
|
188
188
|
data={state.flags}
|
|
189
189
|
renderItem={({ item }) => <FlagItem
|
|
190
|
-
enable={flagState?.workMode === WorkMode.
|
|
190
|
+
enable={flagState?.workMode === (params.isStripLight ? WorkMode.COLOUR : WorkMode.SCENE) && flagId === item.id}
|
|
191
191
|
title={item.name}
|
|
192
192
|
colors={item.colors.map(item => hsv2Hex(item.h, item.s, item.v))}
|
|
193
193
|
onSwitch={async (enable) => {
|
|
@@ -19,6 +19,8 @@ import { showDeleteMoodDialog } from './tools'
|
|
|
19
19
|
import { MoodPageProps } from './MoodPage'
|
|
20
20
|
import { Result } from '@ledvance/base/src/models/modules/Result'
|
|
21
21
|
import { ui_biz_routerKey } from '../../navigation/Routers'
|
|
22
|
+
import {hsv2Hex, mapFloatToRange } from '@ledvance/base/src/utils'
|
|
23
|
+
import { cctToColor } from '@ledvance/base/src/utils/cctUtils'
|
|
22
24
|
|
|
23
25
|
const cx = Utils.RatioUtils.convertX
|
|
24
26
|
|
|
@@ -57,7 +59,13 @@ const StaticMoodEditorPage = () => {
|
|
|
57
59
|
}, [params.mode])
|
|
58
60
|
|
|
59
61
|
const getColorBlockColor = useCallback(() => {
|
|
60
|
-
|
|
62
|
+
const s = Math.round(mapFloatToRange(state.currentNode.s / 100, 30, 100))
|
|
63
|
+
if (state.currentNode.isColorNode) {
|
|
64
|
+
return hsv2Hex(state.currentNode.h, s, 100)
|
|
65
|
+
}
|
|
66
|
+
if (moduleParams.isSupportTemperature) {
|
|
67
|
+
return cctToColor(state.currentNode.colorTemp.toFixed())
|
|
68
|
+
}
|
|
61
69
|
}, [state.currentNode.colorTemp])
|
|
62
70
|
|
|
63
71
|
const getButtonStatus = () => {
|
|
@@ -248,4 +256,4 @@ const styles = StyleSheet.create({
|
|
|
248
256
|
},
|
|
249
257
|
})
|
|
250
258
|
|
|
251
|
-
export default StaticMoodEditorPage
|
|
259
|
+
export default StaticMoodEditorPage
|