strapi-plugin-magic-sessionmanager 4.3.0 → 4.3.1

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.
Files changed (23) hide show
  1. package/dist/_chunks/{Analytics-CYYb-qXQ.mjs → Analytics-sX94t6D9.mjs} +2 -2
  2. package/dist/_chunks/{Analytics-BWvrf9k5.js → Analytics-tOOj5T92.js} +2 -2
  3. package/dist/_chunks/{App-Bgq2FgRY.mjs → App-Cs4KKd3L.mjs} +155 -54
  4. package/dist/_chunks/{App-iF0Cl3Lj.js → App-D4qVym6y.js} +154 -53
  5. package/dist/_chunks/{License-CcD3WDcC.mjs → License-CN5YpqIu.mjs} +1 -1
  6. package/dist/_chunks/{License-DFShBRh1.js → License-kfVcskd3.js} +1 -1
  7. package/dist/_chunks/{OnlineUsersWidget-CdJFMOUZ.js → OnlineUsersWidget-Cg3R7602.js} +1 -1
  8. package/dist/_chunks/{OnlineUsersWidget-DHElrP3_.mjs → OnlineUsersWidget-ytykP_tA.mjs} +1 -1
  9. package/dist/_chunks/{Settings-5ZqZ0GC8.js → Settings-DVRIrGho.js} +14 -379
  10. package/dist/_chunks/{Settings-B3FaQckW.mjs → Settings-XloJ-aHl.mjs} +4 -369
  11. package/dist/_chunks/StyledButtons-D2EbG_Zw.js +419 -0
  12. package/dist/_chunks/StyledButtons-fbNVRlMY.mjs +418 -0
  13. package/dist/_chunks/{UpgradePage-B_2RowKN.mjs → UpgradePage-C441wvPX.mjs} +1 -1
  14. package/dist/_chunks/{UpgradePage-D8GaP9Yi.js → UpgradePage-D2FRalDz.js} +1 -1
  15. package/dist/_chunks/{index-Cf1Wqdeg.js → index-DtBfKBne.js} +214 -187
  16. package/dist/_chunks/{index-Dpdcg2zl.mjs → index-Ij0JRf9W.mjs} +214 -189
  17. package/dist/_chunks/{useLicense-CThICQyr.mjs → useLicense-DJEDGSap.mjs} +1 -1
  18. package/dist/_chunks/{useLicense-DOnfhNxz.js → useLicense-NCFYHpDd.js} +1 -1
  19. package/dist/admin/index.js +1 -1
  20. package/dist/admin/index.mjs +1 -1
  21. package/dist/server/index.js +35938 -169
  22. package/dist/server/index.mjs +35927 -167
  23. package/package.json +7 -7
@@ -3,8 +3,11 @@ const react = require("react");
3
3
  const admin = require("@strapi/strapi/admin");
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const reactIntl = require("react-intl");
6
+ const styled = require("styled-components");
6
7
  const designSystem = require("@strapi/design-system");
7
8
  const icons = require("@strapi/icons");
9
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
10
+ const styled__default = /* @__PURE__ */ _interopDefault(styled);
8
11
  const strapi = {
9
12
  name: "magic-sessionmanager",
10
13
  displayName: "Magic Sessionmanager"
@@ -103,6 +106,123 @@ const parseUserAgent = (userAgent) => {
103
106
  };
104
107
  };
105
108
  const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
