@ledvance/ui-biz-bundle 1.1.37 → 1.1.38
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
|
@@ -151,13 +151,18 @@ const DynamicMoodEditorPage = () => {
|
|
|
151
151
|
state.mood.name.length > 32 ||
|
|
152
152
|
state.mood.nodes.length < 2
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
const showBackDialog = (): boolean => {
|
|
156
|
+
return !isEqual(state.mood, routeParams.currentMood);
|
|
157
|
+
}
|
|
158
|
+
|
|
154
159
|
const nameRepeat = useMemo(() => {
|
|
155
160
|
return !!find(params.moods, m => (m.id !== state.mood.id && m.name === state.mood.name))
|
|
156
161
|
}, [state.mood.name])
|
|
157
162
|
return (
|
|
158
163
|
<Page
|
|
159
164
|
backText={Strings.getLang('mesh_device_detail_mode')}
|
|
160
|
-
showBackDialog={
|
|
165
|
+
showBackDialog={showBackDialog()}
|
|
161
166
|
backDialogTitle={
|
|
162
167
|
Strings.getLang(params.mode === 'add' ?
|
|
163
168
|
'string_light_pp_dialog_sm_add_headline_c' :
|
|
@@ -168,10 +168,15 @@ const FantasyMoodEditPage = () => {
|
|
|
168
168
|
const nameRepeat = useMemo(() => {
|
|
169
169
|
return !!find(params.moods, m => (m.id !== state.mood.id && m.name === state.mood.name))
|
|
170
170
|
}, [state.mood.name])
|
|
171
|
+
|
|
172
|
+
const showBackDialog = (): boolean => {
|
|
173
|
+
return !isEqual(state.mood, routeParams.currentMood);
|
|
174
|
+
}
|
|
175
|
+
|
|
171
176
|
return (
|
|
172
177
|
<Page
|
|
173
178
|
backText={I18n.getLang('mesh_device_detail_mode')}
|
|
174
|
-
showBackDialog={
|
|
179
|
+
showBackDialog={showBackDialog()}
|
|
175
180
|
backDialogTitle={
|
|
176
181
|
I18n.getLang(params.mode === 'add' ?
|
|
177
182
|
'string_light_pp_dialog_sm_add_headline_c' :
|
|
@@ -154,10 +154,14 @@ const StaticMoodEditorPage = () => {
|
|
|
154
154
|
return !!find(params.moods, m => (m.id !== state.mood.id && m.name === state.mood.name))
|
|
155
155
|
}, [state.mood.name])
|
|
156
156
|
|
|
157
|
+
const showBackDialog = (): boolean => {
|
|
158
|
+
return !isEqual(state.mood, routeParams.currentMood);
|
|
159
|
+
}
|
|
160
|
+
|
|
157
161
|
return (
|
|
158
162
|
<Page
|
|
159
163
|
backText={Strings.getLang('mesh_device_detail_mode')}
|
|
160
|
-
showBackDialog={
|
|
164
|
+
showBackDialog={showBackDialog()}
|
|
161
165
|
backDialogTitle={
|
|
162
166
|
Strings.getLang(params.mode === 'add' ?
|
|
163
167
|
'string_light_pp_dialog_sm_add_headline_c' :
|
|
@@ -180,9 +180,9 @@ const MusicPage = () => {
|
|
|
180
180
|
|
|
181
181
|
const getSelect = async () => {
|
|
182
182
|
const res: any = await NativeApi.getJson(deviceId, 'musicSelect')
|
|
183
|
-
const type = res?.data ? JSON.parse(res?.data)?.type : 0
|
|
183
|
+
const type = res?.data ? (JSON.parse(res?.data)?.type || 0) : 0
|
|
184
184
|
state.musicType = res?.data ? JSON.parse(res?.data)?.musicType : props.dreamMusicDp ? 0 : 1
|
|
185
|
-
state.phoneGenreMode = musicDefalutDatasource[type
|
|
185
|
+
state.phoneGenreMode = musicDefalutDatasource[type]?.id
|
|
186
186
|
state.musicEnable = workMode === 'music' && !!switchLed
|
|
187
187
|
if (type !== '' && state.musicType === 1 && state.musicEnable) {
|
|
188
188
|
openMusic()
|
|
@@ -190,6 +190,7 @@ const MusicPage = () => {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
const changeMusic = async (id: number) => {
|
|
193
|
+
console.log(id, '< --- id')
|
|
193
194
|
if (workMode !== 'music') await setWorkMode('music')
|
|
194
195
|
if (!switchLed) setSwitchLed(true)
|
|
195
196
|
await saveSelect(id)
|
|
@@ -206,6 +207,7 @@ const MusicPage = () => {
|
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
const putMusicDataFn = (data: any, extraDp = {}) => {
|
|
210
|
+
console.log(data, '< --- data')
|
|
209
211
|
setMusicData(data, extraDp).then()
|
|
210
212
|
}
|
|
211
213
|
|