@blocklet/ui-react 2.13.37 → 2.13.39

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.
@@ -67,26 +67,37 @@ export default function Nft({ user }) {
67
67
  justifyItems: "start",
68
68
  gridTemplateColumns: {
69
69
  xs: "repeat(2, 1fr)",
70
- sm: "repeat(2, 1fr)",
70
+ sm: "repeat(3, 1fr)",
71
71
  md: "repeat(3, 1fr)",
72
72
  lg: "repeat(5, 1fr)"
73
73
  },
74
74
  gap: 2.5
75
75
  },
76
76
  children: [
77
- data?.assets?.map((item) => /* @__PURE__ */ jsx(Box, { width: 166, height: 166, flexShrink: 0, children: /* @__PURE__ */ jsx(
78
- NFTDisplay,
77
+ data?.assets?.map((item) => /* @__PURE__ */ jsx(
78
+ Box,
79
79
  {
80
- data: item.display,
81
- address: item.address,
82
- inset: true,
83
- imageFilter: {
84
- imageFilter: "resize",
85
- w: "500",
86
- f: "webp"
87
- }
88
- }
89
- ) }, item.address)),
80
+ sx: {
81
+ width: { xs: 120, sm: 120, md: 120, lg: 166 },
82
+ height: { xs: 120, sm: 120, md: 120, lg: 166 }
83
+ },
84
+ flexShrink: 0,
85
+ children: /* @__PURE__ */ jsx(
86
+ NFTDisplay,
87
+ {
88
+ data: item.display,
89
+ address: item.address,
90
+ inset: true,
91
+ imageFilter: {
92
+ imageFilter: "resize",
93
+ w: "500",
94
+ f: "webp"
95
+ }
96
+ }
97
+ )
98
+ },
99
+ item.address
100
+ )),
90
101
  data?.assets?.length === 0 && !loading && /* @__PURE__ */ jsx(Box, { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", height: "100%", children: /* @__PURE__ */ jsx(Empty, { children: t("common.noNFT") }) })
91
102
  ]
92
103
  }
@@ -33,10 +33,10 @@ function NotificationItem({
33
33
  sx: {
34
34
  fontSize: 14,
35
35
  display: "flex",
36
- flexFlow: isMobile ? "wrap" : "nowrap",
36
+ flexWrap: isMobile ? "wrap" : "nowrap",
37
37
  columnGap: 1,
38
38
  flex: 1,
39
- whiteSpace: "nowrap"
39
+ whiteSpace: isMobile ? "normal" : "nowrap"
40
40
  },
41
41
  children: [
42
42
  title,
@@ -11,6 +11,7 @@ import RelativeTime from "@arcblock/ux/lib/RelativeTime";
11
11
  import { translate } from "@arcblock/ux/lib/Locale/util";
12
12
  import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
13
13
  import { LOGIN_PROVIDER_NAME } from "@arcblock/ux/lib/Util/constant";
14
+ import ShortenLabel from "@arcblock/ux/lib/UserCard/Content/shorten-label";
14
15
  import { translations } from "../../libs/locales.js";
15
16
  import UserInfoItem from "./user-info-item.js";
16
17
  export default function UserInfo({
@@ -38,7 +39,7 @@ export default function UserInfo({
38
39
  userInfoListData.push({
39
40
  icon: /* @__PURE__ */ jsx(Icon, { fontSize: 16, icon: SettingsInputAntennaRoundedIcon }),
40
41
  title: t("lastLoginIp"),
41
- content: user?.lastLoginIp || t("unknown")
42
+ content: user?.lastLoginIp ? /* @__PURE__ */ jsx(ShortenLabel, { maxLength: 20, children: user?.lastLoginIp }) : t("unknown")
42
43
  });
43
44
  }
44
45
  userInfoListData.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.13.37",
3
+ "version": "2.13.39",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -34,8 +34,8 @@
34
34
  "dependencies": {
35
35
  "@abtnode/constant": "^1.16.43",
36
36
  "@abtnode/util": "^1.16.43",
37
- "@arcblock/bridge": "^2.13.37",
38
- "@arcblock/react-hooks": "^2.13.37",
37
+ "@arcblock/bridge": "^2.13.39",
38
+ "@arcblock/react-hooks": "^2.13.39",
39
39
  "@arcblock/ws": "^1.20.10",
40
40
  "@blocklet/constant": "^1.16.43",
41
41
  "@blocklet/did-space-react": "^1.0.53",
@@ -94,5 +94,5 @@
94
94
  "jest": "^29.7.0",
95
95
  "unbuild": "^2.0.0"
96
96
  },
97
- "gitHead": "68ffad141209821dc8d24962e4f4930a8d5ccd77"
97
+ "gitHead": "c50c5ab905df69e60880c0f127a4d3e9bfc70c1a"
98
98
  }
@@ -93,14 +93,20 @@ export default function Nft({ user }: { user: User }) {
93
93
  justifyItems: 'start',
94
94
  gridTemplateColumns: {
95
95
  xs: 'repeat(2, 1fr)',
96
- sm: 'repeat(2, 1fr)',
96
+ sm: 'repeat(3, 1fr)',
97
97
  md: 'repeat(3, 1fr)',
98
98
  lg: 'repeat(5, 1fr)',
99
99
  },
100
100
  gap: 2.5,
101
101
  }}>
102
102
  {data?.assets?.map((item) => (
103
- <Box key={item.address} width={166} height={166} flexShrink={0}>
103
+ <Box
104
+ key={item.address}
105
+ sx={{
106
+ width: { xs: 120, sm: 120, md: 120, lg: 166 },
107
+ height: { xs: 120, sm: 120, md: 120, lg: 166 },
108
+ }}
109
+ flexShrink={0}>
104
110
  <NFTDisplay
105
111
  data={item.display}
106
112
  address={item.address}
@@ -41,10 +41,10 @@ function NotificationItem({
41
41
  sx={{
42
42
  fontSize: 14,
43
43
  display: 'flex',
44
- flexFlow: isMobile ? 'wrap' : 'nowrap',
44
+ flexWrap: isMobile ? 'wrap' : 'nowrap',
45
45
  columnGap: 1,
46
46
  flex: 1,
47
- whiteSpace: 'nowrap',
47
+ whiteSpace: isMobile ? 'normal' : 'nowrap',
48
48
  }}>
49
49
  {title}
50
50
  {description}
@@ -11,7 +11,7 @@ import RelativeTime from '@arcblock/ux/lib/RelativeTime';
11
11
  import { translate } from '@arcblock/ux/lib/Locale/util';
12
12
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
13
13
  import { LOGIN_PROVIDER_NAME } from '@arcblock/ux/lib/Util/constant';
14
-
14
+ import ShortenLabel from '@arcblock/ux/lib/UserCard/Content/shorten-label';
15
15
  import { translations } from '../../libs/locales';
16
16
  import UserInfoItem from './user-info-item';
17
17
  import type { User } from '../../../@types';
@@ -48,7 +48,7 @@ export default function UserInfo({
48
48
  userInfoListData.push({
49
49
  icon: <Icon fontSize={16} icon={SettingsInputAntennaRoundedIcon} />,
50
50
  title: t('lastLoginIp'),
51
- content: user?.lastLoginIp || t('unknown'),
51
+ content: user?.lastLoginIp ? <ShortenLabel maxLength={20}>{user?.lastLoginIp}</ShortenLabel> : t('unknown'),
52
52
  });
53
53
  }
54
54
  userInfoListData.push({