109
+ const PanelContainer = styled__default.default(designSystem.Box)`
110
+ width: 100%;
111
+ `;
112
+ const StatusCard = styled__default.default(designSystem.Box)`
113
+ padding: 20px;
114
+ border-radius: 12px;
115
+ border: 1px solid ${(props) => props.$isOnline ? "#BBF7D0" : "#E5E7EB"};
116
+ background: ${(props) => props.$isOnline ? "linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%)" : "linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%)"};
117
+ transition: all 0.2s ease;
118
+ `;
119
+ const BlockedWarning = styled__default.default(designSystem.Box)`
120
+ padding: 16px;
121
+ border-radius: 10px;
122
+ background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
123
+ border: 1px solid #FECACA;
124
+ `;
125
+ const SessionCard = styled__default.default(designSystem.Box)`
126
+ padding: 16px;
127
+ background: white;
128
+ border-radius: 10px;
129
+ border: 1px solid #E5E7EB;
130
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
131
+ transition: all 0.2s ease;
132
+
133
+ &:hover {
134
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
135
+ border-color: #0EA5E9;
136
+ }
137
+ `;
138
+ const EmptyState = styled__default.default(designSystem.Box)`
139
+ padding: 32px;
140
+ background: #F9FAFB;
141
+ border-radius: 12px;
142
+ border: 2px dashed #E5E7EB;
143
+ text-align: center;
144
+ `;
145
+ const EmptyIcon = styled__default.default(designSystem.Box)`
146
+ width: 48px;
147
+ height: 48px;
148
+ margin: 0 auto 12px;
149
+ display: flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ background: #E5E7EB;
153
+ border-radius: 50%;
154
+ color: #9CA3AF;
155
+ `;
156
+ const SectionLabel = styled__default.default(designSystem.Typography)`
157
+ text-transform: uppercase;
158
+ letter-spacing: 0.5px;
159
+ font-size: 11px !important;
160
+ font-weight: 700 !important;
161
+ color: #6B7280;
162
+ margin-bottom: 12px;
163
+ display: block;
164
+ `;
165
+ const ActionButton = styled__default.default.button`
166
+ width: 100%;
167
+ padding: 12px 16px;
168
+ border-radius: 8px;
169
+ font-size: 14px;
170
+ font-weight: 600;
171
+ cursor: pointer;
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: center;
175
+ gap: 8px;
176
+ transition: all 0.2s ease;
177
+
178
+ ${(props) => props.$variant === "danger" && `
179
+ background: white;
180
+ color: #DC2626;
181
+ border: 2px solid #DC2626;
182
+
183
+ &:hover:not(:disabled) {
184
+ background: #DC2626;
185
+ color: white;
186
+ }
187
+ `}
188
+
189
+ ${(props) => props.$variant === "success" && `
190
+ background: white;
191
+ color: #16A34A;
192
+ border: 2px solid #16A34A;
193
+
194
+ &:hover:not(:disabled) {
195
+ background: #16A34A;
196
+ color: white;
197
+ }
198
+ `}
199
+
200
+ &:disabled {
201
+ opacity: 0.5;
202
+ cursor: not-allowed;
203
+ }
204
+
205
+ svg {
206
+ width: 16px;
207
+ height: 16px;
208
+ }
209
+ `;
210
+ const IconWrapper = styled__default.default(designSystem.Box)`
211
+ width: 32px;
212
+ height: 32px;
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ background: #F3F4F6;
217
+ border-radius: 8px;
218
+ flex-shrink: 0;
219
+
220
+ svg {
221
+ width: 16px;
222
+ height: 16px;
223
+ color: #6B7280;
224
+ }
225
+ `;
106
226
  const SessionInfoPanel = ({ documentId, model, document }) => {
107
227
  const { formatMessage } = reactIntl.useIntl();
108
228
  const [sessions, setSessions] = react.useState([]);
@@ -197,202 +317,109 @@ const SessionInfoPanel = ({ documentId, model, document }) => {
197
317
  const isOnline = sessions.length > 0;
198
318
  return {
199
319
  title: t("panel.title", "Session Info"),
200
- content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 4, alignItems: "stretch", children: [
201
- /* @__PURE__ */ jsxRuntime.jsx(
202
- designSystem.Box,
203
- {
204
- padding: 5,
205
- background: isOnline ? "success100" : "neutral150",
206
- hasRadius: true,
207
- style: {
208
- border: isOnline ? "1px solid #c6f6d5" : "1px solid #eaeaef",
209
- transition: "all 0.2s ease"
210
- },
211
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "center", children: [
212
- /* @__PURE__ */ jsxRuntime.jsx(
213
- designSystem.Badge,
214
- {
215
- backgroundColor: isOnline ? "success600" : "neutral600",
216
- textColor: "neutral0",
217
- size: "M",
218
- style: { fontSize: "14px", padding: "6px 12px" },
219
- children: isOnline ? t("panel.status.active", "ACTIVE") : t("panel.status.offline", "OFFLINE")
220
- }
221
- ),
222
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", textColor: isOnline ? "success700" : "neutral700", children: t("panel.sessions.count", "{count} active session{count, plural, one {} other {s}}", { count: sessions.length }) })
223
- ] })
224
- }
225
- ),
226
- isBlocked && /* @__PURE__ */ jsxRuntime.jsxs(
227
- designSystem.Box,
228
- {
229
- padding: 4,
230
- background: "danger100",
231
- hasRadius: true,
232
- children: [
233
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "danger700", marginBottom: 1, children: t("panel.blocked.title", "User is blocked") }),
234
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "danger600", children: t("panel.blocked.description", "Authentication disabled") })
235
- ]
236
- }
237
- ),
320
+ content: /* @__PURE__ */ jsxRuntime.jsx(PanelContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 4, alignItems: "stretch", children: [
321
+ /* @__PURE__ */ jsxRuntime.jsx(StatusCard, { $isOnline: isOnline, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "center", children: [
322
+ /* @__PURE__ */ jsxRuntime.jsx(
323
+ designSystem.Badge,
324
+ {
325
+ backgroundColor: isOnline ? "success600" : "neutral600",
326
+ textColor: "neutral0",
327
+ size: "M",
328
+ style: { fontSize: "12px", padding: "6px 14px", fontWeight: "700" },
329
+ children: isOnline ? t("panel.status.active", "ONLINE") : t("panel.status.offline", "OFFLINE")
330
+ }
331
+ ),
332
+ /* @__PURE__ */ jsxRuntime.jsxs(
333
+ designSystem.Typography,
334
+ {
335
+ variant: "omega",
336
+ fontWeight: "semiBold",
337
+ textColor: isOnline ? "success700" : "neutral700",
338
+ children: [
339
+ sessions.length,
340
+ " ",
341
+ t("panel.sessions.label", "active session"),
342
+ sessions.length !== 1 ? "s" : ""
343
+ ]
344
+ }
345
+ )
346
+ ] }) }),
347
+ isBlocked && /* @__PURE__ */ jsxRuntime.jsxs(BlockedWarning, { children: [
348
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", textColor: "danger700", children: t("panel.blocked.title", "User is blocked") }),
349
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "danger600", style: { marginTop: "4px" }, children: t("panel.blocked.description", "Authentication disabled") })
350
+ ] }),
238
351
  sessions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
