@abtnode/ux 1.16.29-beta-a076832b → 1.16.29-beta-21b5e0ab

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.
@@ -272,15 +272,18 @@ function Branding({
272
272
  }), !readOnly && /*#__PURE__*/_jsx(IconButton, {
273
273
  className: "action",
274
274
  onClick: () => {
275
- const arr = [...params.blockletScreenshots];
276
- arr.splice(index, 1);
277
- setParams({
278
- blockletScreenshots: arr
275
+ setParams(item => {
276
+ const arr = [...item.blockletScreenshots];
277
+ arr.splice(index, 1);
278
+ return {
279
+ ...item,
280
+ blockletScreenshots: arr
281
+ };
279
282
  });
280
283
  },
281
284
  children: /*#__PURE__*/_jsx(DeleteOutlineIcon, {})
282
285
  })]
283
- })), screenshotUrls.length < 5 && /*#__PURE__*/_jsx(Box, {
286
+ }, x)), screenshotUrls.length < 5 && /*#__PURE__*/_jsx(Box, {
284
287
  sx: {
285
288
  width: 200,
286
289
  height: 140,
@@ -335,10 +338,13 @@ function Branding({
335
338
  ref: uploaderScreenshotRef,
336
339
  popup: true,
337
340
  onUploadFinish: result => {
338
- const blockletScreenshots = params.blockletScreenshots || [];
339
- blockletScreenshots.push(result.data?.filename);
340
- setParams({
341
- blockletScreenshots
341
+ setParams(item => {
342
+ const blockletScreenshots = item.blockletScreenshots || [];
343
+ blockletScreenshots.push(result.data?.filename);
344
+ return {
345
+ ...item,
346
+ blockletScreenshots
347
+ };
342
348
  });
343
349
  uploaderScreenshotRef.current.close();
344
350
  },
@@ -19,11 +19,13 @@ import { getTextColor } from '@abtnode/auth/lib/util/create-passport-svg';
19
19
  import Datatable, { getDurableData } from '@arcblock/ux/lib/Datatable';
20
20
  import RelativeTime from '@arcblock/ux/lib/RelativeTime';
21
21
  import Toast from '@arcblock/ux/lib/Toast';
22
- import { USER_TYPE } from '@abtnode/constant';
22
+ import { USER_TYPE, WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
23
23
  import { TeamEvents, PROVIDER_NAME } from '@blocklet/constant';
24
24
  import useUrlState from '@ahooksjs/use-url-state';
25
25
  import { useMemoizedFn, useMount } from 'ahooks';
26
26
  import { UserSessions } from '@blocklet/ui-react';
27
+ import getBlockletInfo from '@blocklet/meta/lib/info';
28
+ import { joinURL } from 'ufo';
27
29
  import Tag from '../../tag';
28
30
  import DidAddress from '../../did-address';
29
31
  import { useNodeContext } from '../../contexts/node';
@@ -177,18 +179,36 @@ export default function MemberList({
177
179
  provider: 'wallet'
178
180
  });
179
181
  }
180
- appInfoList.push({
181
- appId: federatedCurrent?.appId,
182
- appName: federatedCurrent?.appName,
183
- appDescription: federatedCurrent?.appDescription,
184
- appLogo: federatedCurrent?.appLogo,
185
- appPid: federatedCurrent?.appPid,
186
- appUrl: federatedCurrent?.appUrl,
187
- version: federatedCurrent?.version,
188
- // NOTICE: null 代表该值置空
189
- sourceAppPid: null,
190
- provider: 'wallet'
191
- });
182
+ if (federatedCurrent) {
183
+ appInfoList.push({
184
+ appId: federatedCurrent?.appId || blocklet.appDid,
185
+ appName: federatedCurrent?.appName,
186
+ appDescription: federatedCurrent?.appDescription,
187
+ appLogo: federatedCurrent?.appLogo,
188
+ appPid: federatedCurrent?.appPid,
189
+ appUrl: federatedCurrent?.appUrl,
190
+ version: federatedCurrent?.version,
191
+ // NOTICE: null 代表该值置空
192
+ sourceAppPid: null,
193
+ provider: 'wallet'
194
+ });
195
+ } else {
196
+ const blockletInfo = getBlockletInfo(blocklet, undefined, {
197
+ returnWallet: false
198
+ });
199
+ appInfoList.push({
200
+ appId: blockletInfo.did,
201
+ appName: blockletInfo.name,
202
+ appDescription: blockletInfo.description,
203
+ appLogo: joinURL(blockletInfo.appUrl, WELLKNOWN_SERVICE_PATH_PREFIX, '/blocklet/logo'),
204
+ appPid: blocklet?.appPid,
205
+ appUrl: blockletInfo.appUrl,
206
+ version: blockletInfo.version,
207
+ // NOTICE: null 代表该值置空
208
+ sourceAppPid: null,
209
+ provider: 'wallet'
210
+ });
211
+ }
192
212
  }
193
213
  const {
194
214
  t,
@@ -51,7 +51,7 @@ export default function InviteMember({
51
51
  teamDid,
52
52
  role: currentState.role,
53
53
  remark: trimRemark,
54
- sourceAppPid: currentState.sourceAppPid
54
+ sourceAppPid: currentState.sourceAppPid ?? null
55
55
  }
56
56
  });
57
57
  currentState.inviteInfo = inviteInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.29-beta-a076832b",
3
+ "version": "1.16.29-beta-21b5e0ab",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,25 +25,25 @@
25
25
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@abtnode/auth": "1.16.29-beta-a076832b",
29
- "@abtnode/constant": "1.16.29-beta-a076832b",
30
- "@abtnode/util": "1.16.29-beta-a076832b",
28
+ "@abtnode/auth": "1.16.29-beta-21b5e0ab",
29
+ "@abtnode/constant": "1.16.29-beta-21b5e0ab",
30
+ "@abtnode/util": "1.16.29-beta-21b5e0ab",
31
31
  "@ahooksjs/use-url-state": "^3.5.1",
32
32
  "@arcblock/did": "^1.18.124",
33
- "@arcblock/did-connect": "^2.10.2",
33
+ "@arcblock/did-connect": "^2.10.3",
34
34
  "@arcblock/did-motif": "^1.1.13",
35
- "@arcblock/icons": "^2.10.2",
36
- "@arcblock/nft-display": "2.10.2",
37
- "@arcblock/react-hooks": "^2.10.2",
38
- "@arcblock/terminal": "^2.10.2",
39
- "@arcblock/ux": "^2.10.2",
40
- "@blocklet/constant": "1.16.29-beta-a076832b",
41
- "@blocklet/js-sdk": "1.16.29-beta-a076832b",
35
+ "@arcblock/icons": "^2.10.3",
36
+ "@arcblock/nft-display": "2.10.3",
37
+ "@arcblock/react-hooks": "^2.10.3",
38
+ "@arcblock/terminal": "^2.10.3",
39
+ "@arcblock/ux": "^2.10.3",
40
+ "@blocklet/constant": "1.16.29-beta-21b5e0ab",
41
+ "@blocklet/js-sdk": "1.16.29-beta-21b5e0ab",
42
42
  "@blocklet/launcher-layout": "2.3.24",
43
43
  "@blocklet/list": "^0.13.4",
44
- "@blocklet/meta": "1.16.29-beta-a076832b",
45
- "@blocklet/ui-react": "^2.10.2",
46
- "@blocklet/uploader": "^0.1.16",
44
+ "@blocklet/meta": "1.16.29-beta-21b5e0ab",
45
+ "@blocklet/ui-react": "^2.10.3",
46
+ "@blocklet/uploader": "0.1.17",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
49
49
  "@iconify-icons/logos": "^1.2.36",
@@ -108,5 +108,5 @@
108
108
  "jest": "^29.7.0",
109
109
  "jest-environment-jsdom": "^29.7.0"
110
110
  },
111
- "gitHead": "aa0791bd43f8c7068b24bc426ce0f0e4d8a3f583"
111
+ "gitHead": "89bcff8f3769f77e36e4d04127093e2480246b15"
112
112
  }