@abtnode/ux 1.16.15-beta-12f50442 → 1.16.15-beta-d649cecc

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.
@@ -307,10 +307,6 @@ function BlockletEnvironment({
307
307
  className: "config-form",
308
308
  component: Divider,
309
309
  my: 3
310
- }), /*#__PURE__*/_jsx(Box, {
311
- className: "config-form",
312
- component: Divider,
313
- my: 3
314
310
  }), /*#__PURE__*/_jsx(Box, {
315
311
  className: "config-form",
316
312
  mt: 2,
@@ -342,6 +338,10 @@ function BlockletEnvironment({
342
338
  initialValue: (site.corsAllowedOrigins || []).join(', '),
343
339
  onSubmit: onUpdateCors
344
340
  })]
341
+ }), /*#__PURE__*/_jsx(Box, {
342
+ className: "config-form",
343
+ component: Divider,
344
+ my: 3
345
345
  }), /*#__PURE__*/_jsx(Box, {
346
346
  mb: 2,
347
347
  className: "config-label",
@@ -269,6 +269,20 @@ function FederatedSiteList({
269
269
  }
270
270
  });
271
271
  });
272
+ const disbandFederatedLogin = useMemoizedFn(() => {
273
+ confirmApi.open({
274
+ title: t('federated.disbandFederatedLogin'),
275
+ content: t('federated.disbandFederatedLoginDescription'),
276
+ async onConfirm(close) {
277
+ await api.disbandFederatedLogin({
278
+ input: {
279
+ did: blocklet.appPid
280
+ }
281
+ });
282
+ close();
283
+ }
284
+ });
285
+ });
272
286
  const customButtons = [];
273
287
  if (mode !== 'master') {
274
288
  customButtons.push( /*#__PURE__*/_jsx(Button, {
@@ -280,7 +294,7 @@ function FederatedSiteList({
280
294
  ml: 1
281
295
  },
282
296
  children: t('federated.quitFederatedLogin')
283
- }));
297
+ }, "quitFederatedLogin"));
284
298
  } else {
285
299
  customButtons.push( /*#__PURE__*/_jsx(Button, {
286
300
  size: "small",
@@ -290,7 +304,17 @@ function FederatedSiteList({
290
304
  ml: 1
291
305
  },
292
306
  children: t('federated.inviteJoinFederatedLogin')
293
- }));
307
+ }, "inviteJoinFederatedLogin"));
308
+ customButtons.push( /*#__PURE__*/_jsx(Button, {
309
+ color: "error",
310
+ size: "small",
311
+ variant: "contained",
312
+ onClick: disbandFederatedLogin,
313
+ sx: {
314
+ ml: 1
315
+ },
316
+ children: t('federated.disbandFederatedLogin')
317
+ }, "disbandFederatedLogin"));
294
318
  }