239
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: {
240
- textAlign: "left",
241
- letterSpacing: "0.5px",
242
- fontSize: "12px"
243
- }, children: t("panel.sessions.title", "Active Sessions") }),
352
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: t("panel.sessions.title", "Active Sessions") }),
244
353
  sessions.slice(0, 5).map((session) => {
245
354
  const deviceInfo = parseUserAgent(session.userAgent);
246
355
  const DeviceIcon = getDeviceIcon(deviceInfo.device);
247
- return /* @__PURE__ */ jsxRuntime.jsx(
248
- designSystem.Box,
249
- {
250
- padding: 4,
251
- background: "neutral0",
252
- hasRadius: true,
253
- style: {
254
- border: "1px solid #e3e8ef",
255
- boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
256
- transition: "all 0.2s ease"
257
- },
258
- onMouseEnter: (e) => {
259
- e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.08)";
260
- e.currentTarget.style.borderColor = "#4945FF";
261
- },
262
- onMouseLeave: (e) => {
263
- e.currentTarget.style.boxShadow = "0 1px 3px rgba(0, 0, 0, 0.04)";
264
- e.currentTarget.style.borderColor = "#e3e8ef";
265
- },
266
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, alignItems: "flex-start", children: [
267
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
268
- /* @__PURE__ */ jsxRuntime.jsx(DeviceIcon, { width: "20px", height: "20px" }),
269
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", textColor: "neutral800", children: deviceInfo.device })
270
- ] }),
271
- /* @__PURE__ */ jsxRuntime.jsx(
272
- designSystem.Badge,
273
- {
274
- backgroundColor: "success600",
275
- textColor: "neutral0",
276
- size: "S",
277
- children: t("panel.sessions.active", "Active")
278
- }
279
- ),
280
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: [
281
- deviceInfo.browser,
282
- " on ",
283
- deviceInfo.os
284
- ] }),
285
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
286
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
287
- /* @__PURE__ */ jsxRuntime.jsx(icons.Server, { width: "14px", height: "14px" }),
288
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: session.ipAddress })
289
- ] }),
290
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
291
- /* @__PURE__ */ jsxRuntime.jsx(icons.Clock, { width: "14px", height: "14px" }),
292
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: new Date(session.loginTime).toLocaleString("en-US", {
293
- month: "short",
294
- day: "numeric",
295
- hour: "2-digit",
296
- minute: "2-digit"
297
- }) })
298
- ] }),
299
- session.minutesSinceActive !== void 0 && session.minutesSinceActive < 60 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "success600", fontWeight: "semiBold", children: session.minutesSinceActive === 0 ? t("panel.sessions.activeNow", "Active now") : t("panel.sessions.activeAgo", "Active {minutes} min ago", { minutes: session.minutesSinceActive }) })
300
- ] })
301
- },
302
- session.id
303
- );
356
+ return /* @__PURE__ */ jsxRuntime.jsx(SessionCard, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, alignItems: "flex-start", children: [
357
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
358
+ /* @__PURE__ */ jsxRuntime.jsx(IconWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(DeviceIcon, {}) }),
359
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", textColor: "neutral800", children: deviceInfo.device })
360
+ ] }),
361
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "success600", textColor: "neutral0", size: "S", children: t("panel.sessions.active", "Active") }),
362
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: [
363
+ deviceInfo.browser,
364
+ " on ",
365
+ deviceInfo.os
366
+ ] }),
367
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
368
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
369
+ /* @__PURE__ */ jsxRuntime.jsx(icons.Server, { width: "14px", height: "14px", style: { color: "#9CA3AF" } }),
370
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: session.ipAddress })
371
+ ] }),
372
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
373
+ /* @__PURE__ */ jsxRuntime.jsx(icons.Clock, { width: "14px", height: "14px", style: { color: "#9CA3AF" } }),
374
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: new Date(session.loginTime).toLocaleString("en-US", {
375
+ month: "short",
376
+ day: "numeric",
377
+ hour: "2-digit",
378
+ minute: "2-digit"
379
+ }) })
380
+ ] }),
381
+ session.minutesSinceActive !== void 0 && session.minutesSinceActive < 60 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "success600", fontWeight: "semiBold", children: session.minutesSinceActive === 0 ? t("panel.sessions.activeNow", "Active now") : t("panel.sessions.activeAgo", "Active {minutes} min ago", { minutes: session.minutesSinceActive }) })
382
+ ] }) }, session.id);
304
383
  }),
