@ledvance/base 1.3.9 → 1.3.11
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/localazy.json +4 -1
- package/localazy.keys.json +4 -3
- package/package.json +1 -1
- package/src/components/AdvanceList.tsx +3 -3
- package/src/components/ApplyForDeviceItem.tsx +17 -3
- package/src/components/BatteryStateView.tsx +3 -3
- package/src/components/Stepper.tsx +1 -1
- package/src/components/TextField.tsx +1 -1
- package/src/components/ldvSwitch.tsx +2 -2
- package/src/components/ldvTopName.tsx +1 -1
- package/src/i18n/strings.ts +254 -167
- package/translateKey.txt +3 -0
package/localazy.json
CHANGED
|
@@ -900,7 +900,10 @@
|
|
|
900
900
|
"MATCH:thermostat_maxtime",
|
|
901
901
|
"MATCH:thermostat_schedule",
|
|
902
902
|
"MATCH:thermostat_unit",
|
|
903
|
-
"MATCH:thermostat_comforttemp"
|
|
903
|
+
"MATCH:thermostat_comforttemp",
|
|
904
|
+
"MATCH:mood_resetbutton",
|
|
905
|
+
"MATCH:reset_mooddescription",
|
|
906
|
+
"MATCH:settings_wateralarmrecovery"
|
|
904
907
|
],
|
|
905
908
|
"replacements": {
|
|
906
909
|
"REGEX:% %1\\$s.*?\\)%": "{0}",
|
package/localazy.keys.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import AdvanceCard, { AdvancedData } from './AdvanceCard'
|
|
|
4
4
|
import Spacer from './Spacer'
|
|
5
5
|
import { useNavigation } from '@react-navigation/core'
|
|
6
6
|
import { Utils } from 'tuya-panel-kit'
|
|
7
|
-
import { getMicrophoneAccess } from '
|
|
7
|
+
import { getMicrophoneAccess } from '../api/native'
|
|
8
8
|
|
|
9
9
|
const { convertX: cx } = Utils.RatioUtils
|
|
10
10
|
|
|
@@ -27,7 +27,7 @@ function AdvanceList(props: AdvanceListProps) {
|
|
|
27
27
|
onPress={async () => {
|
|
28
28
|
if(MusicRouterKey.includes(item.router.key)){
|
|
29
29
|
getMicrophoneAccess().then(res =>{
|
|
30
|
-
if(!res) return
|
|
30
|
+
if(!res) return
|
|
31
31
|
navigation.navigate(item.router.key, item.router.params)
|
|
32
32
|
})
|
|
33
33
|
}else{
|
|
@@ -77,4 +77,4 @@ const styles = StyleSheet.create({
|
|
|
77
77
|
},
|
|
78
78
|
})
|
|
79
79
|
|
|
80
|
-
export default React.memo(AdvanceList)
|
|
80
|
+
export default React.memo(AdvanceList)
|
|
@@ -5,6 +5,9 @@ import { DeviceInfo } from '../api/native'
|
|
|
5
5
|
import Spacer from './Spacer'
|
|
6
6
|
import res from '../res'
|
|
7
7
|
import ThemeType from '../config/themeType'
|
|
8
|
+
import { getGlobalParamsDp } from '../utils/common'
|
|
9
|
+
import I18n from '../i18n'
|
|
10
|
+
import { isNumber } from 'lodash'
|
|
8
11
|
|
|
9
12
|
const cx = Utils.RatioUtils.convertX
|
|
10
13
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -15,6 +18,9 @@ export interface ApplyForDeviceItemProps {
|
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const ApplyForDeviceItem = (props: ApplyForDeviceItemProps) => {
|
|
21
|
+
const { dps } = props.deviceInfo
|
|
22
|
+
const curPowerDp = getGlobalParamsDp('cur_power')
|
|
23
|
+
const curPower = dps && JSON.parse(dps) && JSON.parse(dps)[curPowerDp]
|
|
18
24
|
|
|
19
25
|
const styles = StyleSheet.create({
|
|
20
26
|
root: {
|
|
@@ -59,8 +65,12 @@ const ApplyForDeviceItem = (props: ApplyForDeviceItemProps) => {
|
|
|
59
65
|
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
60
66
|
},
|
|
61
67
|
offlineIcon: {
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
minWidth: cx(24),
|
|
69
|
+
minHeight: cx(24)
|
|
70
|
+
},
|
|
71
|
+
onlineText: {
|
|
72
|
+
color: props.theme?.global.fontColor,
|
|
73
|
+
fontSize: cx(14),
|
|
64
74
|
}
|
|
65
75
|
})
|
|
66
76
|
|
|
@@ -78,8 +88,12 @@ const ApplyForDeviceItem = (props: ApplyForDeviceItemProps) => {
|
|
|
78
88
|
</View>
|
|
79
89
|
<Spacer height={cx(6)} />
|
|
80
90
|
</View>
|
|
81
|
-
<View style={[styles.offlineIcon, {
|
|
91
|
+
<View style={[styles.offlineIcon, {marginHorizontal: cx(5)}]}>
|
|
82
92
|
{!props.deviceInfo.status && <Image style={styles.offlineIcon} source={res.offline_wifi} />}
|
|
93
|
+
{!!props.deviceInfo.status && isNumber(curPower) && <View style={{alignItems: 'flex-end'}}>
|
|
94
|
+
<Text style={styles.onlineText}>{`${curPower / 10} W`}</Text>
|
|
95
|
+
<Text style={[styles.onlineText, {fontSize: cx(12),marginTop: cx(5)}]}>{I18n.getLang('consumption_data_field1_headline_text')}</Text>
|
|
96
|
+
</View>}
|
|
83
97
|
</View>
|
|
84
98
|
</View>
|
|
85
99
|
)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Card from '
|
|
2
|
+
import Card from './Card';
|
|
3
3
|
import { Battery, Utils } from 'tuya-panel-kit';
|
|
4
4
|
import { View, Text, StyleSheet } from 'react-native';
|
|
5
|
-
import I18n from '
|
|
6
|
-
import Spacer from '
|
|
5
|
+
import I18n from '../i18n';
|
|
6
|
+
import Spacer from './Spacer';
|
|
7
7
|
|
|
8
8
|
const cx = Utils.RatioUtils.convertX;
|
|
9
9
|
type BatteryProps = {
|
|
@@ -69,7 +69,7 @@ const TextField = (props: TextFieldProps) => {
|
|
|
69
69
|
<Text style={[styles.topTip, { opacity: (!!props.value) ? 1 : 0 }]}>{props.placeholder}</Text>
|
|
70
70
|
<View style={styles.textInputGroup}>
|
|
71
71
|
<TextInput{...props} style={styles.textInput} />
|
|
72
|
-
{!!props.value &&
|
|
72
|
+
{!!props.value && props.editable &&
|
|
73
73
|
<TouchableOpacity
|
|
74
74
|
style={styles.iconTouchable}
|
|
75
75
|
onPress={() => {
|
|
@@ -9,7 +9,7 @@ const { withTheme } = Utils.ThemeUtils
|
|
|
9
9
|
interface Prop {
|
|
10
10
|
theme?: ThemeType
|
|
11
11
|
title: string
|
|
12
|
-
color
|
|
12
|
+
color?: string
|
|
13
13
|
colorAlpha: number
|
|
14
14
|
enable: boolean
|
|
15
15
|
setEnable: (enable: boolean) => void
|
|
@@ -24,7 +24,7 @@ const LdvSwitch = (props: Prop) => {
|
|
|
24
24
|
<View style={{flexDirection: 'column', flex: 1}}>
|
|
25
25
|
<View style={{flexDirection: 'row', alignItems: 'center'}}>
|
|
26
26
|
<Text style={{...styles.title, color: props.theme?.global.fontColor}}>{title}</Text>
|
|
27
|
-
<View style={[styles.colorBlock, {backgroundColor: color, opacity: colorAlpha}]}/>
|
|
27
|
+
<View style={[styles.colorBlock, {backgroundColor: color || props.theme?.card.background, opacity: colorAlpha}]}/>
|
|
28
28
|
</View>
|
|
29
29
|
{description && <Text style={{color: props.theme?.global.fontColor}}>{description}</Text>}
|
|
30
30
|
</View>
|