@arcblock/ux 2.12.13 → 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.
@@ -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: 16,
102
- height: 16,
101
+ width: "1em",
102
+ height: "1em",
103
103
  onClick: onCopy
104
104
  })
105
105
  });
@@ -115,37 +115,37 @@ export default function LocaleSelector(props) {
115
115
  children: languages.map(({
116
116
  code,
117
117
  name
118
- }) => /*#__PURE__*/_jsxs(MenuItem, {
119
- className: "locale-item",
120
- onClick: () => onSelect(code),
121
- sx: {
122
- fontSize: 16,
123
- fontStyle: 'normal',
124
- fontStretch: 'normal',
125
- lineHeight: 'normal',
126
- letterSpacing: '2px',
127
- textAlign: 'center',
128
- color: getColor({
129
- ...popperProps,
130
- theme
131
- }),
132
- cursor: 'pointer',
133
- display: 'flex',
134
- padding: '16px',
135
- alignItems: 'center'
136
- },
137
- children: [/*#__PURE__*/_jsx(Box, {
138
- component: IconifyIcon,
139
- icon: CheckIcon,
140
- className: code === locale ? 'check-icon check-icon-visible' : 'check-icon',
141
- sx: [code === locale ? {
142
- visibility: 'visible'
143
- } : {}, {
144
- visibility: 'hidden',
145
- marginRight: 0.5
146
- }]
147
- }), name]
148
- }, code))
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) {
@@ -15,6 +15,7 @@ export declare const PASSPORT_STATUS: {
15
15
  REVOKED: string;
16
16
  };
17
17
  export declare const LOGIN_PROVIDER: {
18
+ EMAIL: string;
18
19
  AUTH0: string;
19
20
  APPLE: string;
20
21
  GITHUB: string;
@@ -15,7 +15,7 @@ export const PASSPORT_STATUS = {
15
15
  REVOKED: 'revoked'
16
16
  };
17
17
  export const LOGIN_PROVIDER = {
18
- // EMAIL: 'Email',
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
- // [LOGIN_PROVIDER.EMAIL]: 'Email',
29
- [LOGIN_PROVIDER.AUTH0]: 'Email',
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.13",
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": "82ab8092972356c7746cb2b1c77bd133ef00ebca",
71
+ "gitHead": "16a4f35c677fc2ca2118801dc62984b71734df70",
72
72
  "dependencies": {
73
73
  "@arcblock/did-motif": "^1.1.13",
74
- "@arcblock/icons": "^2.12.13",
75
- "@arcblock/nft-display": "^2.12.13",
76
- "@arcblock/react-hooks": "^2.12.13",
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={16} height={16} onClick={onCopy} />
123
+ <CopyIcon className="did-address-copy" width="1em" height="1em" onClick={onCopy} />
124
124
  )}
125
125
  </span>
126
126
  );
@@ -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
- <MenuItem
120
- key={code}
121
- className="locale-item"
122
- onClick={() => onSelect(code)}
123
- sx={{
124
- fontSize: 16,
125
- fontStyle: 'normal',
126
- fontStretch: 'normal',
127
- lineHeight: 'normal',
128
- letterSpacing: '2px',
129
- textAlign: 'center',
130
- color: getColor({ ...popperProps, theme }),
131
- cursor: 'pointer',
132
- display: 'flex',
133
- padding: '16px',
134
- alignItems: 'center',
135
- }}>
136
- <Box
137
- component={IconifyIcon}
138
- icon={CheckIcon}
139
- className={code === locale ? 'check-icon check-icon-visible' : 'check-icon'}
140
- sx={[
141
- code === locale ? { visibility: 'visible' } : {},
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
- {name}
149
- </MenuItem>
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) {
@@ -20,7 +20,7 @@ export const PASSPORT_STATUS = {
20
20
  };
21
21
 
22
22
  export const LOGIN_PROVIDER = {
23
- // EMAIL: 'Email',
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
- // [LOGIN_PROVIDER.EMAIL]: 'Email',
35
- [LOGIN_PROVIDER.AUTH0]: 'Email',
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',