305
- sessions.length > 5 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, background: "primary100", hasRadius: true, textAlign: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "primary600", fontWeight: "semiBold", children: t("panel.sessions.more", "+{count} more session{count, plural, one {} other {s}}", { count: sessions.length - 5 }) }) })
306
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(
307
- designSystem.Box,
308
- {
309
- padding: 6,
310
- background: "neutral100",
311
- hasRadius: true,
312
- style: {
313
- border: "1px dashed #dcdce4",
314
- textAlign: "center"
315
- },
316
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 2, children: [
317
- /* @__PURE__ */ jsxRuntime.jsx(
318
- designSystem.Typography,
319
- {
320
- variant: "pi",
321
- textColor: "neutral600",
322
- style: { fontSize: "32px", marginBottom: "8px" },
323
- children: "💤"
324
- }
325
- ),
326
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral700", children: t("panel.empty.title", "No active sessions") }),
327
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", style: { fontSize: "13px" }, children: t("panel.empty.description", "User has not logged in yet") })
328
- ] })
329
- }
330
- ),
384
+ sessions.length > 5 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, background: "primary100", hasRadius: true, style: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "primary600", fontWeight: "semiBold", children: [
385
+ "+",
386
+ sessions.length - 5,
387
+ " ",
388
+ t("panel.sessions.more", "more session"),
389
+ sessions.length - 5 !== 1 ? "s" : ""
390
+ ] }) })
391
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(EmptyState, { children: [
392
+ /* @__PURE__ */ jsxRuntime.jsx(EmptyIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.User, { width: "24px", height: "24px" }) }),
393
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral700", style: { display: "block" }, children: t("panel.empty.title", "No active sessions") }),
394
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", style: { display: "block", marginTop: "4px" }, children: t("panel.empty.description", "User has not logged in yet") })
395
+ ] }),
331
396
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
332
397
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
333
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: {
334
- textAlign: "left",
335
- letterSpacing: "0.5px",
336
- fontSize: "12px"
337
- }, children: t("panel.actions.title", "Actions") }),
338
- /* @__PURE__ */ jsxRuntime.jsx(
339
- designSystem.Button,
398
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: t("panel.actions.title", "Actions") }),
399
+ /* @__PURE__ */ jsxRuntime.jsxs(
400
+ ActionButton,
340
401
  {
341
- variant: "secondary",
342
- size: "M",
343
- fullWidth: true,
402
+ $variant: "danger",
344
403
  onClick: handleLogoutAll,
345
404
  disabled: actionLoading || sessions.length === 0,
346
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
347
- style: {
348
- border: "1px solid #dc2626",
349
- color: "#dc2626",
350
- backgroundColor: "transparent",
351
- transition: "all 0.2s ease"
352
- },
353
- onMouseEnter: (e) => {
354
- if (!actionLoading && sessions.length > 0) {
355
- e.currentTarget.style.backgroundColor = "#dc2626";
356
- e.currentTarget.style.color = "white";
357
- }
358
- },
359
- onMouseLeave: (e) => {
360
- if (!actionLoading && sessions.length > 0) {
361
- e.currentTarget.style.backgroundColor = "transparent";
362
- e.currentTarget.style.color = "#dc2626";
363
- }
364
- },
365
- children: t("panel.actions.terminateAll", "Terminate All Sessions")
405
+ type: "button",
406
+ children: [
407
+ /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
408
+ t("panel.actions.terminateAll", "Terminate All Sessions")
409
+ ]
366
410
  }
367
411
  ),
