@ledvance/group-ui-biz-bundle 1.0.65 → 1.0.66

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,7 +4,7 @@
4
4
  "name": "@ledvance/group-ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.65",
7
+ "version": "1.0.66",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -7,6 +7,7 @@ import {useReactive} from "ahooks";
7
7
  import Spacer from "@ledvance/base/src/components/Spacer";
8
8
  import {useRemoteSwitch} from "./RemoteSwitchAction";
9
9
  import {View, Text, StyleSheet} from "react-native";
10
+ import {showDialog} from "@ledvance/base/src/utils/common";
10
11
 
11
12
  const { convertX: cx } = Utils.RatioUtils
12
13
 
@@ -24,9 +25,26 @@ const RemoteSwitchPage = () => {
24
25
  <View style={[styles.colorBlock, { backgroundColor: 'red', opacity: 0 }]} />
25
26
  <Spacer style={{ flex: 1 }} height={0} width={0} />
26
27
  <SwitchButton value={remoteSwitch} onValueChange={async v => {
27
- state.loading = true
28
- await setRemoteSwitch(v)
29
- state.loading = false
28
+ if (state.loading) {
29
+ return
30
+ }
31
+ if (v) {
32
+ showDialog({
33
+ method: 'confirm',
34
+ title: I18n.getLang('Remotecontrol_Title'),
35
+ subTitle: I18n.getLang('Remotecontrol_description'),
36
+ onConfirm: async (_, { close }) => {
37
+ close()
38
+ state.loading = true
39
+ await setRemoteSwitch(v)
40
+ state.loading = false
41
+ }
42
+ })
43
+ } else {
44
+ state.loading = true
45
+ await setRemoteSwitch(v)
46
+ state.loading = false
47
+ }
30
48
  } } />
31
49
  </View>
32
50
  </Page>)