@arcblock/ux 2.12.14 → 2.12.15
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/Address/did-address.js +2 -2
- package/lib/Locale/selector.js +31 -31
- package/lib/SessionUser/components/un-login.js +2 -1
- package/lib/Util/constant.d.ts +1 -0
- package/lib/Util/constant.js +3 -3
- package/package.json +5 -5
- package/src/Address/did-address.tsx +1 -1
- package/src/Locale/selector.tsx +31 -32
- package/src/SessionUser/components/un-login.tsx +2 -1
- package/src/Util/constant.ts +3 -3
@@ -98,8 +98,8 @@ const DidAddress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
98
98
|
/* title prop 直接加在 icon 上不生效 */
|
99
99
|
_jsx(CopyIcon, {
|
100
100
|
className: "did-address-copy",
|
101
|
-
width:
|
102
|
-
height:
|
101
|
+
width: "1em",
|
102
|
+
height: "1em",
|
103
103
|
onClick: onCopy
|
104
104
|
})
|
105
105
|
});
|
package/lib/Locale/selector.js
CHANGED
@@ -115,37 +115,37 @@ export default function LocaleSelector(props) {
|
|
115
115
|
children: languages.map(({
|
116
116
|
code,
|
117
117
|
name
|
118
|
-
}) =>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
}]
|
147
|
-
}
|
148
|
-
}
|
118
|
+
}) => {
|
119
|
+
return /*#__PURE__*/_jsxs(MenuItem, {
|
120
|
+
className: "locale-item",
|
121
|
+
onClick: () => onSelect(code),
|
122
|
+
sx: {
|
123
|
+
fontSize: 16,
|
124
|
+
fontStyle: 'normal',
|
125
|
+
fontStretch: 'normal',
|
126
|
+
lineHeight: 'normal',
|
127
|
+
letterSpacing: '2px',
|
128
|
+
textAlign: 'center',
|
129
|
+
color: getColor({
|
130
|
+
...popperProps,
|
131
|
+
theme
|
132
|
+
}),
|
133
|
+
cursor: 'pointer',
|
134
|
+
display: 'flex',
|
135
|
+
padding: '16px',
|
136
|
+
alignItems: 'center'
|
137
|
+
},
|
138
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
139
|
+
component: IconifyIcon,
|
140
|
+
icon: CheckIcon,
|
141
|
+
className: code === locale ? 'check-icon check-icon-visible' : 'check-icon',
|
142
|
+
sx: {
|
143
|
+
marginRight: 0.5,
|
144
|
+
visibility: code === locale ? 'visible' : 'hidden'
|
145
|
+
}
|
146
|
+
}), name]
|
147
|
+
}, code);
|
148
|
+
})
|
149
149
|
})
|
150
150
|
})
|
151
151
|
})
|
@@ -25,6 +25,7 @@ export default function UnLogin({
|
|
25
25
|
const t = useMemoizedFn((key, data = {}) => {
|
26
26
|
return translate(translations, key, locale, 'en', data);
|
27
27
|
});
|
28
|
+
const searchParams = new URLSearchParams(window.location.search);
|
28
29
|
const browser = useBrowser();
|
29
30
|
const isFirstLoading = false;
|
30
31
|
const userAnchorRef = useRef(null);
|
@@ -53,7 +54,7 @@ export default function UnLogin({
|
|
53
54
|
let timer;
|
54
55
|
|
55
56
|
// NOTICE: ArcSphere 中使用原生的快捷登录
|
56
|
-
if (!browser.arcSphere) {
|
57
|
+
if (!browser.arcSphere && searchParams.get('showQuickConnect') !== 'false') {
|
57
58
|
timer = setTimeout(async () => {
|
58
59
|
currentState.userSessions = await session.getUserSessions();
|
59
60
|
if (currentState.userSessions.length > 0) {
|
package/lib/Util/constant.d.ts
CHANGED
package/lib/Util/constant.js
CHANGED
@@ -15,7 +15,7 @@ export const PASSPORT_STATUS = {
|
|
15
15
|
REVOKED: 'revoked'
|
16
16
|
};
|
17
17
|
export const LOGIN_PROVIDER = {
|
18
|
-
|
18
|
+
EMAIL: 'email',
|
19
19
|
AUTH0: 'auth0',
|
20
20
|
APPLE: 'apple',
|
21
21
|
GITHUB: 'github',
|
@@ -25,8 +25,8 @@ export const LOGIN_PROVIDER = {
|
|
25
25
|
PASSKEY: 'passkey'
|
26
26
|
};
|
27
27
|
export const LOGIN_PROVIDER_NAME = {
|
28
|
-
|
29
|
-
[LOGIN_PROVIDER.AUTH0]: '
|
28
|
+
[LOGIN_PROVIDER.EMAIL]: 'Email',
|
29
|
+
[LOGIN_PROVIDER.AUTH0]: 'Auth0',
|
30
30
|
[LOGIN_PROVIDER.APPLE]: 'Apple',
|
31
31
|
[LOGIN_PROVIDER.GITHUB]: 'Github',
|
32
32
|
[LOGIN_PROVIDER.GOOGLE]: 'Google',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.12.
|
3
|
+
"version": "2.12.15",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -68,12 +68,12 @@
|
|
68
68
|
"react": ">=18.2.0",
|
69
69
|
"react-router-dom": ">=6.22.3"
|
70
70
|
},
|
71
|
-
"gitHead": "
|
71
|
+
"gitHead": "16a4f35c677fc2ca2118801dc62984b71734df70",
|
72
72
|
"dependencies": {
|
73
73
|
"@arcblock/did-motif": "^1.1.13",
|
74
|
-
"@arcblock/icons": "^2.12.
|
75
|
-
"@arcblock/nft-display": "^2.12.
|
76
|
-
"@arcblock/react-hooks": "^2.12.
|
74
|
+
"@arcblock/icons": "^2.12.15",
|
75
|
+
"@arcblock/nft-display": "^2.12.15",
|
76
|
+
"@arcblock/react-hooks": "^2.12.15",
|
77
77
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
78
78
|
"@fontsource/inter": "^5.0.16",
|
79
79
|
"@fontsource/ubuntu-mono": "^5.0.18",
|
@@ -120,7 +120,7 @@ const DidAddress = forwardRef<HTMLDidAddressElement, IDidAddressProps>((props, r
|
|
120
120
|
</Tooltip>
|
121
121
|
) : (
|
122
122
|
/* title prop 直接加在 icon 上不生效 */
|
123
|
-
<CopyIcon className="did-address-copy" width=
|
123
|
+
<CopyIcon className="did-address-copy" width="1em" height="1em" onClick={onCopy} />
|
124
124
|
)}
|
125
125
|
</span>
|
126
126
|
);
|
package/src/Locale/selector.tsx
CHANGED
@@ -115,39 +115,38 @@ export default function LocaleSelector(props: LocaleSelectorProps) {
|
|
115
115
|
}}>
|
116
116
|
<ClickAwayListener onClickAway={onClose}>
|
117
117
|
<MenuList>
|
118
|
-
{languages.map(({ code, name }) =>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
{
|
143
|
-
visibility: 'hidden',
|
118
|
+
{languages.map(({ code, name }) => {
|
119
|
+
return (
|
120
|
+
<MenuItem
|
121
|
+
key={code}
|
122
|
+
className="locale-item"
|
123
|
+
onClick={() => onSelect(code)}
|
124
|
+
sx={{
|
125
|
+
fontSize: 16,
|
126
|
+
fontStyle: 'normal',
|
127
|
+
fontStretch: 'normal',
|
128
|
+
lineHeight: 'normal',
|
129
|
+
letterSpacing: '2px',
|
130
|
+
textAlign: 'center',
|
131
|
+
color: getColor({ ...popperProps, theme }),
|
132
|
+
cursor: 'pointer',
|
133
|
+
display: 'flex',
|
134
|
+
padding: '16px',
|
135
|
+
alignItems: 'center',
|
136
|
+
}}>
|
137
|
+
<Box
|
138
|
+
component={IconifyIcon}
|
139
|
+
icon={CheckIcon}
|
140
|
+
className={code === locale ? 'check-icon check-icon-visible' : 'check-icon'}
|
141
|
+
sx={{
|
144
142
|
marginRight: 0.5,
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
143
|
+
visibility: code === locale ? 'visible' : 'hidden',
|
144
|
+
}}
|
145
|
+
/>
|
146
|
+
{name}
|
147
|
+
</MenuItem>
|
148
|
+
);
|
149
|
+
})}
|
151
150
|
</MenuList>
|
152
151
|
</ClickAwayListener>
|
153
152
|
</Box>
|
@@ -40,6 +40,7 @@ export default function UnLogin({ session, onLogin = noop, size = 24, dark = fal
|
|
40
40
|
const t = useMemoizedFn((key, data = {}) => {
|
41
41
|
return translate(translations, key, locale, 'en', data);
|
42
42
|
});
|
43
|
+
const searchParams = new URLSearchParams(window.location.search);
|
43
44
|
const browser = useBrowser();
|
44
45
|
|
45
46
|
const isFirstLoading = false;
|
@@ -74,7 +75,7 @@ export default function UnLogin({ session, onLogin = noop, size = 24, dark = fal
|
|
74
75
|
let timer: NodeJS.Timeout;
|
75
76
|
|
76
77
|
// NOTICE: ArcSphere 中使用原生的快捷登录
|
77
|
-
if (!browser.arcSphere) {
|
78
|
+
if (!browser.arcSphere && searchParams.get('showQuickConnect') !== 'false') {
|
78
79
|
timer = setTimeout(async () => {
|
79
80
|
currentState.userSessions = await session.getUserSessions();
|
80
81
|
if (currentState.userSessions.length > 0) {
|
package/src/Util/constant.ts
CHANGED
@@ -20,7 +20,7 @@ export const PASSPORT_STATUS = {
|
|
20
20
|
};
|
21
21
|
|
22
22
|
export const LOGIN_PROVIDER = {
|
23
|
-
|
23
|
+
EMAIL: 'email',
|
24
24
|
AUTH0: 'auth0',
|
25
25
|
APPLE: 'apple',
|
26
26
|
GITHUB: 'github',
|
@@ -31,8 +31,8 @@ export const LOGIN_PROVIDER = {
|
|
31
31
|
};
|
32
32
|
|
33
33
|
export const LOGIN_PROVIDER_NAME = {
|
34
|
-
|
35
|
-
[LOGIN_PROVIDER.AUTH0]: '
|
34
|
+
[LOGIN_PROVIDER.EMAIL]: 'Email',
|
35
|
+
[LOGIN_PROVIDER.AUTH0]: 'Auth0',
|
36
36
|
[LOGIN_PROVIDER.APPLE]: 'Apple',
|
37
37
|
[LOGIN_PROVIDER.GITHUB]: 'Github',
|
38
38
|
[LOGIN_PROVIDER.GOOGLE]: 'Google',
|