368
- /* @__PURE__ */ jsxRuntime.jsx(
369
- designSystem.Button,
412
+ /* @__PURE__ */ jsxRuntime.jsxs(
413
+ ActionButton,
370
414
  {
371
- variant: "secondary",
372
- size: "M",
373
- fullWidth: true,
415
+ $variant: isBlocked ? "success" : "danger",
374
416
  onClick: handleToggleBlock,
375
417
  disabled: actionLoading,
376
- startIcon: isBlocked ? /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
377
- style: {
378
- border: isBlocked ? "1px solid #16a34a" : "1px solid #dc2626",
379
- color: isBlocked ? "#16a34a" : "#dc2626",
380
- backgroundColor: "transparent",
381
- transition: "all 0.2s ease"
382
- },
383
- onMouseEnter: (e) => {
384
- if (!actionLoading) {
385
- e.currentTarget.style.backgroundColor = isBlocked ? "#16a34a" : "#dc2626";
386
- e.currentTarget.style.color = "white";
387
- }
388
- },
389
- onMouseLeave: (e) => {
390
- if (!actionLoading) {
391
- e.currentTarget.style.backgroundColor = "transparent";
392
- e.currentTarget.style.color = isBlocked ? "#16a34a" : "#dc2626";
393
- }
394
- },
395
- children: isBlocked ? t("panel.actions.unblockUser", "Unblock User") : t("panel.actions.blockUser", "Block User")
418
+ type: "button",
419
+ children: [
420
+ isBlocked ? /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
421
+ isBlocked ? t("panel.actions.unblockUser", "Unblock User") : t("panel.actions.blockUser", "Block User")
422
+ ]
396
423
  }
397
424
  )
398
425
  ] })
@@ -416,7 +443,7 @@ const index = {
416
443
  id: `${pluginId}.plugin.name`,
417
444
  defaultMessage: pluginPkg.strapi.displayName
418
445
  },
419
- Component: () => Promise.resolve().then(() => require("./App-iF0Cl3Lj.js"))
446
+ Component: () => Promise.resolve().then(() => require("./App-D4qVym6y.js"))
420
447
  });
421
448
  app.createSettingSection(
422
449
  {
@@ -432,7 +459,7 @@ const index = {
432
459
  },
433
460
  id: "upgrade",
434
461
  to: `${pluginId}/upgrade`,
435
- Component: () => Promise.resolve().then(() => require("./UpgradePage-D8GaP9Yi.js"))
462
+ Component: () => Promise.resolve().then(() => require("./UpgradePage-D2FRalDz.js"))
436
463
  },
437
464
  {
438
465
  intlLabel: {
@@ -441,7 +468,7 @@ const index = {
441
468
  },
442
469
  id: "general",
443
470
  to: `${pluginId}/general`,
444
- Component: () => Promise.resolve().then(() => require("./Settings-5ZqZ0GC8.js"))
471
+ Component: () => Promise.resolve().then(() => require("./Settings-DVRIrGho.js"))
445
472
  },
446
473
  {
447
474
  intlLabel: {
@@ -450,7 +477,7 @@ const index = {
450
477
  },
451
478
  id: "analytics",
452
479
  to: `${pluginId}/analytics`,
453
- Component: () => Promise.resolve().then(() => require("./Analytics-BWvrf9k5.js"))
480
+ Component: () => Promise.resolve().then(() => require("./Analytics-tOOj5T92.js"))
454
481
  },
455
482
  {
456
483
  intlLabel: {
@@ -459,7 +486,7 @@ const index = {
459
486
  },
460
487
  id: "license",
461
488
  to: `${pluginId}/license`,
462
- Component: () => Promise.resolve().then(() => require("./License-DFShBRh1.js"))
489
+ Component: () => Promise.resolve().then(() => require("./License-kfVcskd3.js"))
463
490
  }
464
491
  ]
465
492
  );
@@ -477,7 +504,7 @@ const index = {
477
504
  defaultMessage: "Online Users"
478
505
  },
479
506
  component: async () => {
480
- const component = await Promise.resolve().then(() => require("./OnlineUsersWidget-CdJFMOUZ.js"));
507
+ const component = await Promise.resolve().then(() => require("./OnlineUsersWidget-Cg3R7602.js"));
481
508
  return component.default;
482
509
  },
483
510
  id: "online-users-widget",