@ray-js/ipc-player-integration 0.0.36 → 0.0.38-beta.1
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/iconfont/iconfont.css +55 -3
- package/lib/iconfont/iconfont.js +7 -7
- package/lib/iconfont/iconfont.json +91 -0
- package/lib/iconfont/iconfont.ttf +0 -0
- package/lib/iconfont/iconfont.woff +0 -0
- package/lib/iconfont/iconfont.woff2 +0 -0
- package/lib/ui/bottomLeftContent.js +9 -12
- package/lib/ui/ui.js +1 -1
- package/lib/ui/ui.less +6 -0
- package/lib/widgets/resolution/resolution.less +0 -1
- package/lib/widgets/tryExperience/tryExperience.js +6 -5
- package/lib/widgets/tryExperience/tryExperience.less +8 -2
- package/package.json +1 -1
- package/lib/res/try/try_close.png +0 -0
|
@@ -5,6 +5,97 @@
|
|
|
5
5
|
"css_prefix_text": "icon-panel-",
|
|
6
6
|
"description": "IPC 小程序公版",
|
|
7
7
|
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "47777351",
|
|
10
|
+
"name": "智能画质-关闭",
|
|
11
|
+
"font_class": "zhinenghuazhi-guanbi",
|
|
12
|
+
"unicode": "e6c7",
|
|
13
|
+
"unicode_decimal": 59079
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"icon_id": "47439150",
|
|
17
|
+
"name": "next",
|
|
18
|
+
"font_class": "next",
|
|
19
|
+
"unicode": "e6c6",
|
|
20
|
+
"unicode_decimal": 59078
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"icon_id": "47439134",
|
|
24
|
+
"name": "back",
|
|
25
|
+
"font_class": "back",
|
|
26
|
+
"unicode": "e6c5",
|
|
27
|
+
"unicode_decimal": 59077
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"icon_id": "47409621",
|
|
31
|
+
"name": "pixel-emoji",
|
|
32
|
+
"font_class": "pixel-emoji",
|
|
33
|
+
"unicode": "e6c4",
|
|
34
|
+
"unicode_decimal": 59076
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"icon_id": "47409576",
|
|
38
|
+
"name": "erase",
|
|
39
|
+
"font_class": "erase",
|
|
40
|
+
"unicode": "e6c2",
|
|
41
|
+
"unicode_decimal": 59074
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"icon_id": "47409575",
|
|
45
|
+
"name": "pencil",
|
|
46
|
+
"font_class": "pencil",
|
|
47
|
+
"unicode": "e6c3",
|
|
48
|
+
"unicode_decimal": 59075
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"icon_id": "47305778",
|
|
52
|
+
"name": "time",
|
|
53
|
+
"font_class": "time",
|
|
54
|
+
"unicode": "e6c1",
|
|
55
|
+
"unicode_decimal": 59073
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"icon_id": "47305721",
|
|
59
|
+
"name": "fence-empty",
|
|
60
|
+
"font_class": "fence-empty",
|
|
61
|
+
"unicode": "e6c0",
|
|
62
|
+
"unicode_decimal": 59072
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"icon_id": "47305602",
|
|
66
|
+
"name": "walk-pet",
|
|
67
|
+
"font_class": "walk-pet-empty",
|
|
68
|
+
"unicode": "e6bf",
|
|
69
|
+
"unicode_decimal": 59071
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"icon_id": "47305546",
|
|
73
|
+
"name": "vibration",
|
|
74
|
+
"font_class": "vibration",
|
|
75
|
+
"unicode": "e6bd",
|
|
76
|
+
"unicode_decimal": 59069
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"icon_id": "47305545",
|
|
80
|
+
"name": "设备录像",
|
|
81
|
+
"font_class": "shebeiluxiang",
|
|
82
|
+
"unicode": "e6be",
|
|
83
|
+
"unicode_decimal": 59070
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"icon_id": "47272338",
|
|
87
|
+
"name": "add",
|
|
88
|
+
"font_class": "add",
|
|
89
|
+
"unicode": "e69b",
|
|
90
|
+
"unicode_decimal": 59035
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"icon_id": "47272337",
|
|
94
|
+
"name": "edit",
|
|
95
|
+
"font_class": "a-rongqi1972",
|
|
96
|
+
"unicode": "e69d",
|
|
97
|
+
"unicode_decimal": 59037
|
|
98
|
+
},
|
|
8
99
|
{
|
|
9
100
|
"icon_id": "47215545",
|
|
10
101
|
"name": "nightvision-mode-black-color",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -195,21 +195,18 @@ const BottomLeftContent = _ref => {
|
|
|
195
195
|
// 点击右箭头:直接滚动到最右端。
|
|
196
196
|
// 给一个足够大的目标值,交由 ScrollView 自身夹取到真实最右端,避免测量误差导致滚不到底。
|
|
197
197
|
|
|
198
|
-
const coverHeight = screenType === 'vertical' ? shouldHide ? 49 : 48 : shouldHide ?
|
|
198
|
+
const coverHeight = screenType === 'vertical' ? shouldHide ? 49 : 48 : shouldHide ? 59 : 58;
|
|
199
199
|
const containerHeight = screenType === 'vertical' ? 48 : 58;
|
|
200
200
|
|
|
201
201
|
// reservedRight 兼容 number(px)与 string(任意 CSS 长度,例如 "35%")
|
|
202
202
|
const rightCss = typeof reservedRight === 'number' ? `${reservedRight}px` : reservedRight;
|
|
203
203
|
|
|
204
|
-
//
|
|
205
|
-
//
|
|
206
|
-
//
|
|
207
|
-
//
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
// 横屏: 25 + 25 + 16.5 = 66.5,箭头 16 → bottom = 58
|
|
211
|
-
|
|
212
|
-
const hintBottom = screenType === 'vertical' ? 16 : 58;
|
|
204
|
+
// ScrollView 贴 wrap 顶部,icon 在 ScrollView 内通过 align-items 居中到可视行中线。
|
|
205
|
+
// hintBottom 锚定可视行中线(pulse 箭头 16,先按 16 高算 bottom,按钮模式再下移补差):
|
|
206
|
+
// icon 中心距 wrap 底 = paddingBottom + visibleRowHeight/2
|
|
207
|
+
// 竖屏: 0 + 24 = 24 → bottom = 16
|
|
208
|
+
// 横屏: 25 + 16.5 = 41.5 → bottom = 33.5
|
|
209
|
+
const visibleRowHeight = containerHeight - paddingBottomPx;
|
|
213
210
|
// button 模式用半透明圆做点击热区,比 pulse 提示大;下移半个差值以保持图标中心不变
|
|
214
211
|
const hintSize = isButtonHint ? 26 : 16;
|
|
215
212
|
// 竖屏 button 模式给 ScrollView 右侧留一条较窄的“箭头槽”:只裁掉内容最右一小段,
|
|
@@ -290,7 +287,7 @@ const BottomLeftContent = _ref => {
|
|
|
290
287
|
style: {
|
|
291
288
|
display: 'inline-flex',
|
|
292
289
|
flexDirection: 'row',
|
|
293
|
-
height: `${
|
|
290
|
+
height: `${visibleRowHeight}px`,
|
|
294
291
|
alignItems: 'center'
|
|
295
292
|
}
|
|
296
293
|
}, children, /*#__PURE__*/React.createElement(View, {
|
|
@@ -307,7 +304,7 @@ const BottomLeftContent = _ref => {
|
|
|
307
304
|
style: {
|
|
308
305
|
position: 'absolute',
|
|
309
306
|
right: `${hintRight}px`,
|
|
310
|
-
bottom: `${
|
|
307
|
+
bottom: `${paddingBottomPx + visibleRowHeight / 2 - 8 - (hintSize - 16) / 2}px`,
|
|
311
308
|
width: `${hintSize}px`,
|
|
312
309
|
height: `${hintSize}px`,
|
|
313
310
|
display: 'flex',
|
package/lib/ui/ui.js
CHANGED
|
@@ -463,7 +463,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
463
463
|
const res = await getSmartImageQualityState(devId);
|
|
464
464
|
if (!res) return;
|
|
465
465
|
// 调试时使用
|
|
466
|
-
// res = {
|
|
466
|
+
// const res = {
|
|
467
467
|
// isPurchase: false,
|
|
468
468
|
// buttonState: 0,
|
|
469
469
|
// trialRemainingSec: 20,
|
package/lib/ui/ui.less
CHANGED
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.ipc-player-bottom-content-full {
|
|
29
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
30
|
+
height: calc(60px + env(safe-area-inset-bottom));
|
|
29
31
|
:root[theme='dark'] & {
|
|
30
32
|
background: #000;
|
|
31
33
|
}
|
|
@@ -37,6 +39,10 @@
|
|
|
37
39
|
.ipc-player-plugin-resolution {
|
|
38
40
|
background-color: rgba(0, 0, 0, 0.2);
|
|
39
41
|
}
|
|
42
|
+
|
|
43
|
+
.ipc-player-plugin-realtime-magnification {
|
|
44
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import { View, Image, getSystemInfoSync, showToast } from '@ray-js/ray';
|
|
2
|
+
import { View, Image, getSystemInfoSync, showToast, Text } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import React, { useState, useEffect, useCallback, useRef } from 'react';
|
|
5
5
|
import { useStore } from '../../ctx/store';
|
|
@@ -9,7 +9,6 @@ import { refreshSmartImageQualityEvent } from '../../ui/constant';
|
|
|
9
9
|
import tryZh from '../../res/try/try_zh.png';
|
|
10
10
|
import tryEn from '../../res/try/try_en.png';
|
|
11
11
|
import tryOpen from '../../res/try/try_open.png';
|
|
12
|
-
import tryClose from '../../res/try/try_close.png';
|
|
13
12
|
import './tryExperience.less';
|
|
14
13
|
/** ty.ipc.test1 返回的体验状态 */
|
|
15
14
|
var TryExperienceStatus = /*#__PURE__*/function (TryExperienceStatus) {
|
|
@@ -34,7 +33,7 @@ const pickIconByStatus = buttonState => {
|
|
|
34
33
|
case TryExperienceStatus.Open:
|
|
35
34
|
return tryOpen;
|
|
36
35
|
case TryExperienceStatus.Close:
|
|
37
|
-
return
|
|
36
|
+
return 'try_close';
|
|
38
37
|
case TryExperienceStatus.Default:
|
|
39
38
|
return getDefaultLangIcon();
|
|
40
39
|
default:
|
|
@@ -67,7 +66,7 @@ export const TryExperience = props => {
|
|
|
67
66
|
}, [buttonState]);
|
|
68
67
|
const updateImgSrc = useCallback(() => {
|
|
69
68
|
if (isLowPhone) {
|
|
70
|
-
setImgSrc(
|
|
69
|
+
setImgSrc('try_close');
|
|
71
70
|
return;
|
|
72
71
|
}
|
|
73
72
|
if (buttonState === 0 || buttonState) {
|
|
@@ -156,7 +155,9 @@ export const TryExperience = props => {
|
|
|
156
155
|
onClick: onTryExperience
|
|
157
156
|
}, /*#__PURE__*/React.createElement(View, {
|
|
158
157
|
className: "try-experience-box"
|
|
159
|
-
}, /*#__PURE__*/React.createElement(
|
|
158
|
+
}, imgSrc === 'try_close' ? /*#__PURE__*/React.createElement(Text, {
|
|
159
|
+
className: "ipc-player-plugin-try-experience icon-panel icon-panel-zhinenghuazhi-guanbi"
|
|
160
|
+
}) : /*#__PURE__*/React.createElement(Image, {
|
|
160
161
|
className: "try-experience-icon",
|
|
161
162
|
src: imgSrc,
|
|
162
163
|
mode: "heightFix"
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
5
|
-
min-height:
|
|
5
|
+
min-height: var(--iconBoxSize);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.try-experience-icon {
|
|
9
9
|
display: block;
|
|
10
|
-
height:
|
|
10
|
+
height: var(--iconBoxSize);
|
|
11
11
|
width: auto;
|
|
12
12
|
flex-shrink: 0;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
.ipc-player-plugin-try-experience {
|
|
16
|
+
color: var(--iconColor);
|
|
17
|
+
font-size: var(--iconBoxSize) !important;
|
|
18
|
+
line-height: var(--iconBoxSize) !important;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
Binary file
|