@ledvance/base 1.2.99 → 1.3.0
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
|
@@ -4,12 +4,15 @@ 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 '@ledvance/base/src/api/native'
|
|
7
8
|
|
|
8
9
|
const { convertX: cx } = Utils.RatioUtils
|
|
9
10
|
|
|
11
|
+
const MusicRouterKey = ['ui_biz_music', 'group_ui_biz_music']
|
|
12
|
+
|
|
10
13
|
export interface AdvanceListProps {
|
|
11
14
|
advanceData: AdvancedData[],
|
|
12
|
-
onAdvanceItemClick?: (advanceData: AdvancedData, index: number) =>
|
|
15
|
+
onAdvanceItemClick?: (advanceData: AdvancedData, index: number) => void | undefined
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
function AdvanceList(props: AdvanceListProps) {
|
|
@@ -21,9 +24,15 @@ function AdvanceList(props: AdvanceListProps) {
|
|
|
21
24
|
<View style={styles.item}>
|
|
22
25
|
<AdvanceCard
|
|
23
26
|
data={item}
|
|
24
|
-
onPress={() => {
|
|
25
|
-
if
|
|
26
|
-
|
|
27
|
+
onPress={async () => {
|
|
28
|
+
if(MusicRouterKey.includes(item.router.key)){
|
|
29
|
+
getMicrophoneAccess().then(res =>{
|
|
30
|
+
if(!res) return
|
|
31
|
+
})
|
|
32
|
+
}else{
|
|
33
|
+
if (!onAdvanceItemClick || onAdvanceItemClick(item, index)) {
|
|
34
|
+
navigation.navigate(item.router.key, item.router.params)
|
|
35
|
+
}
|
|
27
36
|
}
|
|
28
37
|
}}>
|
|
29
38
|
{item.icons && <View style={{
|
|
@@ -9,20 +9,19 @@ export interface CircularProgressProps extends PropsWithChildren<ViewProps> {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function CircularProgress(props: CircularProgressProps) {
|
|
12
|
-
return <Progress
|
|
13
|
-
foreColor={{
|
|
14
|
-
'0%': '#f60',
|
|
15
|
-
'100%': '#f60',
|
|
16
|
-
}}
|
|
12
|
+
return <Progress.Double
|
|
17
13
|
style={[{ width: props.size, height: props.size }, props.style]}
|
|
18
14
|
disabled={true}
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
thumbRadius={Math.trunc(props.strokeWidth / 2) - 0.5}
|
|
16
|
+
minThumbFill={'#f60'}
|
|
17
|
+
minThumbStroke={'#f60'}
|
|
21
18
|
thumbStroke={'#f60'}
|
|
22
19
|
thumbFill={'#f60'}
|
|
23
20
|
thumbStrokeWidth={0}
|
|
24
21
|
scaleHeight={props.strokeWidth}
|
|
25
|
-
|
|
22
|
+
minValue={0}
|
|
23
|
+
maxValue={props.progress}
|
|
24
|
+
foreColor={'#f60'}
|
|
26
25
|
startDegree={270}
|
|
27
26
|
andDegree={360}
|
|
28
27
|
renderCenterView={
|
package/src/i18n/strings.ts
CHANGED
|
@@ -2911,7 +2911,7 @@ export default {
|
|
|
2911
2911
|
"country_MT": "Malta",
|
|
2912
2912
|
"country_MX": "Mexiko",
|
|
2913
2913
|
"country_NA": "Namibia",
|
|
2914
|
-
"country_NG": "
|
|
2914
|
+
"country_NG": "Nigeria",
|
|
2915
2915
|
"country_NL": "Niederlande",
|
|
2916
2916
|
"country_NO": "Norwegen",
|
|
2917
2917
|
"country_NZ": "Neuseeland",
|
|
@@ -8179,7 +8179,7 @@ export default {
|
|
|
8179
8179
|
"flashing_fs_toggle_state2": "Повільна анімація",
|
|
8180
8180
|
"generation_data_description_text": "показує вироблену енергію",
|
|
8181
8181
|
"group_conflict_feature": "Зверніть увагу, що всі конфліктні графіки (якщо такі є) будуть деактивовані.",
|
|
8182
|
-
"group_energytotal": "
|
|
8182
|
+
"group_energytotal": "Загальне споживання енергії",
|
|
8183
8183
|
"group_feature_biological_rhythm_applyfor_information": "Можливо, не всі пристрої підтримують функцію «Біологічний ритм».",
|
|
8184
8184
|
"group_feature_music_secondsection_note": "Світло синхронізується з музикою, яку збирає мікрофон смартфона",
|
|
8185
8185
|
"groups_settings_optionbox_option3": "Синхронізація сонячних пристроїв",
|