@ledvance/ui-biz-bundle 1.1.120 → 1.1.122
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
|
@@ -122,7 +122,7 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
122
122
|
}, [state.totalElectricity, state.energyGeneration.totalElectricity])
|
|
123
123
|
|
|
124
124
|
useUpdateEffect(() =>{
|
|
125
|
-
if(totalElectricity
|
|
125
|
+
if(totalElectricity >= 0 && timeZoneCity){
|
|
126
126
|
const letOut = carbonDioxideEmission(timeZoneCity, countryAndRegion) || 0
|
|
127
127
|
state.co2Saved = localeNumber((letOut * totalElectricity) / 1000, 4)
|
|
128
128
|
}
|
|
@@ -12,7 +12,7 @@ import ThemeType from '@ledvance/base/src/config/themeType'
|
|
|
12
12
|
import dayjs from "dayjs";
|
|
13
13
|
import {EnergyHistory} from "../EnergyConsumptionActions";
|
|
14
14
|
|
|
15
|
-
const { convertX: cx, height } = Utils.RatioUtils
|
|
15
|
+
const { convertX: cx, height, statusBarHeight } = Utils.RatioUtils
|
|
16
16
|
const { withTheme } = Utils.ThemeUtils
|
|
17
17
|
|
|
18
18
|
export const UnitList = [
|
|
@@ -264,7 +264,7 @@ const EnergyModal = (props: EnergyModalProps) => {
|
|
|
264
264
|
</View>
|
|
265
265
|
),
|
|
266
266
|
wrapperStyle: {
|
|
267
|
-
height: height - cx(40),
|
|
267
|
+
height: height - statusBarHeight - cx(40),
|
|
268
268
|
backgroundColor: props.theme?.global.background
|
|
269
269
|
},
|
|
270
270
|
footer: (<View style={{ backgroundColor: props.theme?.global.background}}></View>),
|
|
@@ -326,7 +326,7 @@ const EnergyModal = (props: EnergyModalProps) => {
|
|
|
326
326
|
<Text style={{ color: props.theme?.button.primary, fontSize: cx(16) }}>{props.confirmText}</Text>
|
|
327
327
|
</TouchableOpacity>
|
|
328
328
|
</View>
|
|
329
|
-
<View style={{ height: height - cx(100), paddingHorizontal: cx(16), backgroundColor: props.theme?.global.background }}>
|
|
329
|
+
<View style={{ height: height - statusBarHeight - cx(100), paddingHorizontal: cx(16), backgroundColor: props.theme?.global.background }}>
|
|
330
330
|
{getContent()}
|
|
331
331
|
</View>
|
|
332
332
|
</ScrollView>
|
|
@@ -98,8 +98,8 @@ export const getRemoteMoodList = async (
|
|
|
98
98
|
) => {
|
|
99
99
|
const isFeature = !(option.isCeilingLight || option.isStringLight || option.isStripLight);
|
|
100
100
|
const moodFeatureId = isFeature ? (option.isMixLight ? MixLightSceneListFeatureId : SceneFeatureId) : (option.isCeilingLight ? SceneFeatureId : featureId)
|
|
101
|
+
const defScene = getDefMoodList(option)
|
|
101
102
|
if (isRefresh){
|
|
102
|
-
const defScene = getDefMoodList(option)
|
|
103
103
|
const res = await setRemoteMoodList(devId, isFeature, defScene, featureId)
|
|
104
104
|
if (res.success){
|
|
105
105
|
return {
|
|
@@ -117,7 +117,7 @@ export const getRemoteMoodList = async (
|
|
|
117
117
|
const result = await setRemoteMoodList(
|
|
118
118
|
devId,
|
|
119
119
|
isFeature,
|
|
120
|
-
|
|
120
|
+
defScene,
|
|
121
121
|
moodFeatureId
|
|
122
122
|
);
|
|
123
123
|
if (!result.success) {
|
|
@@ -125,7 +125,7 @@ export const getRemoteMoodList = async (
|
|
|
125
125
|
}
|
|
126
126
|
return {
|
|
127
127
|
success: true,
|
|
128
|
-
data:
|
|
128
|
+
data: defScene.map((item, index) => remoteMoodInfo2MoodUIState(item, index, option)),
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
return {
|
|
@@ -144,12 +144,11 @@ export const getRemoteMoodList = async (
|
|
|
144
144
|
};
|
|
145
145
|
} else {
|
|
146
146
|
if (res.msg?.includes('资源未找到') || !isNormalData) {
|
|
147
|
-
const
|
|
148
|
-
const res = await setRemoteMoodList(devId, isFeature, defaultScene, moodFeatureId);
|
|
147
|
+
const res = await setRemoteMoodList(devId, isFeature, defScene, moodFeatureId);
|
|
149
148
|
if (res.success) {
|
|
150
149
|
return {
|
|
151
150
|
success: true,
|
|
152
|
-
data:
|
|
151
|
+
data: defScene.map((item, index) =>
|
|
153
152
|
remoteMoodInfo2MoodUIState(item, index, option)
|
|
154
153
|
),
|
|
155
154
|
};
|