@blocklet/ui-react 3.0.8 → 3.0.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.
- package/lib/BlockletStudio/index.js +70 -71
- package/lib/ComponentInstaller/index.js +85 -88
- package/lib/ComponentInstaller/installer-item.js +47 -53
- package/lib/ComponentInstaller/use-component-installed.js +32 -38
- package/lib/ComponentManager/components/add-component.js +47 -50
- package/lib/ComponentManager/components/publish-component.js +30 -31
- package/lib/ComponentManager/components/resource-dialog.js +28 -30
- package/lib/Dashboard/index.js +59 -61
- package/lib/Footer/index.js +51 -52
- package/lib/Footer/internal-footer.js +43 -47
- package/lib/Footer/layout/standard.js +11 -12
- package/lib/Footer/links.js +25 -28
- package/lib/Footer/social-media.js +17 -17
- package/lib/Header/index.js +81 -83
- package/lib/Notifications/Snackbar.js +76 -77
- package/lib/Notifications/hooks/use-title.js +34 -34
- package/lib/Notifications/utils.js +56 -60
- package/lib/UserCenter/components/config-inviter.js +17 -18
- package/lib/UserCenter/components/danger-zone.js +49 -52
- package/lib/UserCenter/components/nft.js +44 -45
- package/lib/UserCenter/components/notification.js +92 -99
- package/lib/UserCenter/components/passport.js +22 -22
- package/lib/UserCenter/components/privacy.js +6 -6
- package/lib/UserCenter/components/settings.js +40 -43
- package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
- package/lib/UserCenter/components/status-dialog/index.js +112 -114
- package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
- package/lib/UserCenter/components/status-selector/index.js +13 -13
- package/lib/UserCenter/components/storage/action.js +21 -22
- package/lib/UserCenter/components/storage/delete.js +24 -24
- package/lib/UserCenter/components/third-party-login/index.js +53 -53
- package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
- package/lib/UserCenter/components/user-center.js +198 -207
- package/lib/UserCenter/components/user-info/metadata.js +343 -353
- package/lib/UserCenter/components/user-info/switch-role.js +17 -20
- package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
- package/lib/UserCenter/components/user-info/user-info.js +40 -40
- package/lib/UserCenter/components/user-info/user-status.js +97 -99
- package/lib/UserCenter/components/user-info/utils.js +34 -35
- package/lib/UserSessions/components/user-session-info.js +25 -28
- package/lib/UserSessions/components/user-sessions.js +169 -181
- package/lib/blocklets.js +62 -72
- package/lib/common/domain-warning.js +31 -31
- package/lib/common/header-addons.js +49 -53
- package/lib/common/notification-addon.js +29 -32
- package/lib/common/ws.js +17 -18
- package/lib/contexts/config-user-space.js +16 -19
- package/lib/utils.js +44 -48
- package/package.json +9 -9
|
@@ -1,170 +1,164 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useReactive as
|
|
4
|
-
import { translate as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getVisitorId as
|
|
9
|
-
import { useConfirm as
|
|
10
|
-
import
|
|
11
|
-
import { Box as
|
|
12
|
-
import { memo as
|
|
13
|
-
import { mergeSx as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { client as
|
|
17
|
-
import { translations as
|
|
18
|
-
import { ip2Region as
|
|
19
|
-
const
|
|
1
|
+
import { jsx as n, jsxs as s, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import G from "@arcblock/ux/lib/Datatable";
|
|
3
|
+
import { useReactive as z, useMemoizedFn as w, useMount as $, useRequest as J, useCreation as v } from "ahooks";
|
|
4
|
+
import { translate as K } from "@arcblock/ux/lib/Locale/util";
|
|
5
|
+
import { useLocaleContext as j } from "@arcblock/ux/lib/Locale/context";
|
|
6
|
+
import T from "@arcblock/ux/lib/RelativeTime";
|
|
7
|
+
import S from "ua-parser-js";
|
|
8
|
+
import { getVisitorId as X } from "@arcblock/ux/lib/Util";
|
|
9
|
+
import { useConfirm as Y } from "@arcblock/ux/lib/Dialog";
|
|
10
|
+
import Z from "p-queue";
|
|
11
|
+
import { Box as d, Typography as a, CircularProgress as _, useMediaQuery as ee, Tooltip as te, Button as k, RadioGroup as oe, FormControlLabel as B, Radio as C } from "@mui/material";
|
|
12
|
+
import { memo as ne, useEffect as re } from "react";
|
|
13
|
+
import { mergeSx as M } from "@arcblock/ux/lib/Util/style";
|
|
14
|
+
import ie from "../../hooks/use-mobile.js";
|
|
15
|
+
import se from "./user-session-info.js";
|
|
16
|
+
import { client as P } from "../../libs/client.js";
|
|
17
|
+
import { translations as ae } from "../libs/locales.js";
|
|
18
|
+
import { ip2Region as le } from "../libs/utils.js";
|
|
19
|
+
const W = (u) => new S(u, {
|
|
20
20
|
// eslint-disable-next-line no-useless-escape
|
|
21
|
-
browser: [[/(ArcWallet)\/([\w\.]+)/i], [
|
|
22
|
-
}).getResult(),
|
|
21
|
+
browser: [[/(ArcWallet)\/([\w\.]+)/i], [S.BROWSER.NAME, S.BROWSER.VERSION]]
|
|
22
|
+
}).getResult(), O = {
|
|
23
23
|
display: "flex",
|
|
24
24
|
justifyContent: "flex-end",
|
|
25
25
|
textAlign: "right"
|
|
26
|
-
},
|
|
27
|
-
const
|
|
26
|
+
}, ce = new Z({ concurrency: 1 }), de = ne(({ userSession: u, isMobile: h = !1 }) => {
|
|
27
|
+
const l = z({
|
|
28
28
|
loading: !0,
|
|
29
29
|
ipRegion: ""
|
|
30
|
-
}), { t:
|
|
31
|
-
return
|
|
32
|
-
|
|
30
|
+
}), { t: f } = j();
|
|
31
|
+
return re(() => {
|
|
32
|
+
ce.add(async () => {
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
l.ipRegion = await le(u.lastLoginIp);
|
|
35
35
|
} finally {
|
|
36
|
-
|
|
36
|
+
l.loading = !1;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
}, [
|
|
40
|
-
|
|
39
|
+
}, [l, u.lastLoginIp]), /* @__PURE__ */ n(
|
|
40
|
+
d,
|
|
41
41
|
{
|
|
42
|
-
...
|
|
42
|
+
...h && {
|
|
43
43
|
display: "flex",
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
justifyContent: "flex-end",
|
|
46
46
|
gap: 1,
|
|
47
47
|
flexWrap: "wrap"
|
|
48
48
|
},
|
|
49
|
-
children:
|
|
50
|
-
/* @__PURE__ */ n(
|
|
51
|
-
/* @__PURE__ */ n(
|
|
52
|
-
] }) : /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ n(
|
|
54
|
-
|
|
49
|
+
children: l.ipRegion ? /* @__PURE__ */ s(A, { children: [
|
|
50
|
+
/* @__PURE__ */ n(a, { variant: "body2", children: l.ipRegion }),
|
|
51
|
+
/* @__PURE__ */ n(a, { variant: "body2", color: "grey", children: u.lastLoginIp || f("unknown") })
|
|
52
|
+
] }) : /* @__PURE__ */ s(A, { children: [
|
|
53
|
+
/* @__PURE__ */ n(a, { children: u.lastLoginIp || f("unknown") }),
|
|
54
|
+
l.loading ? /* @__PURE__ */ n(a, { variant: "body2", color: "grey", sx: { textAlign: "center" }, children: /* @__PURE__ */ n(_, { size: 12, color: "inherit" }) }) : null
|
|
55
55
|
] })
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
});
|
|
59
|
-
function
|
|
60
|
-
user:
|
|
61
|
-
showAction:
|
|
62
|
-
showUser:
|
|
63
|
-
getUserSessions:
|
|
64
|
-
showOffline:
|
|
59
|
+
function Ae({
|
|
60
|
+
user: u,
|
|
61
|
+
showAction: h = !0,
|
|
62
|
+
showUser: l = !0,
|
|
63
|
+
getUserSessions: f,
|
|
64
|
+
showOffline: I = !1
|
|
65
65
|
}) {
|
|
66
|
-
|
|
67
|
-
const r = L({
|
|
66
|
+
const r = z({
|
|
68
67
|
status: "online",
|
|
69
68
|
page: 1,
|
|
70
69
|
pageSize: 10
|
|
71
|
-
}),
|
|
70
|
+
}), p = z({
|
|
72
71
|
online: 0,
|
|
73
72
|
expired: 0,
|
|
74
73
|
offline: 0
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
const e = await x({
|
|
74
|
+
}), y = X(), { locale: b } = j(), m = ie({ key: "md" }), H = ee((e) => e.breakpoints.down("lg")), { confirmApi: R, confirmHolder: D } = Y(), t = w((e, o = {}) => K(ae, e, b, "en", o)), E = w(async () => {
|
|
75
|
+
const e = await f({
|
|
78
76
|
page: r.page,
|
|
79
77
|
pageSize: r.pageSize,
|
|
80
78
|
status: r.status
|
|
81
|
-
}),
|
|
82
|
-
return
|
|
83
|
-
total:
|
|
84
|
-
list:
|
|
79
|
+
}), o = e?.paging?.total || 0;
|
|
80
|
+
return p[r.status] = o, {
|
|
81
|
+
total: o,
|
|
82
|
+
list: e?.list || []
|
|
85
83
|
};
|
|
86
84
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const e = await x({
|
|
85
|
+
$(async () => {
|
|
86
|
+
const e = await f({
|
|
90
87
|
page: 1,
|
|
91
88
|
pageSize: 1,
|
|
92
89
|
status: "expired"
|
|
93
90
|
});
|
|
94
|
-
|
|
95
|
-
const
|
|
91
|
+
p.expired = e?.paging?.total || 0;
|
|
92
|
+
const o = await f({
|
|
96
93
|
page: 1,
|
|
97
94
|
pageSize: 1,
|
|
98
95
|
status: "offline"
|
|
99
96
|
});
|
|
100
|
-
|
|
97
|
+
p.offline = o?.paging?.total || 0;
|
|
101
98
|
});
|
|
102
|
-
const
|
|
99
|
+
const c = J(E, {
|
|
103
100
|
refreshDeps: [r.status, r.page, r.pageSize]
|
|
104
|
-
}),
|
|
105
|
-
var e;
|
|
106
|
-
return ((e = p.data) == null ? void 0 : e.list) || [];
|
|
107
|
-
}, [(k = p.data) == null ? void 0 : k.list]), Q = B(() => {
|
|
101
|
+
}), i = v(() => c.data?.list || [], [c.data?.list]), F = v(() => {
|
|
108
102
|
const e = r.status;
|
|
109
|
-
return e === "online" ?
|
|
110
|
-
}, [
|
|
111
|
-
|
|
112
|
-
title:
|
|
113
|
-
content:
|
|
114
|
-
confirmButtonText:
|
|
103
|
+
return e === "online" ? p[e] <= 1 : p[e] === 0;
|
|
104
|
+
}, [i, y]), x = v(() => M({}, m ? O : {}), [m]), N = w(({ visitorId: e }) => {
|
|
105
|
+
R.open({
|
|
106
|
+
title: t("logoutThisSession"),
|
|
107
|
+
content: t("logoutThisSessionConfirm"),
|
|
108
|
+
confirmButtonText: t("confirm"),
|
|
115
109
|
confirmButtonProps: {
|
|
116
110
|
color: "error"
|
|
117
111
|
},
|
|
118
|
-
cancelButtonText:
|
|
112
|
+
cancelButtonText: t("cancel"),
|
|
119
113
|
onConfirm: async () => {
|
|
120
|
-
await
|
|
114
|
+
await P.user.logout({
|
|
121
115
|
visitorId: e,
|
|
122
116
|
includeFederated: !0
|
|
123
117
|
});
|
|
124
|
-
const { page:
|
|
125
|
-
|
|
118
|
+
const { page: o = 0 } = r, { list: g = [] } = c.data || {}, Q = g.length || 0;
|
|
119
|
+
o > 1 && Q === 1 && (r.page = Math.max(o - 1, 1)), c.refresh(), R.close();
|
|
126
120
|
}
|
|
127
121
|
});
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
title:
|
|
131
|
-
type:
|
|
122
|
+
}), U = w(() => {
|
|
123
|
+
R.open({
|
|
124
|
+
title: t("logoutAllSession", {
|
|
125
|
+
type: t(r.status)
|
|
132
126
|
}),
|
|
133
|
-
content:
|
|
134
|
-
type:
|
|
127
|
+
content: t("logoutAllSessionConfirm", {
|
|
128
|
+
type: t(r.status)
|
|
135
129
|
}),
|
|
136
|
-
confirmButtonText:
|
|
130
|
+
confirmButtonText: t("confirm"),
|
|
137
131
|
confirmButtonProps: {
|
|
138
132
|
color: "error"
|
|
139
133
|
},
|
|
140
|
-
cancelButtonText:
|
|
134
|
+
cancelButtonText: t("cancel"),
|
|
141
135
|
onConfirm: async () => {
|
|
142
|
-
await
|
|
136
|
+
await P.user.logout({
|
|
143
137
|
status: r.status,
|
|
144
|
-
visitorId:
|
|
138
|
+
visitorId: y,
|
|
145
139
|
includeFederated: !0
|
|
146
|
-
}), r.page = 1,
|
|
140
|
+
}), r.page = 1, c.refresh(), R.close();
|
|
147
141
|
}
|
|
148
142
|
});
|
|
149
|
-
}),
|
|
150
|
-
|
|
143
|
+
}), L = [];
|
|
144
|
+
h && L.push(
|
|
151
145
|
/* @__PURE__ */ n(
|
|
152
|
-
|
|
146
|
+
te,
|
|
153
147
|
{
|
|
154
|
-
title:
|
|
155
|
-
type:
|
|
148
|
+
title: t("logoutAllTips", {
|
|
149
|
+
type: t(r.status)
|
|
156
150
|
}),
|
|
157
151
|
children: /* @__PURE__ */ n(
|
|
158
|
-
|
|
152
|
+
k,
|
|
159
153
|
{
|
|
160
154
|
sx: { ml: 0.5 },
|
|
161
155
|
size: "small",
|
|
162
156
|
variant: "contained",
|
|
163
157
|
color: "error",
|
|
164
|
-
onClick:
|
|
165
|
-
disabled:
|
|
166
|
-
children:
|
|
167
|
-
type:
|
|
158
|
+
onClick: U,
|
|
159
|
+
disabled: F,
|
|
160
|
+
children: t("logoutAll", {
|
|
161
|
+
type: t(r.status)
|
|
168
162
|
})
|
|
169
163
|
}
|
|
170
164
|
)
|
|
@@ -172,103 +166,97 @@ function Pe({
|
|
|
172
166
|
"logoutAll"
|
|
173
167
|
)
|
|
174
168
|
);
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
count: ((e = p.data) == null ? void 0 : e.total) || 0
|
|
189
|
-
};
|
|
190
|
-
}, [(M = p.data) == null ? void 0 : M.total, r.page, r.pageSize]), K = [
|
|
169
|
+
const V = v(() => ({
|
|
170
|
+
// viewColumns: false,
|
|
171
|
+
search: !1,
|
|
172
|
+
sort: !1,
|
|
173
|
+
download: !1,
|
|
174
|
+
filter: !1,
|
|
175
|
+
print: !1,
|
|
176
|
+
expandableRowsOnClick: !1,
|
|
177
|
+
searchDebounceTime: 600,
|
|
178
|
+
page: r.page - 1,
|
|
179
|
+
rowsPerPage: r.pageSize,
|
|
180
|
+
count: c.data?.total || 0
|
|
181
|
+
}), [c.data?.total, r.page, r.pageSize]), q = [
|
|
191
182
|
{
|
|
192
|
-
label:
|
|
183
|
+
label: t("platform"),
|
|
193
184
|
name: "platform",
|
|
194
185
|
options: {
|
|
195
186
|
customBodyRenderLite: (e) => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return /* @__PURE__ */ n(u, { sx: h, children: [(s = i.os) == null ? void 0 : s.name, (b = i.os) == null ? void 0 : b.version].filter(Boolean).join("/") || o("unknown") });
|
|
187
|
+
const o = i[e], g = W(o?.ua);
|
|
188
|
+
return /* @__PURE__ */ n(d, { sx: x, children: [g.os?.name, g.os?.version].filter(Boolean).join("/") || t("unknown") });
|
|
199
189
|
}
|
|
200
190
|
}
|
|
201
191
|
},
|
|
202
192
|
{
|
|
203
|
-
label:
|
|
193
|
+
label: t("deviceType"),
|
|
204
194
|
name: "deviceType",
|
|
205
195
|
options: {
|
|
206
196
|
customBodyRenderLite: (e) => {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return /* @__PURE__ */ n(u, { sx: h, children: [(s = i.browser) == null ? void 0 : s.name, (b = i.browser) == null ? void 0 : b.version].filter(Boolean).join("/") || o("unknown") });
|
|
197
|
+
const o = i[e], g = W(o?.ua);
|
|
198
|
+
return /* @__PURE__ */ n(d, { sx: x, children: [g.browser?.name, g.browser?.version].filter(Boolean).join("/") || t("unknown") });
|
|
210
199
|
}
|
|
211
200
|
}
|
|
212
201
|
},
|
|
213
202
|
{
|
|
214
|
-
label:
|
|
203
|
+
label: t("walletOS"),
|
|
215
204
|
name: "walletOS",
|
|
216
205
|
options: {
|
|
217
206
|
customBodyRenderLite: (e) => {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return /* @__PURE__ */ n(u, { sx: h, children: ((i = t.extra) == null ? void 0 : i.walletOS) || o("unknown") });
|
|
207
|
+
const o = i[e];
|
|
208
|
+
return /* @__PURE__ */ n(d, { sx: x, children: o.extra?.walletOS || t("unknown") });
|
|
221
209
|
}
|
|
222
210
|
}
|
|
223
211
|
},
|
|
224
|
-
|
|
225
|
-
label:
|
|
212
|
+
l && {
|
|
213
|
+
label: t("user"),
|
|
226
214
|
name: "user",
|
|
227
215
|
options: {
|
|
228
216
|
customBodyRenderLite: (e) => {
|
|
229
|
-
const
|
|
230
|
-
return /* @__PURE__ */ n(
|
|
217
|
+
const o = i[e];
|
|
218
|
+
return /* @__PURE__ */ n(d, { sx: M({ minWidth: 150, maxWidth: 250 }, m ? O : {}), children: /* @__PURE__ */ n(se, { sessionUser: o.user, user: u }) });
|
|
231
219
|
}
|
|
232
220
|
}
|
|
233
221
|
},
|
|
234
222
|
{
|
|
235
|
-
label:
|
|
223
|
+
label: t("createdAt"),
|
|
236
224
|
name: "createdAt",
|
|
237
225
|
options: {
|
|
238
226
|
customBodyRenderLite: (e) => {
|
|
239
|
-
const
|
|
240
|
-
return /* @__PURE__ */ n(
|
|
227
|
+
const o = i[e];
|
|
228
|
+
return /* @__PURE__ */ n(d, { sx: x, children: o.createdAt ? /* @__PURE__ */ n(T, { value: o.createdAt, relativeRange: 3 * 86400 * 1e3, locale: b }) : t("unknown") });
|
|
241
229
|
}
|
|
242
230
|
}
|
|
243
231
|
},
|
|
244
|
-
!
|
|
245
|
-
label:
|
|
232
|
+
!I && {
|
|
233
|
+
label: t("updatedAt"),
|
|
246
234
|
name: "updatedAt",
|
|
247
235
|
options: {
|
|
248
236
|
customBodyRenderLite: (e) => {
|
|
249
|
-
const
|
|
250
|
-
return /* @__PURE__ */ n(
|
|
237
|
+
const o = i[e];
|
|
238
|
+
return /* @__PURE__ */ n(d, { sx: x, children: o.status === "expired" ? t("expired") : /* @__PURE__ */ n(T, { value: o.updatedAt, relativeRange: 3 * 86400 * 1e3, locale: b }) });
|
|
251
239
|
}
|
|
252
240
|
}
|
|
253
241
|
},
|
|
254
242
|
{
|
|
255
|
-
label:
|
|
243
|
+
label: t("lastLoginIp"),
|
|
256
244
|
name: "lastLoginIp",
|
|
257
245
|
options: {
|
|
258
246
|
customBodyRenderLite: (e) => {
|
|
259
|
-
const
|
|
260
|
-
return /* @__PURE__ */ n(
|
|
247
|
+
const o = i[e];
|
|
248
|
+
return /* @__PURE__ */ n(de, { userSession: o, isMobile: m });
|
|
261
249
|
}
|
|
262
250
|
}
|
|
263
251
|
},
|
|
264
|
-
|
|
265
|
-
label:
|
|
252
|
+
h && {
|
|
253
|
+
label: t("actions"),
|
|
266
254
|
name: "actions",
|
|
267
255
|
options: {
|
|
268
256
|
customBodyRenderLite: (e) => {
|
|
269
|
-
const
|
|
270
|
-
return /* @__PURE__ */ n(
|
|
271
|
-
|
|
257
|
+
const o = i[e];
|
|
258
|
+
return /* @__PURE__ */ n(d, { sx: x, children: /* @__PURE__ */ n(
|
|
259
|
+
k,
|
|
272
260
|
{
|
|
273
261
|
sx: {
|
|
274
262
|
whiteSpace: "nowrap",
|
|
@@ -276,25 +264,25 @@ function Pe({
|
|
|
276
264
|
lineHeight: "1.25",
|
|
277
265
|
px: 1
|
|
278
266
|
},
|
|
279
|
-
disabled:
|
|
267
|
+
disabled: y === o.visitorId,
|
|
280
268
|
variant: "outlined",
|
|
281
269
|
size: "small",
|
|
282
270
|
color: "error",
|
|
283
|
-
onClick: () =>
|
|
284
|
-
children:
|
|
271
|
+
onClick: () => N({ visitorId: o.visitorId }),
|
|
272
|
+
children: o.status === "expired" ? t("remove") : y === o.visitorId ? t("currentSession") : t("logout")
|
|
285
273
|
}
|
|
286
274
|
) });
|
|
287
275
|
}
|
|
288
276
|
}
|
|
289
277
|
}
|
|
290
278
|
].filter(Boolean);
|
|
291
|
-
return /* @__PURE__ */
|
|
292
|
-
|
|
279
|
+
return /* @__PURE__ */ s(
|
|
280
|
+
d,
|
|
293
281
|
{
|
|
294
282
|
className: "pc-user-sessions",
|
|
295
283
|
sx: {
|
|
296
|
-
maxWidth:
|
|
297
|
-
...
|
|
284
|
+
maxWidth: m ? "unset" : H ? "calc(100vw - 300px)" : "100%",
|
|
285
|
+
...m && {
|
|
298
286
|
".pc-user-sessions-table > div:nth-child(2)": {
|
|
299
287
|
border: "1px solid",
|
|
300
288
|
borderColor: "divider",
|
|
@@ -323,7 +311,7 @@ function Pe({
|
|
|
323
311
|
paddingRight: "8px",
|
|
324
312
|
paddingLeft: "8px",
|
|
325
313
|
color: "text.secondary",
|
|
326
|
-
...
|
|
314
|
+
...m && {
|
|
327
315
|
padding: "8px !important",
|
|
328
316
|
"&:first-child": {
|
|
329
317
|
paddingTop: "20px!important"
|
|
@@ -335,20 +323,20 @@ function Pe({
|
|
|
335
323
|
}
|
|
336
324
|
},
|
|
337
325
|
children: [
|
|
338
|
-
|
|
326
|
+
D,
|
|
339
327
|
/* @__PURE__ */ n(
|
|
340
|
-
|
|
328
|
+
G,
|
|
341
329
|
{
|
|
342
|
-
count:
|
|
343
|
-
locale:
|
|
344
|
-
data:
|
|
345
|
-
columns:
|
|
346
|
-
customButtons:
|
|
347
|
-
options:
|
|
348
|
-
loading:
|
|
330
|
+
count: c.data?.total || 0,
|
|
331
|
+
locale: b,
|
|
332
|
+
data: i,
|
|
333
|
+
columns: q,
|
|
334
|
+
customButtons: L,
|
|
335
|
+
options: V,
|
|
336
|
+
loading: c.loading,
|
|
349
337
|
className: "pc-user-sessions-table",
|
|
350
|
-
title: /* @__PURE__ */
|
|
351
|
-
|
|
338
|
+
title: /* @__PURE__ */ s(
|
|
339
|
+
oe,
|
|
352
340
|
{
|
|
353
341
|
row: !0,
|
|
354
342
|
sx: { lineHeight: 1, ml: 1 },
|
|
@@ -357,45 +345,45 @@ function Pe({
|
|
|
357
345
|
},
|
|
358
346
|
children: [
|
|
359
347
|
/* @__PURE__ */ n(
|
|
360
|
-
|
|
348
|
+
B,
|
|
361
349
|
{
|
|
362
350
|
value: "online",
|
|
363
|
-
control: /* @__PURE__ */ n(
|
|
364
|
-
label: /* @__PURE__ */
|
|
365
|
-
|
|
366
|
-
/* @__PURE__ */
|
|
351
|
+
control: /* @__PURE__ */ n(C, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "online" }),
|
|
352
|
+
label: /* @__PURE__ */ s(a, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
353
|
+
t("online"),
|
|
354
|
+
/* @__PURE__ */ s(a, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
|
|
367
355
|
"(",
|
|
368
|
-
|
|
356
|
+
p.online,
|
|
369
357
|
")"
|
|
370
358
|
] })
|
|
371
359
|
] })
|
|
372
360
|
}
|
|
373
361
|
),
|
|
374
362
|
/* @__PURE__ */ n(
|
|
375
|
-
|
|
363
|
+
B,
|
|
376
364
|
{
|
|
377
365
|
value: "expired",
|
|
378
|
-
control: /* @__PURE__ */ n(
|
|
379
|
-
label: /* @__PURE__ */
|
|
380
|
-
|
|
381
|
-
/* @__PURE__ */
|
|
366
|
+
control: /* @__PURE__ */ n(C, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "expired" }),
|
|
367
|
+
label: /* @__PURE__ */ s(a, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
368
|
+
t("expired"),
|
|
369
|
+
/* @__PURE__ */ s(a, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
|
|
382
370
|
"(",
|
|
383
|
-
|
|
371
|
+
p.expired,
|
|
384
372
|
")"
|
|
385
373
|
] })
|
|
386
374
|
] })
|
|
387
375
|
}
|
|
388
376
|
),
|
|
389
|
-
|
|
390
|
-
|
|
377
|
+
I ? /* @__PURE__ */ n(
|
|
378
|
+
B,
|
|
391
379
|
{
|
|
392
380
|
value: "offline",
|
|
393
|
-
control: /* @__PURE__ */ n(
|
|
394
|
-
label: /* @__PURE__ */
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */
|
|
381
|
+
control: /* @__PURE__ */ n(C, { size: "small", sx: { lineHeight: 1, fontSize: 0 }, checked: r.status === "offline" }),
|
|
382
|
+
label: /* @__PURE__ */ s(a, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
383
|
+
t("offline"),
|
|
384
|
+
/* @__PURE__ */ s(a, { component: "span", sx: { ml: 0.5, color: "text.secondary" }, children: [
|
|
397
385
|
"(",
|
|
398
|
-
|
|
386
|
+
p.offline,
|
|
399
387
|
")"
|
|
400
388
|
] })
|
|
401
389
|
] })
|
|
@@ -414,5 +402,5 @@ function Pe({
|
|
|
414
402
|
);
|
|
415
403
|
}
|
|
416
404
|
export {
|
|
417
|
-
|
|
405
|
+
Ae as default
|
|
418
406
|
};
|