@arcblock/ux 2.9.9 → 2.9.10
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.
|
@@ -13,7 +13,7 @@ import Auth0Icon from '@iconify-icons/logos/auth0-icon';
|
|
|
13
13
|
import Avatar from '../../Avatar';
|
|
14
14
|
import DID from '../../DID';
|
|
15
15
|
import { temp as colors } from '../../Colors';
|
|
16
|
-
import {
|
|
16
|
+
import { getSourceProvider } from '../libs/utils';
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const SessionUserItem = /*#__PURE__*/forwardRef(({
|
|
@@ -22,7 +22,7 @@ const SessionUserItem = /*#__PURE__*/forwardRef(({
|
|
|
22
22
|
active,
|
|
23
23
|
...rest
|
|
24
24
|
}, ref) => {
|
|
25
|
-
const
|
|
25
|
+
const isRawWalletAccount = getSourceProvider(sessionItem?.user) === 'wallet';
|
|
26
26
|
const walletIcon = useCreation(() => {
|
|
27
27
|
if (sessionItem.__isDefault) {
|
|
28
28
|
return /*#__PURE__*/_jsx(Icon, {
|
|
@@ -114,8 +114,8 @@ const SessionUserItem = /*#__PURE__*/forwardRef(({
|
|
|
114
114
|
did: sessionItem.userDid,
|
|
115
115
|
size: 36
|
|
116
116
|
})
|
|
117
|
-
}), walletIcon,
|
|
118
|
-
did:
|
|
117
|
+
}), walletIcon, isRawWalletAccount ? /*#__PURE__*/_jsx(DID, {
|
|
118
|
+
did: sessionItem.userDid,
|
|
119
119
|
copyable: false,
|
|
120
120
|
size: 14,
|
|
121
121
|
responsive: false,
|
|
@@ -38,7 +38,7 @@ const SessionUserItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
38
38
|
active
|
|
39
39
|
} = _ref,
|
|
40
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
const
|
|
41
|
+
const isRawWalletAccount = (0, _utils.getSourceProvider)(sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.user) === 'wallet';
|
|
42
42
|
const walletIcon = (0, _ahooks.useCreation)(() => {
|
|
43
43
|
if (sessionItem.__isDefault) {
|
|
44
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, {
|
|
@@ -128,8 +128,8 @@ const SessionUserItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
128
128
|
did: sessionItem.userDid,
|
|
129
129
|
size: 36
|
|
130
130
|
})
|
|
131
|
-
}), walletIcon,
|
|
132
|
-
did:
|
|
131
|
+
}), walletIcon, isRawWalletAccount ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DID.default, {
|
|
132
|
+
did: sessionItem.userDid,
|
|
133
133
|
copyable: false,
|
|
134
134
|
size: 14,
|
|
135
135
|
responsive: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/ux",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.10",
|
|
4
4
|
"description": "Common used react components for arcblock products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -340,11 +340,11 @@
|
|
|
340
340
|
"peerDependencies": {
|
|
341
341
|
"react": ">=18.1.0"
|
|
342
342
|
},
|
|
343
|
-
"gitHead": "
|
|
343
|
+
"gitHead": "a610c6ed94e231ffad6ded36725148cf1fac1feb",
|
|
344
344
|
"dependencies": {
|
|
345
345
|
"@arcblock/did-motif": "^1.1.13",
|
|
346
|
-
"@arcblock/icons": "^2.9.
|
|
347
|
-
"@arcblock/react-hooks": "^2.9.
|
|
346
|
+
"@arcblock/icons": "^2.9.10",
|
|
347
|
+
"@arcblock/react-hooks": "^2.9.10",
|
|
348
348
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
349
349
|
"@emotion/react": "^11.10.4",
|
|
350
350
|
"@emotion/styled": "^11.10.4",
|
|
@@ -14,10 +14,10 @@ import Auth0Icon from '@iconify-icons/logos/auth0-icon';
|
|
|
14
14
|
import Avatar from '../../Avatar';
|
|
15
15
|
import DID from '../../DID';
|
|
16
16
|
import { temp as colors } from '../../Colors';
|
|
17
|
-
import {
|
|
17
|
+
import { getSourceProvider } from '../libs/utils';
|
|
18
18
|
|
|
19
19
|
const SessionUserItem = forwardRef(({ sessionItem, statusContent, active, ...rest }, ref) => {
|
|
20
|
-
const
|
|
20
|
+
const isRawWalletAccount = getSourceProvider(sessionItem?.user) === 'wallet';
|
|
21
21
|
const walletIcon = useCreation(() => {
|
|
22
22
|
if (sessionItem.__isDefault) {
|
|
23
23
|
return <Icon icon={QuestionMarkRoundedIcon} style={{ color: 'transparent' }} />;
|
|
@@ -71,8 +71,8 @@ const SessionUserItem = forwardRef(({ sessionItem, statusContent, active, ...res
|
|
|
71
71
|
<Avatar did={sessionItem.userDid} size={36} />
|
|
72
72
|
</Box>
|
|
73
73
|
{walletIcon}
|
|
74
|
-
{
|
|
75
|
-
<DID did={
|
|
74
|
+
{isRawWalletAccount ? (
|
|
75
|
+
<DID did={sessionItem.userDid} copyable={false} size={14} responsive={false} compact sx={{ lineHeight: 1 }} />
|
|
76
76
|
) : (
|
|
77
77
|
sessionItem.user.email && <Typography sx={{ fontSize: 14 }}>{sessionItem.user.email}</Typography>
|
|
78
78
|
)}
|