@ledvance/base 1.1.9 → 1.1.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/package.json +1 -1
- package/src/api/native.d.ts +2 -2
- package/src/api/native.ts +5 -5
- package/src/components/FanAdjustView.d.ts +22 -0
- package/src/components/FanAdjustView.tsx +124 -0
- package/src/components/Popup.d.ts +7 -0
- package/src/components/Popup.tsx +72 -0
- package/src/components/Segmented.d.ts +14 -0
- package/src/components/Segmented.tsx +76 -0
- package/src/i18n/strings.d.ts +504 -56
- package/src/i18n/strings.ts +547 -99
- package/src/models/modules/NativePropsSlice.tsx +2 -1
- package/src/res/index.d.ts +1 -1
- package/src/res/index.ts +1 -1
- package/src/res/materialiconsOutlinedArrowsNavAddBox.png +0 -0
- package/src/res/materialiconsOutlinedArrowsNavAddBox@2x.png +0 -0
- package/src/res/materialiconsOutlinedArrowsNavAddBox@3x.png +0 -0
|
@@ -199,12 +199,13 @@ export function useUAGroupInfo(): UAGroupInfo {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Result<any>>] {
|
|
202
|
+
const tyGroupId = useUAGroupInfo().tyGroupId
|
|
202
203
|
const config = useUAGroupInfo().config as T
|
|
203
204
|
const dispatch = useDispatch()
|
|
204
205
|
const {setGroupConfig} = nativePropsSlice.actions
|
|
205
206
|
const setConfig = useCallback(async (dps: any, newConfig: T) => {
|
|
206
207
|
// 发送控制命令
|
|
207
|
-
const res = await NativeApi.groupControl(JSON.stringify(dps), JSON.stringify(newConfig))
|
|
208
|
+
const res = await NativeApi.groupControl(tyGroupId, JSON.stringify(dps), JSON.stringify(newConfig))
|
|
208
209
|
if (res.success) {
|
|
209
210
|
// 只在结果成功时才改变 redux 数据
|
|
210
211
|
dispatch(setGroupConfig(newConfig))
|
package/src/res/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare const _default: {
|
|
|
27
27
|
add: string;
|
|
28
28
|
delete: string;
|
|
29
29
|
icon_edit_scene: string;
|
|
30
|
-
device_panel_timer_add:
|
|
30
|
+
device_panel_timer_add: any;
|
|
31
31
|
device_panel_schedule_add: string;
|
|
32
32
|
device_panel_schedule_alert: string;
|
|
33
33
|
ic_arrows_nav_clear: any;
|
package/src/res/index.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default {
|
|
|
27
27
|
add: 'add',
|
|
28
28
|
delete: 'delete',
|
|
29
29
|
icon_edit_scene: 'icon_edit_scene',
|
|
30
|
-
device_panel_timer_add: '
|
|
30
|
+
device_panel_timer_add: require('./materialiconsOutlinedArrowsNavAddBox.png'),
|
|
31
31
|
device_panel_schedule_add: 'device_panel_schedule_add',
|
|
32
32
|
device_panel_schedule_alert: 'device_panel_schedule_alert',
|
|
33
33
|
ic_arrows_nav_clear: require('./materialiconsFilledCancel.png'),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|