295
319
  return /*#__PURE__*/_jsxs(_Fragment, {
296
320
  children: [/*#__PURE__*/_jsx(Datatable, {
@@ -13,7 +13,8 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
13
13
  title: '',
14
14
  content: '',
15
15
  onConfirm: noop,
16
- onCancel: noop
16
+ onCancel: noop,
17
+ loading: false
17
18
  });
18
19
  const open = useMemoizedFn((params = {}) => {
19
20
  state.show = true;
@@ -21,6 +22,7 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
21
22
  state.content = params.content;
22
23
  state.onConfirm = params.onConfirm || noop;
23
24
  state.onCancel = params.onCancel || noop;
25
+ state.loading = false;
24
26
  });
25
27
  const reset = useMemoizedFn(() => {
26
28
  state.title = '';
@@ -38,8 +40,13 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
38
40
  close();
39
41
  state?.onCancel();
40
42
  }, []);
41
- const onConfirm = useMemoizedFn(() => {
42
- state?.onConfirm(close);
43
+ const onConfirm = useMemoizedFn(async () => {
44
+ state.loading = true;
45
+ try {
46
+ await state?.onConfirm(close);
47
+ } finally {
48
+ state.loading = false;
49
+ }
43
50
  }, []);
44
51
  useImperativeHandle(ref, () => {
45
52
  return {
@@ -56,7 +63,8 @@ const ConfirmHolder = /*#__PURE__*/forwardRef((props, ref) => {
56
63
  text: t('common.confirm'),
57
64
  props: {
58
65
  variant: 'contained',
59
- color: 'primary'
66
+ color: 'primary',
67
+ loading: state.loading
60
68
  }
61
69
  },
62
70
  cancelButton: {
package/es/locales/en.js CHANGED
@@ -313,7 +313,8 @@ module.exports = {
313
313
  startTime: 'Start time',
314
314
  endTime: 'End time',
315
315
  selected: 'Selected',
316
- timeoutError: 'Timeout error'
316
+ timeoutError: 'Timeout error',
317
+ tags: 'Tags'
317
318
  },
318
319
  blocklet: {
319
320
  external: 'External',
@@ -1558,6 +1559,8 @@ module.exports = {
1558
1559
  approved: 'Approved',
1559
1560
  rejected: 'Rejected',
1560
1561
  revoked: 'Revoked'
1561
- }
1562
+ },
1563
+ disbandFederatedLogin: 'Disband federated login',
1564
+ disbandFederatedLoginDescription: 'After disband federated login, all member site will quit federated login automatically'
1562
1565
  }
1563
1566
  };
package/es/locales/zh.js CHANGED
@@ -318,7 +318,8 @@ module.exports = {
318
318
  startTime: '开始时间',
319
319
  endTime: '结束时间',
320
320
  selected: '已选中',
321
- timeoutError: '超时错误'
321
+ timeoutError: '超时错误',
322
+ tags: '标签'
322
323
  },
323
324
  blocklet: {
324
325
  external: '外部',
@@ -1561,6 +1562,8 @@ module.exports = {
1561
1562
  approved: '已通过',
1562
1563
  rejected: '已拒绝',
1563
1564
  revoked: '已撤销'
1564
- }
1565
+ },
1566
+ disbandFederatedLogin: '解散统一登录',
1567
+ disbandFederatedLoginDescription: '解散统一登录后,将自动让所有成员站点自动退出统一登录站点群'
1565
1568
  }
1566
1569
  };
@@ -17,12 +17,14 @@ import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
17
17
  import Button from '@arcblock/ux/lib/Button';
18
18
  import PersonIcon from '@arcblock/icons/lib/PersonIcon';
19
19
  import ExternalIssuerIcon from '@arcblock/icons/lib/ExternalIssuerIcon';
20
+ import { getTextColor } from '@abtnode/auth/lib/util/create-passport-svg';
20
21
  import Datatable, { getDurableData } from '@arcblock/ux/lib/Datatable';
21
22
  import RelativeTime from '@arcblock/ux/lib/RelativeTime';
22
23
  import { EVENTS, USER_TYPE } from '@abtnode/constant';
23
24
  import useUrlState from '@ahooksjs/use-url-state';
24
25
  import { useMount } from 'ahooks';
25
26
  import Toast from '@arcblock/ux/lib/Toast';
27
+ import Tag from '../../tag';
26
28
  import DidAddress from '../../did-address';
27
29
  import { useNodeContext } from '../../contexts/node';
28
30
  import { useTeamContext } from '../../contexts/team';
@@ -62,7 +64,7 @@ function SimpleInfo({
62
64
  className: "member-avatar",
63
65
  children: [/*#__PURE__*/_jsx(Avatar, {
64
66
  src: `${user.avatar}?imageFilter=resize&w=48&h=48`,
65
- size: 24,
67
+ size: 32,
66
68
  did: user.did,
67
69
  shape: "circle",
68
70
  style: {
@@ -79,9 +81,22 @@ function SimpleInfo({
79
81
  children: /*#__PURE__*/_jsx(ExternalIssuerIcon, {})
80
82
  })
81
83
  })]
82
- }), /*#__PURE__*/_jsx("div", {
83
- className: "member-text",
84
- children: user.fullName
84
+ }), /*#__PURE__*/_jsxs("div", {
85
+ className: "member-meta",
86
+ children: [/*#__PURE__*/_jsx("div", {
87
+ className: "member-text",
88
+ children: user.fullName
89
+ }), Array.isArray(user.tags) && user.tags.length > 0 && /*#__PURE__*/_jsx("div", {
90
+ className: "member-tags",
91
+ children: user.tags.map(x => /*#__PURE__*/_jsx(Tag, {
92
+ style: {
93
+ background: x.color,
94
+ color: getTextColor(x.color),
95
+ marginRight: 4
96
+ },
97
+ children: x.title
98
+ }, x.id))
99
+ })]
85
100
  })]
86
101
  });
87
102
  return user.approved ? main : /*#__PURE__*/_jsx(Box, {
@@ -171,7 +186,9 @@ export default function MemberList({
171
186
  num: getCount(userCounts, ROLE_NONE)
172
187
  });
173
188
  const getUsers = () => {
174
- const query = {};
189
+ const query = {
190
+ includeTags: true
191
+ };
175
192
  if (search.hideBlocked) {
176
193
  query.approved = true;
177
194
  }
@@ -600,8 +617,12 @@ const Div = styled.div`
600
617
  justify-content: center;
601
618
  align-items: center;
602
619
  }
603
- .member-text {
620
+ .member-meta {
604
621
  margin-left: 10px;
622
+ display: flex;
623
+ flex-direction: column;
624
+ justify-content: center;
625
+ align-items: flex-start;
605
626
  }
606
627
  .badge-block {
607
628
  width: 14px;
@@ -12,9 +12,11 @@ import InfoRow from '@arcblock/ux/lib/InfoRow';
12
12
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
13
13
  import ForbidLoginIcon from '@arcblock/icons/lib/ForbidLoginIcon';
14
14
  import AllowLoginIcon from '@arcblock/icons/lib/AllowLoginIcon';
15
+ import { getTextColor } from '@abtnode/auth/lib/util/create-passport-svg';
15
16
  import { useReactive } from 'ahooks';
16
17
  import { EVENTS, USER_TYPE } from '@abtnode/constant';
17
18
  import { LOGIN_PROVIDER } from '@blocklet/constant';
19
+ import Tag from '../../tag';
18
20
  import DidAddress from '../../did-address';
19
21
  import Permission from '../../permission';
20
22
  import { useNodeContext } from '../../contexts/node';
@@ -106,6 +108,9 @@ export default function Member({
106
108
  teamDid: _teamDid,
107
109
  user: {
108
110
  did: _userDid
111
+ },
112
+ options: {
113
+ includeTags: true
109
114
  }
110
115
  }
111
116
  },
@@ -186,7 +191,17 @@ export default function Member({
186
191
  }, {
187
192
  name: t('common.remark'),
188
193
  value: pageState.user.remark || '--'
189
- }].filter(Boolean) : [];
194
+ }, Array.isArray(pageState.user.tags) && pageState.user.tags.length > 0 ? {
195
+ name: t('common.tags'),
196
+ value: pageState.user.tags.map(x => /*#__PURE__*/_jsx(Tag, {
197
+ style: {
198
+ background: x.color,
199
+ color: getTextColor(x.color),
200
+ marginRight: 4
201
+ },
202
+ children: x.title
203
+ }, x.id))
204
+ } : null].filter(Boolean) : [];
190
205
  return rows.map(row => {
191
206
  if (row.name === t('common.did')) {
192
207
  return /*#__PURE__*/_jsx(InfoRow, {
@@ -326,10 +326,6 @@ function BlockletEnvironment(_ref) {
326
326
  className: "config-form",
327
327
  component: _Divider.default,
328
328
  my: 3
329
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
330
- className: "config-form",
331
- component: _Divider.default,
332
- my: 3
333
329
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
334
330
  className: "config-form",
335
331
  mt: 2,
@@ -361,6 +357,10 @@ function BlockletEnvironment(_ref) {
361
357
  initialValue: (site.corsAllowedOrigins || []).join(', '),
362
358
  onSubmit: onUpdateCors
363
359
  })]
360
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
361
+ className: "config-form",
362
+ component: _Divider.default,
363
+ my: 3
364
364
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
365
365
  mb: 2,
366
366
  className: "config-label",
@@ -282,6 +282,20 @@ function FederatedSiteList(_ref) {
282
282
  }
283
283
  });
284
284
  });
285
+ const disbandFederatedLogin = (0, _ahooks.useMemoizedFn)(() => {
286
+ confirmApi.open({
287
+ title: t('federated.disbandFederatedLogin'),
288
+ content: t('federated.disbandFederatedLoginDescription'),
289
+ async onConfirm(close) {
290
+ await api.disbandFederatedLogin({
291
+ input: {
292
+ did: blocklet.appPid
293
+ }
294
+ });
295
+ close();
296
+ }
297
+ });
298
+ });
285
299
  const customButtons = [];
286
300
  if (mode !== 'master') {
287
301
  customButtons.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
@@ -293,7 +307,7 @@ function FederatedSiteList(_ref) {
293
307
  ml: 1
294
308
  },
295
309
  children: t('federated.quitFederatedLogin')
296
- }));
310
+ }, "quitFederatedLogin"));
297
311
  } else {
298
312
  customButtons.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
299
313
  size: "small",
@@ -303,7 +317,17 @@ function FederatedSiteList(_ref) {
303
317
  ml: 1
304
318
  },
305
319
  children: t('federated.inviteJoinFederatedLogin')
306
- }));
320
+ }, "inviteJoinFederatedLogin"));
321
+ customButtons.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
322
+ color: "error",
323
+ size: "small",
324
+ variant: "contained",
325
+ onClick: disbandFederatedLogin,
326
+ sx: {
327
+ ml: 1
328
+ },
329
+ children: t('federated.disbandFederatedLogin')
330
+ }, "disbandFederatedLogin"));
307
331
  }
308
332
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
309
333
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Datatable.default, {
@@ -20,7 +20,8 @@ const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
20
20
  title: '',
21
21
  content: '',
22
22
  onConfirm: _noop.default,
23
- onCancel: _noop.default
23
+ onCancel: _noop.default,
24
+ loading: false
24
25
  });
25
26
  const open = (0, _ahooks.useMemoizedFn)(function () {
26
27
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -29,6 +30,7 @@ const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
29
30
  state.content = params.content;
30
31
  state.onConfirm = params.onConfirm || _noop.default;
31
32
  state.onCancel = params.onCancel || _noop.default;
33
+ state.loading = false;
32
34
  });
33
35
  const reset = (0, _ahooks.useMemoizedFn)(() => {
34
36
  state.title = '';
@@ -46,8 +48,13 @@ const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
46
48
  close();
47
49
  state === null || state === void 0 ? void 0 : state.onCancel();
48
50
  }, []);
49
- const onConfirm = (0, _ahooks.useMemoizedFn)(() => {
50
- state === null || state === void 0 ? void 0 : state.onConfirm(close);
51
+ const onConfirm = (0, _ahooks.useMemoizedFn)(async () => {
52
+ state.loading = true;
53
+ try {
54
+ await (state === null || state === void 0 ? void 0 : state.onConfirm(close));
55
+ } finally {
56
+ state.loading = false;
57
+ }
51
58
  }, []);
52
59
  (0, _react.useImperativeHandle)(ref, () => {
53
60
  return {
@@ -64,7 +71,8 @@ const ConfirmHolder = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
64
71
  text: t('common.confirm'),
65
72
  props: {
66
73
  variant: 'contained',
67
- color: 'primary'
74
+ color: 'primary',
75
+ loading: state.loading
68
76
  }
69
77
  },
70
78
  cancelButton: {
package/lib/locales/en.js CHANGED
@@ -315,7 +315,8 @@ module.exports = {
315
315
  startTime: 'Start time',
316
316
  endTime: 'End time',
317
317
  selected: 'Selected',
318
- timeoutError: 'Timeout error'
318
+ timeoutError: 'Timeout error',
319
+ tags: 'Tags'
319
320
  },
320
321
  blocklet: {
321
322
  external: 'External',
@@ -1560,6 +1561,8 @@ module.exports = {
1560
1561
  approved: 'Approved',
1561
1562
  rejected: 'Rejected',
1562
1563
  revoked: 'Revoked'
1563
- }
1564
+ },
1565
+ disbandFederatedLogin: 'Disband federated login',
1566
+ disbandFederatedLoginDescription: 'After disband federated login, all member site will quit federated login automatically'
1564
1567
  }
1565
1568
  };
package/lib/locales/zh.js CHANGED
@@ -320,7 +320,8 @@ module.exports = {
320
320
  startTime: '开始时间',
321
321
  endTime: '结束时间',
322
322
  selected: '已选中',
323
- timeoutError: '超时错误'
323
+ timeoutError: '超时错误',
324
+ tags: '标签'
324
325
  },
325
326
  blocklet: {
326
327
  external: '外部',
@@ -1563,6 +1564,8 @@ module.exports = {
1563
1564
  approved: '已通过',
1564
1565
  rejected: '已拒绝',
1565
1566
  revoked: '已撤销'
1566
- }
1567
+ },
1568
+ disbandFederatedLogin: '解散统一登录',
1569
+ disbandFederatedLoginDescription: '解散统一登录后,将自动让所有成员站点自动退出统一登录站点群'
1567
1570
  }
1568
1571
  };
@@ -21,12 +21,14 @@ var _context = require("@arcblock/ux/lib/Locale/context");
21
21
  var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
22
22
  var _PersonIcon = _interopRequireDefault(require("@arcblock/icons/lib/PersonIcon"));
23
23
  var _ExternalIssuerIcon = _interopRequireDefault(require("@arcblock/icons/lib/ExternalIssuerIcon"));
24
+ var _createPassportSvg = require("@abtnode/auth/lib/util/create-passport-svg");
24
25
  var _Datatable = _interopRequireWildcard(require("@arcblock/ux/lib/Datatable"));
25
26
  var _RelativeTime = _interopRequireDefault(require("@arcblock/ux/lib/RelativeTime"));
26
27
  var _constant = require("@abtnode/constant");
27
28
  var _useUrlState = _interopRequireDefault(require("@ahooksjs/use-url-state"));
28
29
  var _ahooks = require("ahooks");
29
30
  var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
31
+ var _tag = _interopRequireDefault(require("../../tag"));
30
32
  var _didAddress = _interopRequireDefault(require("../../did-address"));
31
33
  var _node = require("../../contexts/node");
32
34
  var _team = require("../../contexts/team");
@@ -79,7 +81,7 @@ function SimpleInfo(_ref) {
79
81
  className: "member-avatar",
80
82
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
81
83
  src: "".concat(user.avatar, "?imageFilter=resize&w=48&h=48"),
82
- size: 24,
84
+ size: 32,
83
85
  did: user.did,
84
86
  shape: "circle",
85
87
  style: {
@@ -96,9 +98,22 @@ function SimpleInfo(_ref) {
96
98
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExternalIssuerIcon.default, {})
97
99
  })
98
100
  })]
99
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
100
- className: "member-text",
101
- children: user.fullName
101
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
102
+ className: "member-meta",
103
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
104
+ className: "member-text",
105
+ children: user.fullName
106
+ }), Array.isArray(user.tags) && user.tags.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
107
+ className: "member-tags",
108
+ children: user.tags.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
109
+ style: {
110
+ background: x.color,
111
+ color: (0, _createPassportSvg.getTextColor)(x.color),
112
+ marginRight: 4
113
+ },
114
+ children: x.title
115
+ }, x.id))
116
+ })]
102
117
  })]
103
118
  });
104
119
  return user.approved ? main : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
@@ -189,7 +204,9 @@ function MemberList(_ref2) {
189
204
  num: getCount(userCounts, ROLE_NONE)
190
205
  });
191
206
  const getUsers = () => {
192
- const query = {};
207
+ const query = {
208
+ includeTags: true
209
+ };
193
210
  if (search.hideBlocked) {
194
211
  query.approved = true;
195
212
  }
@@ -534,7 +551,7 @@ function MemberList(_ref2) {
534
551
  })]
535
552
  });
536
553
  }
537
- const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ", "px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-text {\n margin-left: 10px;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])), props => props.theme.breakpoints.values.md);
554
+ const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ", "px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-meta {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])), props => props.theme.breakpoints.values.md);
538
555
  MemberList.propTypes = {
539
556
  type: _propTypes.default.oneOf(['server', 'blocklet']).isRequired,
540
557
  createPassportSvg: _propTypes.default.func.isRequired
@@ -17,9 +17,11 @@ var _InfoRow = _interopRequireDefault(require("@arcblock/ux/lib/InfoRow"));
17
17
  var _context = require("@arcblock/ux/lib/Locale/context");
18
18
  var _ForbidLoginIcon = _interopRequireDefault(require("@arcblock/icons/lib/ForbidLoginIcon"));
19
19
  var _AllowLoginIcon = _interopRequireDefault(require("@arcblock/icons/lib/AllowLoginIcon"));
20
+ var _createPassportSvg = require("@abtnode/auth/lib/util/create-passport-svg");
20
21
  var _ahooks = require("ahooks");
21
22
  var _constant = require("@abtnode/constant");
22
23
  var _constant2 = require("@blocklet/constant");
24
+ var _tag = _interopRequireDefault(require("../../tag"));
23
25
  var _didAddress = _interopRequireDefault(require("../../did-address"));
24
26
  var _permission = _interopRequireDefault(require("../../permission"));
25
27
  var _node = require("../../contexts/node");
@@ -124,6 +126,9 @@ function Member(_ref3) {
124
126
  teamDid: _teamDid,
125
127
  user: {
126
128
  did: _userDid
129
+ },
130
+ options: {
131
+ includeTags: true
127
132
  }
128
133
  }
129
134
  },
@@ -205,7 +210,17 @@ function Member(_ref3) {
205
210
  }, {
206
211
  name: t('common.remark'),
207
212
  value: pageState.user.remark || '--'
208
- }].filter(Boolean) : [];
213
+ }, Array.isArray(pageState.user.tags) && pageState.user.tags.length > 0 ? {
214
+ name: t('common.tags'),
215
+ value: pageState.user.tags.map(x => /*#__PURE__*/(0, _jsxRuntime.jsx)(_tag.default, {
216
+ style: {
217
+ background: x.color,
218
+ color: (0, _createPassportSvg.getTextColor)(x.color),
219
+ marginRight: 4
220
+ },
221
+ children: x.title
222
+ }, x.id))
223
+ } : null].filter(Boolean) : [];
209
224
  return rows.map(row => {
210
225
  if (row.name === t('common.did')) {
211
226
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InfoRow.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.15-beta-12f50442",
3
+ "version": "1.16.15-beta-d649cecc",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,9 +27,9 @@
27
27
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/auth": "1.16.15-beta-12f50442",
31
- "@abtnode/constant": "1.16.15-beta-12f50442",
32
- "@abtnode/util": "1.16.15-beta-12f50442",
30
+ "@abtnode/auth": "1.16.15-beta-d649cecc",
31
+ "@abtnode/constant": "1.16.15-beta-d649cecc",
32
+ "@abtnode/util": "1.16.15-beta-d649cecc",
33
33
  "@ahooksjs/use-url-state": "^3.5.1",
34
34
  "@arcblock/did": "^1.18.89",
35
35
  "@arcblock/did-connect": "^2.7.9",
@@ -39,10 +39,10 @@
39
39
  "@arcblock/react-hooks": "^2.7.9",
40
40
  "@arcblock/terminal": "^2.7.9",
41
41
  "@arcblock/ux": "^2.7.9",
42
- "@blocklet/constant": "1.16.15-beta-12f50442",
42
+ "@blocklet/constant": "1.16.15-beta-d649cecc",
43
43
  "@blocklet/launcher-layout": "2.1.101",
44
44
  "@blocklet/list": "^0.12.31",
45
- "@blocklet/meta": "1.16.15-beta-12f50442",
45
+ "@blocklet/meta": "1.16.15-beta-d649cecc",
46
46
  "@blocklet/ui-react": "^2.7.9",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
@@ -98,7 +98,7 @@
98
98
  "babel-plugin-inline-react-svg": "^1.1.2",
99
99
  "glob": "^10.3.3"
100
100
  },
101
- "gitHead": "48bda4b29eb31a70e0eb9cab0bce6e544960c7fd",
101
+ "gitHead": "56941d1056a9e5f189992ace6e93971aa4226d07",
102
102
  "exports": {
103
103
  ".": {
104
104
  "import": "./es/index.js",