@ledvance/base 1.3.60 → 1.3.62
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 +1 -1
- package/src/api/native.ts +1 -0
- package/src/components/BatteryPercentageView.tsx +13 -8
- package/src/composeLayout.tsx +1 -0
- package/src/i18n/strings.ts +783 -783
- package/src/models/modules/NativePropsSlice.tsx +10 -1
- package/src/res/index.ts +3 -1
- package/src/components/PressActionView.tsx +0 -159
package/package.json
CHANGED
package/src/api/native.ts
CHANGED
|
@@ -17,7 +17,7 @@ type BatteryProps = {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const BatteryPercentageView = (props: BatteryProps) => {
|
|
20
|
-
const {value, middleValue =
|
|
20
|
+
const {value, middleValue = 10, highValue = 90} = props
|
|
21
21
|
const calcColor = (_: any, normalColor: string, lowColor: string, emptyColor: string) => {
|
|
22
22
|
if (value >= highValue) {
|
|
23
23
|
return normalColor
|
|
@@ -34,12 +34,13 @@ const BatteryPercentageView = (props: BatteryProps) => {
|
|
|
34
34
|
marginVertical: cx(18),
|
|
35
35
|
color: props.theme?.global.fontColor,
|
|
36
36
|
fontSize: cx(16),
|
|
37
|
+
fontWeight: 'bold',
|
|
37
38
|
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
38
39
|
},
|
|
39
40
|
batteryRotate: {
|
|
40
|
-
transform: [{rotate: '90deg'}],
|
|
41
|
+
transform: [{ rotate: '90deg' }],
|
|
41
42
|
position: 'relative',
|
|
42
|
-
right: cx(30)
|
|
43
|
+
right: cx(30)
|
|
43
44
|
},
|
|
44
45
|
content: {
|
|
45
46
|
marginEnd: cx(16),
|
|
@@ -54,17 +55,21 @@ const BatteryPercentageView = (props: BatteryProps) => {
|
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
57
|
<Card
|
|
57
|
-
style={{marginHorizontal: cx(24)
|
|
58
|
-
containerStyle={{flexDirection: 'row', alignItems: 'center'}}
|
|
58
|
+
style={{ marginHorizontal: cx(24) }}
|
|
59
|
+
containerStyle={{ flexDirection: 'row', alignItems: 'center' }}
|
|
59
60
|
>
|
|
60
|
-
<Text
|
|
61
|
-
|
|
61
|
+
<Text
|
|
62
|
+
style={styles.title}>
|
|
63
|
+
{I18n.getLang('motion_detector_battery__state4')}
|
|
64
|
+
</Text>
|
|
65
|
+
<Spacer height={0} style={{ flex: 1 }} />
|
|
62
66
|
<View style={styles.batteryRotate}>
|
|
63
67
|
<Battery
|
|
64
68
|
value={props.value}
|
|
65
69
|
onCalcColor={calcColor}
|
|
66
70
|
size={cx(30)}
|
|
67
|
-
theme={{batteryColor: props.theme?.global.secondFontColor || '#000'}}
|
|
71
|
+
theme={{ batteryColor: props.theme?.global.secondFontColor || '#000' }}
|
|
72
|
+
middleColor='#999999'
|
|
68
73
|
/>
|
|
69
74
|
</View>
|
|
70
75
|
<Text style={[styles.content, value <= middleValue ? styles.low : null]}>{value}%</Text>
|
package/src/composeLayout.tsx
CHANGED