strapi-plugin-magic-sessionmanager 4.2.16 → 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-BC4jdzBT.mjs → Analytics-sX94t6D9.mjs} +2 -2
  2. package/dist/_chunks/{Analytics-D6RGeWO5.js → Analytics-tOOj5T92.js} +2 -2
  3. package/dist/_chunks/{App-CahdcIEB.mjs → App-Cs4KKd3L.mjs} +155 -54
  4. package/dist/_chunks/{App-BkaaNOpt.js → App-D4qVym6y.js} +154 -53
  5. package/dist/_chunks/{License-BFx721o7.mjs → License-CN5YpqIu.mjs} +1 -1
  6. package/dist/_chunks/{License-C8VnKtV1.js → License-kfVcskd3.js} +1 -1
  7. package/dist/_chunks/{OnlineUsersWidget-uJ6DZB_N.js → OnlineUsersWidget-Cg3R7602.js} +1 -1
  8. package/dist/_chunks/{OnlineUsersWidget-r2ZgSnok.mjs → OnlineUsersWidget-ytykP_tA.mjs} +1 -1
  9. package/dist/_chunks/{Settings-jtZRw_VP.js → Settings-DVRIrGho.js} +26 -54
  10. package/dist/_chunks/{Settings-DOUUwwxB.mjs → Settings-XloJ-aHl.mjs} +26 -54
  11. package/dist/_chunks/StyledButtons-D2EbG_Zw.js +419 -0
  12. package/dist/_chunks/StyledButtons-fbNVRlMY.mjs +418 -0
  13. package/dist/_chunks/{UpgradePage-mqr6dLVY.mjs → UpgradePage-C441wvPX.mjs} +1 -1
  14. package/dist/_chunks/{UpgradePage-Bwy_1m6f.js → UpgradePage-D2FRalDz.js} +1 -1
  15. package/dist/_chunks/{index-BuxWeACw.js → index-DtBfKBne.js} +236 -190
  16. package/dist/_chunks/{index-CUSrDKCG.mjs → index-Ij0JRf9W.mjs} +237 -193
  17. package/dist/_chunks/{useLicense-xjKLHcVq.mjs → useLicense-DJEDGSap.mjs} +1 -1
  18. package/dist/_chunks/{useLicense-D7FSpX8c.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
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  const react = require("react");
3
+ const admin = require("@strapi/strapi/admin");
3
4
  const jsxRuntime = require("react/jsx-runtime");
4
5
  const reactIntl = require("react-intl");
6
+ const styled = require("styled-components");
5
7
  const designSystem = require("@strapi/design-system");
6
8
  const icons = require("@strapi/icons");
7
- const admin = require("@strapi/strapi/admin");
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"
@@ -14,10 +17,29 @@ const pluginPkg = {
14
17
  };
15
18
  const pluginId = "magic-sessionmanager";
16
19
  const PLUGIN_ID = pluginId;
17
- const Initializer = () => {
20
+ const Initializer = ({ setPlugin }) => {
21
+ const ref = react.useRef(setPlugin);
22
+ const { get } = admin.useFetchClient();
18
23
  react.useEffect(() => {
19
- console.log("[magic-sessionmanager] Plugin initialized");
24
+ if (ref.current) {
25
+ ref.current(pluginId);
26
+ }
20
27
  }, []);
28
+ react.useEffect(() => {
29
+ const HEARTBEAT_INTERVAL = 4 * 60 * 1e3;
30
+ const heartbeat = async () => {
31
+ try {
32
+ await get(`/${pluginId}/license/status`);
33
+ } catch (error) {
34
+ }
35
+ };
36
+ const initialTimeout = setTimeout(heartbeat, 60 * 1e3);
37
+ const interval = setInterval(heartbeat, HEARTBEAT_INTERVAL);
38
+ return () => {
39
+ clearTimeout(initialTimeout);
40
+ clearInterval(interval);
41
+ };
42
+ }, [get]);
21
43
  return null;
22
44
  };
23
45
  const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 32 32", fill: "currentColor", width: "24", height: "24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M26 5H6a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h20a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3M20 27h-8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2" }) });
@@ -84,6 +106,123 @@ const parseUserAgent = (userAgent) => {
84
106
  };
85
107
  };
86
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
+ `;
87
226
  const SessionInfoPanel = ({ documentId, model, document }) => {
88
227
  const { formatMessage } = reactIntl.useIntl();
89
228
  const [sessions, setSessions] = react.useState([]);
@@ -178,202 +317,109 @@ const SessionInfoPanel = ({ documentId, model, document }) => {
178
317
  const isOnline = sessions.length > 0;
179
318
  return {
180
319
  title: t("panel.title", "Session Info"),
181
- content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 4, alignItems: "stretch", children: [
182
- /* @__PURE__ */ jsxRuntime.jsx(
183
- designSystem.Box,
184
- {
185
- padding: 5,
186
- background: isOnline ? "success100" : "neutral150",
187
- hasRadius: true,
188
- style: {
189
- border: isOnline ? "1px solid #c6f6d5" : "1px solid #eaeaef",
190
- transition: "all 0.2s ease"
191
- },
192
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "center", children: [
193
- /* @__PURE__ */ jsxRuntime.jsx(
194
- designSystem.Badge,
195
- {
196
- backgroundColor: isOnline ? "success600" : "neutral600",
197
- textColor: "neutral0",
198
- size: "M",
199
- style: { fontSize: "14px", padding: "6px 12px" },
200
- children: isOnline ? t("panel.status.active", "ACTIVE") : t("panel.status.offline", "OFFLINE")
201
- }
202
- ),
203
- /* @__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 }) })
204
- ] })
205
- }
206
- ),
207
- isBlocked && /* @__PURE__ */ jsxRuntime.jsxs(
208
- designSystem.Box,
209
- {
210
- padding: 4,
211
- background: "danger100",
212
- hasRadius: true,
213
- children: [
214
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "danger700", marginBottom: 1, children: t("panel.blocked.title", "User is blocked") }),
215
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "danger600", children: t("panel.blocked.description", "Authentication disabled") })
216
- ]
217
- }
218
- ),
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
+ ] }),
219
351
  sessions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
220
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: {
221
- textAlign: "left",
222
- letterSpacing: "0.5px",
223
- fontSize: "12px"
224
- }, children: t("panel.sessions.title", "Active Sessions") }),
352
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: t("panel.sessions.title", "Active Sessions") }),
225
353
  sessions.slice(0, 5).map((session) => {
226
354
  const deviceInfo = parseUserAgent(session.userAgent);
227
355
  const DeviceIcon = getDeviceIcon(deviceInfo.device);
228
- return /* @__PURE__ */ jsxRuntime.jsx(
229
- designSystem.Box,
230
- {
231
- padding: 4,
232
- background: "neutral0",
233
- hasRadius: true,
234
- style: {
235
- border: "1px solid #e3e8ef",
236
- boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
237
- transition: "all 0.2s ease"
238
- },
239
- onMouseEnter: (e) => {
240
- e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.08)";
241
- e.currentTarget.style.borderColor = "#4945FF";
242
- },
243
- onMouseLeave: (e) => {
244
- e.currentTarget.style.boxShadow = "0 1px 3px rgba(0, 0, 0, 0.04)";
245
- e.currentTarget.style.borderColor = "#e3e8ef";
246
- },
247
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, alignItems: "flex-start", children: [
248
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
249
- /* @__PURE__ */ jsxRuntime.jsx(DeviceIcon, { width: "20px", height: "20px" }),
250
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", textColor: "neutral800", children: deviceInfo.device })
251
- ] }),
252
- /* @__PURE__ */ jsxRuntime.jsx(
253
- designSystem.Badge,
254
- {
255
- backgroundColor: "success600",
256
- textColor: "neutral0",
257
- size: "S",
258
- children: t("panel.sessions.active", "Active")
259
- }
260
- ),
261
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: [
262
- deviceInfo.browser,
263
- " on ",
264
- deviceInfo.os
265
- ] }),
266
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
267
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
268
- /* @__PURE__ */ jsxRuntime.jsx(icons.Server, { width: "14px", height: "14px" }),
269
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: session.ipAddress })
270
- ] }),
271
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
272
- /* @__PURE__ */ jsxRuntime.jsx(icons.Clock, { width: "14px", height: "14px" }),
273
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: new Date(session.loginTime).toLocaleString("en-US", {
274
- month: "short",
275
- day: "numeric",
276
- hour: "2-digit",
277
- minute: "2-digit"
278
- }) })
279
- ] }),
280
- 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 }) })
281
- ] })
282
- },
283
- session.id
284
- );
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);
285
383
  }),
286
- 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 }) }) })
287
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(
288
- designSystem.Box,
289
- {
290
- padding: 6,
291
- background: "neutral100",
292
- hasRadius: true,
293
- style: {
294
- border: "1px dashed #dcdce4",
295
- textAlign: "center"
296
- },
297
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 2, children: [
298
- /* @__PURE__ */ jsxRuntime.jsx(
299
- designSystem.Typography,
300
- {
301
- variant: "pi",
302
- textColor: "neutral600",
303
- style: { fontSize: "32px", marginBottom: "8px" },
304
- children: "💤"
305
- }
306
- ),
307
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral700", children: t("panel.empty.title", "No active sessions") }),
308
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", style: { fontSize: "13px" }, children: t("panel.empty.description", "User has not logged in yet") })
309
- ] })
310
- }
311
- ),
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
+ ] }),
312
396
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
313
397
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
314
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: {
315
- textAlign: "left",
316
- letterSpacing: "0.5px",
317
- fontSize: "12px"
318
- }, children: t("panel.actions.title", "Actions") }),
319
- /* @__PURE__ */ jsxRuntime.jsx(
320
- designSystem.Button,
398
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: t("panel.actions.title", "Actions") }),
399
+ /* @__PURE__ */ jsxRuntime.jsxs(
400
+ ActionButton,
321
401
  {
322
- variant: "secondary",
323
- size: "M",
324
- fullWidth: true,
402
+ $variant: "danger",
325
403
  onClick: handleLogoutAll,
326
404
  disabled: actionLoading || sessions.length === 0,
327
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
328
- style: {
329
- border: "1px solid #dc2626",
330
- color: "#dc2626",
331
- backgroundColor: "transparent",
332
- transition: "all 0.2s ease"
333
- },
334
- onMouseEnter: (e) => {
335
- if (!actionLoading && sessions.length > 0) {
336
- e.currentTarget.style.backgroundColor = "#dc2626";
337
- e.currentTarget.style.color = "white";
338
- }
339
- },
340
- onMouseLeave: (e) => {
341
- if (!actionLoading && sessions.length > 0) {
342
- e.currentTarget.style.backgroundColor = "transparent";
343
- e.currentTarget.style.color = "#dc2626";
344
- }
345
- },
346
- 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
+ ]
347
410
  }
348
411
  ),
349
- /* @__PURE__ */ jsxRuntime.jsx(
350
- designSystem.Button,
412
+ /* @__PURE__ */ jsxRuntime.jsxs(
413
+ ActionButton,
351
414
  {
352
- variant: "secondary",
353
- size: "M",
354
- fullWidth: true,
415
+ $variant: isBlocked ? "success" : "danger",
355
416
  onClick: handleToggleBlock,
356
417
  disabled: actionLoading,
357
- startIcon: isBlocked ? /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
358
- style: {
359
- border: isBlocked ? "1px solid #16a34a" : "1px solid #dc2626",
360
- color: isBlocked ? "#16a34a" : "#dc2626",
361
- backgroundColor: "transparent",
362
- transition: "all 0.2s ease"
363
- },
364
- onMouseEnter: (e) => {
365
- if (!actionLoading) {
366
- e.currentTarget.style.backgroundColor = isBlocked ? "#16a34a" : "#dc2626";
367
- e.currentTarget.style.color = "white";
368
- }
369
- },
370
- onMouseLeave: (e) => {
371
- if (!actionLoading) {
372
- e.currentTarget.style.backgroundColor = "transparent";
373
- e.currentTarget.style.color = isBlocked ? "#16a34a" : "#dc2626";
374
- }
375
- },
376
- 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
+ ]
377
423
  }
378
424
  )
379
425
  ] })
@@ -397,7 +443,7 @@ const index = {
397
443
  id: `${pluginId}.plugin.name`,
398
444
  defaultMessage: pluginPkg.strapi.displayName
399
445
  },
400
- Component: () => Promise.resolve().then(() => require("./App-BkaaNOpt.js"))
446
+ Component: () => Promise.resolve().then(() => require("./App-D4qVym6y.js"))
401
447
  });
402
448
  app.createSettingSection(
403
449
  {
@@ -413,7 +459,7 @@ const index = {
413
459
  },
414
460
  id: "upgrade",
415
461
  to: `${pluginId}/upgrade`,
416
- Component: () => Promise.resolve().then(() => require("./UpgradePage-Bwy_1m6f.js"))
462
+ Component: () => Promise.resolve().then(() => require("./UpgradePage-D2FRalDz.js"))
417
463
  },
418
464
  {
419
465
  intlLabel: {
@@ -422,7 +468,7 @@ const index = {
422
468
  },
423
469
  id: "general",
424
470
  to: `${pluginId}/general`,
425
- Component: () => Promise.resolve().then(() => require("./Settings-jtZRw_VP.js"))
471
+ Component: () => Promise.resolve().then(() => require("./Settings-DVRIrGho.js"))
426
472
  },
427
473
  {
428
474
  intlLabel: {
@@ -431,7 +477,7 @@ const index = {
431
477
  },
432
478
  id: "analytics",
433
479
  to: `${pluginId}/analytics`,
434
- Component: () => Promise.resolve().then(() => require("./Analytics-D6RGeWO5.js"))
480
+ Component: () => Promise.resolve().then(() => require("./Analytics-tOOj5T92.js"))
435
481
  },
436
482
  {
437
483
  intlLabel: {
@@ -440,7 +486,7 @@ const index = {
440
486
  },
441
487
  id: "license",
442
488
  to: `${pluginId}/license`,
443
- Component: () => Promise.resolve().then(() => require("./License-C8VnKtV1.js"))
489
+ Component: () => Promise.resolve().then(() => require("./License-kfVcskd3.js"))
444
490
  }
445
491
  ]
446
492
  );
@@ -458,7 +504,7 @@ const index = {
458
504
  defaultMessage: "Online Users"
459
505
  },
460
506
  component: async () => {
461
- const component = await Promise.resolve().then(() => require("./OnlineUsersWidget-uJ6DZB_N.js"));
507
+ const component = await Promise.resolve().then(() => require("./OnlineUsersWidget-Cg3R7602.js"));
462
508
  return component.default;
463
509
  },
464
510
  id: "online-users-widget",