@ledvance/ui-biz-bundle 1.1.63 → 1.1.65

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/ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.1.63",
7
+ "version": "1.1.65",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -122,7 +122,8 @@ export const useFixedTime: UseFixedTimeType = (dpKey, isPlug, disableFeature) =>
122
122
  length: isPlug ? 10 : 16,
123
123
  nodes: fixedTimeList
124
124
  }
125
- const hex = fixedTimeObj2Dp(fixedTimerData, isPlug)
125
+ let hex = fixedTimeObj2Dp(fixedTimerData, isPlug)
126
+ if(isPlug) hex = Buffer.from(hex, 'hex').toString('base64')
126
127
  const res = await setFixedTimeDp(hex)
127
128
  if (res.success) {
128
129
  return {
@@ -174,10 +174,10 @@ const FixedTimeDetailPage = () => {
174
174
  </View>
175
175
  <Spacer />
176
176
  {/* Devices */}
177
- <View style={styles.cardContainer}>
177
+ {state.fixedTime.color && !params.isPlug && <View style={styles.cardContainer}>
178
178
  <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline2_text')}</Text>
179
179
  <Spacer height={cx(10)} />
180
- {state.fixedTime.color && !params.isPlug && <Card>
180
+ <Card>
181
181
  <LdvSwitch
182
182
  title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
183
183
  color={'#fff'}
@@ -219,9 +219,9 @@ const FixedTimeDetailPage = () => {
219
219
  }
220
220
  }}
221
221
  />
222
- </Card>}
222
+ </Card>
223
223
  <Spacer />
224
- </View>
224
+ </View>}
225
225
  {/* Settings */}
226
226
  <View style={styles.cardContainer}>
227
227
  <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline4_text')}</Text>
@@ -77,17 +77,14 @@ const FixedTimePage = () => {
77
77
  }, [state.originList.length])
78
78
 
79
79
  const onPost = useCallback(async (mode: 'add' | 'edit' | 'del', fixedTime: FixedTimerUiItem) => {
80
- console.log(fixedTime, '< --- fixedTimeeeeee')
81
80
  const cloneFixedTimeList = cloneDeep(state.originList)
82
81
  const idx = state.originList.findIndex(f => f.index === fixedTime.index)
83
- console.log(idx, '< --- idxxxxx')
84
82
  if (mode === 'edit') {
85
83
  cloneFixedTimeList.splice(idx, 1, fixedTime)
86
84
  }
87
85
  if (mode === 'del') cloneFixedTimeList.splice(idx, 1)
88
86
  const newFixedTimeList = mode === 'add' ? [...state.originList, fixedTime] : cloneFixedTimeList
89
87
  const res = await setFixedTime(newFixedTimeList)
90
- console.log(res, '< ---== resss')
91
88
  if (res.success) {
92
89
  state.originList = cloneDeep(newFixedTimeList)
93
90
  }
@@ -1,8 +1,9 @@
1
1
  import {NavigationRoute} from "tuya-panel-kit";
2
2
  import PlugBehaviorPage from "./PlugBehaviorPage";
3
+ import LightBehaviorPage from "./LightBehaviorPage";
3
4
  import {ui_biz_routerKey} from "../../navigation/Routers";
4
5
 
5
- const NewPowerOnBehaviorPageRouters: NavigationRoute[] = [
6
+ export const PlugPowerOnBehaviorPageRouters: NavigationRoute[] = [
6
7
  {
7
8
  name: ui_biz_routerKey.ui_biz_power_behavior_plug,
8
9
  component: PlugBehaviorPage,
@@ -13,4 +14,14 @@ const NewPowerOnBehaviorPageRouters: NavigationRoute[] = [
13
14
  }
14
15
  ]
15
16
 
16
- export default NewPowerOnBehaviorPageRouters
17
+ export const LightPowerOnBehaviorPageRouters: NavigationRoute[] = [
18
+ {
19
+ name: ui_biz_routerKey.ui_biz_power_behavior,
20
+ component: LightBehaviorPage,
21
+ options: {
22
+ hideTopbar: true,
23
+ showOfflineView: false,
24
+ }
25
+ }
26
+ ]
27
+
@@ -115,9 +115,7 @@ export const useRandomTime: UseFixedTimeType = (dpKey: string, isPlug?: boolean,
115
115
  v: isPlug ? JSON.stringify({dp: randomHex}) : randomHex
116
116
  }
117
117
  })
118
- console.log(randomData, '< --- randomData')
119
118
  const cloudStatus = await putFeatureFn(deviceId, isPlug ? plug_randomFeatureId : randomFeatureId, JSON.stringify(randomData))
120
- console.log(cloudStatus, '< --- cloudStatus')
121
119
  if (cloudStatus) {
122
120
  const randomTimerData = {
123
121
  version: 0,
@@ -168,10 +168,10 @@ const RandomTimeDetailPage = () => {
168
168
  </View>
169
169
  <Spacer />
170
170
  {/* Devices */}
171
- <View style={styles.cardContainer}>
171
+ {!!state.randomTime.color && !params.isPlug && <View style={styles.cardContainer}>
172
172
  <Text style={styles.itemTitle}>{I18n.getLang('timeschedule_add_schedule_subheadline2_text')}</Text>
173
173
  <Spacer height={cx(10)} />
174
- {state.randomTime.color && !params.isPlug && <Card>
174
+ <Card>
175
175
  <LdvSwitch
176
176
  title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
177
177
  color={'#fff'}
@@ -213,9 +213,9 @@ const RandomTimeDetailPage = () => {
213
213
  }
214
214
  }}
215
215
  />
216
- </Card>}
216
+ </Card>
217
217
  <Spacer />
218
- </View>
218
+ </View>}
219
219
  {/* summary */}
220
220
  <Summary
221
221
  frequency={loopText(state.randomTime.weeks)}
@@ -19,7 +19,7 @@ interface SummaryProps {
19
19
  const Summary = (props: SummaryProps) => {
20
20
  return (
21
21
  <View style={styles.cardContainer}>
22
- <Text style={styles.itemTitle}>{I18n.getLang('add_randomtimecycle_subheadline_text')}</Text>
22
+ <Text style={styles.itemTitle}>{I18n.getLang('add_sleepschedule_one_source_subheadline4_text')}</Text>
23
23
  <Spacer height={cx(10)} />
24
24
  <View style={{}}>
25
25
  <View style={styles.summaryContainer}>