@ray-js/ipc-player-integration 0.0.35-beta.10 → 0.0.35-beta.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/lib/ui/ui.js
CHANGED
|
@@ -448,8 +448,18 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
448
448
|
setVerticalMic(verticalMic);
|
|
449
449
|
}, [brandColor, verticalMic]);
|
|
450
450
|
const refreshSmartImageQuality = useMemoizedFn(async () => {
|
|
451
|
-
|
|
452
|
-
|
|
451
|
+
let res = await getSmartImageQualityState(devId);
|
|
452
|
+
console.log('res===refreshSmartImageQuality1', res);
|
|
453
|
+
// if (res === undefined) return;
|
|
454
|
+
// TODO: TEST
|
|
455
|
+
if (res === undefined) {
|
|
456
|
+
res = {
|
|
457
|
+
isPurchase: false,
|
|
458
|
+
buttonState: 0,
|
|
459
|
+
trialRemainingSec: 20,
|
|
460
|
+
canOpenSettings: true
|
|
461
|
+
};
|
|
462
|
+
}
|
|
453
463
|
updatePlayerWidgetProps(instance, 'bottomLeft', 'TryExperience', {
|
|
454
464
|
isPurchase: res.isPurchase,
|
|
455
465
|
buttonState: res.buttonState,
|
package/lib/utils/navigation.js
CHANGED
|
@@ -10,8 +10,8 @@ export const miniIdLabs = {
|
|
|
10
10
|
};
|
|
11
11
|
export function gotoAIDrawMiniProgram(devId, brandColor) {
|
|
12
12
|
const color = new Color(brandColor);
|
|
13
|
-
|
|
14
|
-
const url = `godzilla://${miniIdLabs.aiDrawMini}${'/pages/
|
|
13
|
+
color.rgb().toString();
|
|
14
|
+
const url = `godzilla://${miniIdLabs.aiDrawMini}${'/pages/smartImageQuality/index'}?deviceId=${devId}`;
|
|
15
15
|
goToMiniProgramByShortLink(url, 'right');
|
|
16
16
|
}
|
|
17
17
|
export async function gotoSecurityCloudService(homeId, uuid) {
|
|
@@ -61,10 +61,15 @@ export const TryExperience = props => {
|
|
|
61
61
|
});
|
|
62
62
|
const [imgSrc, setImgSrc] = useState();
|
|
63
63
|
useEffect(() => {
|
|
64
|
-
|
|
64
|
+
updateImgSrc();
|
|
65
|
+
}, [buttonState]);
|
|
66
|
+
const updateImgSrc = useCallback(() => {
|
|
67
|
+
console.log('res===updateImgSrc', buttonState, isLowPhone);
|
|
65
68
|
if (isLowPhone) {
|
|
66
69
|
setImgSrc(tryClose);
|
|
67
|
-
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (buttonState === 0 || buttonState) {
|
|
68
73
|
const iconUrl = pickIconByStatus(buttonState);
|
|
69
74
|
setImgSrc(iconUrl);
|
|
70
75
|
} else {
|