strapi-plugin-magic-sessionmanager 3.7.0 → 4.0.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 (43) hide show
  1. package/README.md +90 -0
  2. package/admin/src/components/LicenseGuard.jsx +6 -6
  3. package/admin/src/components/SessionDetailModal.jsx +12 -12
  4. package/admin/src/components/SessionInfoCard.jsx +3 -3
  5. package/admin/src/components/SessionInfoPanel.jsx +3 -2
  6. package/admin/src/hooks/useLicense.js +1 -1
  7. package/admin/src/index.js +2 -2
  8. package/admin/src/pages/Analytics.jsx +2 -2
  9. package/admin/src/pages/HomePage.jsx +11 -14
  10. package/admin/src/pages/License.jsx +2 -2
  11. package/admin/src/pages/Settings.jsx +24 -25
  12. package/admin/src/pages/SettingsNew.jsx +21 -21
  13. package/admin/src/utils/parseUserAgent.js +7 -7
  14. package/dist/_chunks/{Analytics-Bi-vcT63.js → Analytics-BBdv1I5y.js} +4 -4
  15. package/dist/_chunks/{Analytics-BM9i88xu.mjs → Analytics-Dv9f_0eZ.mjs} +4 -4
  16. package/dist/_chunks/{App-DcnJOCL9.mjs → App-CIQ-7sa7.mjs} +26 -31
  17. package/dist/_chunks/{App-BbiNy_cT.js → App-CJaZPNjt.js} +26 -31
  18. package/dist/_chunks/{License-kYo8j2yl.js → License-D24rgaZQ.js} +3 -3
  19. package/dist/_chunks/{License-DsxP-MAL.mjs → License-nrmFxoBm.mjs} +3 -3
  20. package/dist/_chunks/{Settings-jW0TOE_d.js → Settings-CqxgjU0y.js} +26 -26
  21. package/dist/_chunks/{Settings-C3sW9eBD.mjs → Settings-D5dLEGc_.mjs} +26 -26
  22. package/dist/_chunks/{index-DG9XeVSg.mjs → index-Duk1_Wrz.mjs} +15 -15
  23. package/dist/_chunks/{index-Dr2HT-Dd.js → index-WH04CS1c.js} +15 -15
  24. package/dist/_chunks/{useLicense-BL_3bX9O.js → useLicense-BwOlCyhc.js} +2 -2
  25. package/dist/_chunks/{useLicense-DOkJX-tk.mjs → useLicense-Ce8GaxB0.mjs} +2 -2
  26. package/dist/admin/index.js +1 -1
  27. package/dist/admin/index.mjs +1 -1
  28. package/dist/server/index.js +250 -119
  29. package/dist/server/index.mjs +250 -119
  30. package/package.json +1 -1
  31. package/server/src/bootstrap.js +106 -28
  32. package/server/src/controllers/license.js +4 -4
  33. package/server/src/controllers/session.js +67 -13
  34. package/server/src/destroy.js +1 -1
  35. package/server/src/middlewares/last-seen.js +13 -7
  36. package/server/src/register.js +4 -4
  37. package/server/src/routes/content-api.js +11 -2
  38. package/server/src/services/geolocation.js +4 -2
  39. package/server/src/services/license-guard.js +13 -10
  40. package/server/src/services/notifications.js +20 -20
  41. package/server/src/services/service.js +1 -1
  42. package/server/src/services/session.js +63 -33
  43. package/server/src/utils/encryption.js +1 -1
@@ -6,8 +6,8 @@ const admin = require("@strapi/strapi/admin");
6
6
  const styled = require("styled-components");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
- const index = require("./index-Dr2HT-Dd.js");
10
- const useLicense = require("./useLicense-BL_3bX9O.js");
9
+ const index = require("./index-WH04CS1c.js");
10
+ const useLicense = require("./useLicense-BwOlCyhc.js");
11
11
  const reactRouterDom = require("react-router-dom");
12
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
13
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -58,7 +58,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
58
58
  } catch (err) {
59
59
  console.error("[SessionDetailModal] Error fetching geolocation:", err);
60
60
  setGeoData({
61
- country_flag: "🌍",
61
+ country_flag: "",
62
62
  country: "Unknown",
63
63
  city: "Unknown",
64
64
  timezone: "Unknown",
@@ -72,7 +72,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
72
72
  }
73
73
  };
74
74
  const premiumData = geoData || {
75
- country_flag: "🌍",
75
+ country_flag: "",
76
76
  country: "Loading...",
77
77
  city: "Loading...",
78
78
  timezone: "Loading...",
@@ -153,20 +153,20 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
153
153
  textColor: "neutral0",
154
154
  size: "M",
155
155
  style: { fontSize: "14px", padding: "8px 20px", fontWeight: "600" },
156
- children: isOnline ? "🟢 ONLINE" : "OFFLINE"
156
+ children: isOnline ? "ONLINE" : "OFFLINE"
157
157
  }
158
158
  ) }),
159
159
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, { style: { marginBottom: "24px" } }),
160
160
  /* @__PURE__ */ jsxRuntime.jsxs(TwoColumnGrid, { children: [
161
161
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
162
162
  /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
163
- /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "👤 User" }),
163
+ /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "User" }),
164
164
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Check, label: "Username", value: session.user?.username || "N/A" }),
165
165
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: "Email", value: session.user?.email || "N/A" }),
166
166
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: "User ID", value: session.user?.id || "N/A" })
167
167
  ] }),
168
168
  /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
169
- /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "💻 Device" }),
169
+ /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "Device" }),
170
170
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: DeviceIcon, label: "Device", value: deviceInfo.device }),
171
171
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Monitor, label: "Browser", value: `${deviceInfo.browser} ${deviceInfo.browserVersion || ""}` }),
172
172
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Server, label: "OS", value: deviceInfo.os }),
@@ -174,7 +174,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
174
174
  ] })
175
175
  ] }),
176
176
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
177
- /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "⏱️ Timeline" }),
177
+ /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "Timeline" }),
178
178
  /* @__PURE__ */ jsxRuntime.jsx(
179
179
  DetailRow,
180
180
  {
@@ -229,7 +229,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
229
229
  ] }) })
230
230
  ] }),
231
231
  isPremium ? /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
232
- /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "🌍 Location & Security" }),
232
+ /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "Location and Security" }),
233
233
  geoLoading ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 4, style: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: "Loading location data..." }) }) : /* @__PURE__ */ jsxRuntime.jsxs(TwoColumnGrid, { children: [
234
234
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
235
235
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -238,7 +238,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
238
238
  compact: true,
239
239
  icon: icons.Earth,
240
240
  label: "Country",
241
- value: `${premiumData.country_flag || "🌍"} ${premiumData.country}`
241
+ value: `${premiumData.country_flag || ""} ${premiumData.country}`.trim()
242
242
  }
243
243
  ),
244
244
  /* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Earth, label: "City", value: premiumData.city }),
@@ -260,7 +260,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
260
260
  compact: true,
261
261
  icon: icons.Shield,
262
262
  label: "VPN",
263
- value: premiumData.isVpn ? "⚠️ Yes" : "No"
263
+ value: premiumData.isVpn ? "[WARNING] Yes" : "No"
264
264
  }
265
265
  ),
266
266
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -269,7 +269,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
269
269
  compact: true,
270
270
  icon: icons.Shield,
271
271
  label: "Proxy",
272
- value: premiumData.isProxy ? "⚠️ Yes" : "No"
272
+ value: premiumData.isProxy ? "[WARNING] Yes" : "No"
273
273
  }
274
274
  )
275
275
  ] })
@@ -286,7 +286,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
286
286
  },
287
287
  children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 3, children: [
288
288
  /* @__PURE__ */ jsxRuntime.jsx(icons.Crown, { style: { width: "40px", height: "40px", color: "#d97706" } }),
289
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", style: { color: "#92400e", fontWeight: "700" }, children: "🌍 Location & Security Analysis" }),
289
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", style: { color: "#92400e", fontWeight: "700" }, children: "Location and Security Analysis" }),
290
290
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", style: { color: "#78350f", fontSize: "14px", lineHeight: "1.6" }, children: "Unlock premium features to get IP geolocation, security scoring, and VPN/Proxy detection for every session" }),
291
291
  /* @__PURE__ */ jsxRuntime.jsx(
292
292
  designSystem.Button,
@@ -310,7 +310,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
310
310
  ) }),
311
311
  /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
312
312
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", style: { marginBottom: "12px" }, children: [
313
- /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { style: { marginBottom: 0, paddingBottom: 0, border: "none" }, children: "🔧 Technical Details" }),
313
+ /* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { style: { marginBottom: 0, paddingBottom: 0, border: "none" }, children: "Technical Details" }),
314
314
  /* @__PURE__ */ jsxRuntime.jsx(
315
315
  designSystem.Button,
316
316
  {
@@ -809,7 +809,7 @@ const HomePage = () => {
809
809
  }
810
810
  };
811
811
  const handleDeleteSession = async (sessionId) => {
812
- if (!confirm("⚠️ WARNING: This will PERMANENTLY delete this session from the database!\n\nThis action cannot be undone.\n\nAre you sure?")) {
812
+ if (!confirm("[WARNING] This will PERMANENTLY delete this session from the database!\n\nThis action cannot be undone.\n\nAre you sure?")) {
813
813
  return;
814
814
  }
815
815
  try {
@@ -1048,7 +1048,7 @@ const HomePage = () => {
1048
1048
  ] }),
1049
1049
  loading && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", padding: 8, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { children: "Loading sessions..." }) }),
1050
1050
  !loading && sessions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
1051
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color: theme.colors.neutral[700] }, children: "📊 All Sessions" }) }),
1051
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color: theme.colors.neutral[700] }, children: "All Sessions" }) }),
1052
1052
  /* @__PURE__ */ jsxRuntime.jsxs(FilterBar, { children: [
1053
1053
  /* @__PURE__ */ jsxRuntime.jsxs(SearchInputWrapper, { children: [
1054
1054
  /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, {}),
@@ -1071,10 +1071,10 @@ const HomePage = () => {
1071
1071
  size: "S",
1072
1072
  children: [
1073
1073
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "all", children: "All Sessions" }),
1074
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "active", children: "🟢 Active (< 15 min)" }),
1075
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "idle", children: "🟡 Idle (> 15 min)" }),
1076
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "loggedout", children: "🔴 Logged Out" }),
1077
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "terminated", children: "Terminated" })
1074
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "active", children: "Active (less than 15 min)" }),
1075
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "idle", children: "Idle (more than 15 min)" }),
1076
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "loggedout", children: "Logged Out" }),
1077
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "terminated", children: "Terminated" })
1078
1078
  ]
1079
1079
  }
1080
1080
  ) }),
@@ -1120,26 +1120,26 @@ const HomePage = () => {
1120
1120
  active: {
1121
1121
  bg: theme.colors.success[50],
1122
1122
  badgeColor: "success600",
1123
- label: "🟢 Active",
1123
+ label: "Active",
1124
1124
  indicator: true
1125
1125
  },
1126
1126
  idle: {
1127
1127
  bg: theme.colors.warning[50],
1128
1128
  badgeColor: "warning600",
1129
- label: "🟡 Idle",
1129
+ label: "Idle",
1130
1130
  indicator: false
1131
1131
  },
1132
1132
  loggedout: {
1133
1133
  bg: theme.colors.danger[50],
1134
1134
  badgeColor: "danger600",
1135
- label: "🔴 Logged Out",
1135
+ label: "Logged Out",
1136
1136
  indicator: false,
1137
1137
  opacity: 0.7
1138
1138
  },
1139
1139
  terminated: {
1140
1140
  bg: theme.colors.neutral[100],
1141
1141
  badgeColor: "neutral600",
1142
- label: "Terminated",
1142
+ label: "Terminated",
1143
1143
  indicator: false,
1144
1144
  opacity: 0.6
1145
1145
  }
@@ -1353,7 +1353,6 @@ const HomePage = () => {
1353
1353
  }
1354
1354
  }
1355
1355
  ),
1356
- /* @__PURE__ */ jsxRuntime.jsx(FloatingEmoji, { children: "💻" }),
1357
1356
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 6, style: { position: "relative", zIndex: 1 }, children: [
1358
1357
  /* @__PURE__ */ jsxRuntime.jsx(
1359
1358
  designSystem.Box,
@@ -1759,7 +1758,7 @@ const LicenseGuard = ({ children }) => {
1759
1758
  border: "2px solid #BAE6FD",
1760
1759
  width: "100%"
1761
1760
  },
1762
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: useExistingKey ? "🔑 Enter your email and license key to activate." : useAutoCreate && adminUser && adminUser.email ? `✨ Click "Activate" to auto-create a license with your account (${adminUser.email})` : useAutoCreate ? 'Click "Activate" to auto-create a license with your admin account' : "💡 A license will be created with the details below." })
1761
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: useExistingKey ? "Enter your email and license key to activate." : useAutoCreate && adminUser && adminUser.email ? `Click "Activate" to auto-create a license with your account (${adminUser.email})` : useAutoCreate ? 'Click "Activate" to auto-create a license with your admin account' : "A license will be created with the details below." })
1763
1762
  }
1764
1763
  ),
1765
1764
  useExistingKey ? (
@@ -1826,15 +1825,11 @@ const LicenseGuard = ({ children }) => {
1826
1825
  children: [
1827
1826
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", style: { marginBottom: "12px", display: "block" }, children: "Ready to activate with your account:" }),
1828
1827
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", style: { marginBottom: "4px", display: "block" }, children: [
1829
- "👤 ",
1830
1828
  adminUser.firstname || "Admin",
1831
1829
  " ",
1832
1830
  adminUser.lastname || "User"
1833
1831
  ] }),
1834
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: [
1835
- "📧 ",
1836
- adminUser.email || "Loading..."
1837
- ] })
1832
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: adminUser.email || "Loading..." })
1838
1833
  ]
1839
1834
  }
1840
1835
  )
@@ -6,7 +6,7 @@ const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const icons = require("@strapi/icons");
8
8
  const styled = require("styled-components");
9
- const index = require("./index-Dr2HT-Dd.js");
9
+ const index = require("./index-WH04CS1c.js");
10
10
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
11
11
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
12
12
  const theme = {
@@ -339,7 +339,7 @@ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
339
339
  )
340
340
  ] }),
341
341
  data.features?.premium && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { marginBottom: 5, padding: 5, background: "success50", hasRadius: true, style: { border: "2px solid #dcfce7" }, children: [
342
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", fontWeight: "bold", textColor: "success700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "Premium Features Active" }),
342
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", fontWeight: "bold", textColor: "success700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "Premium Features Active" }),
343
343
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
344
344
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "success700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ IP Geolocation Tracking (Country, City, Timezone)" }),
345
345
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "success700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ Security Risk Scoring (0-100)" }),
@@ -350,7 +350,7 @@ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
350
350
  ] })
351
351
  ] }),
352
352
  data.features?.advanced && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { marginBottom: 5, padding: 5, background: "primary50", hasRadius: true, style: { border: "2px solid #bae6fd" }, children: [
353
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", fontWeight: "bold", textColor: "primary700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "🚀 Advanced Features Active" }),
353
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", fontWeight: "bold", textColor: "primary700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "Advanced Features Active" }),
354
354
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 2, children: [
355
355
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "primary700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ Email Notifications & Alerts" }),
356
356
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "primary700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ Webhook Integration (Discord/Slack)" }),
@@ -4,7 +4,7 @@ import { Loader, Box, Alert, Flex, Typography, Button, Badge, Accordion } from "
4
4
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
5
5
  import { ArrowClockwise, Duplicate, Download, User, Shield, Sparkle, ChartBubble } from "@strapi/icons";
6
6
  import styled, { css, keyframes } from "styled-components";
7
- import { a as pluginId } from "./index-DG9XeVSg.mjs";
7
+ import { a as pluginId } from "./index-Duk1_Wrz.mjs";
8
8
  const theme = {
9
9
  colors: {
10
10
  neutral: { 200: "#E5E7EB" }
@@ -335,7 +335,7 @@ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
335
335
  )
336
336
  ] }),
337
337
  data.features?.premium && /* @__PURE__ */ jsxs(Box, { marginBottom: 5, padding: 5, background: "success50", hasRadius: true, style: { border: "2px solid #dcfce7" }, children: [
338
- /* @__PURE__ */ jsx(Typography, { variant: "delta", fontWeight: "bold", textColor: "success700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "Premium Features Active" }),
338
+ /* @__PURE__ */ jsx(Typography, { variant: "delta", fontWeight: "bold", textColor: "success700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "Premium Features Active" }),
339
339
  /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
340
340
  /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "success700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ IP Geolocation Tracking (Country, City, Timezone)" }),
341
341
  /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "success700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ Security Risk Scoring (0-100)" }),
@@ -346,7 +346,7 @@ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
346
346
  ] })
347
347
  ] }),
348
348
  data.features?.advanced && /* @__PURE__ */ jsxs(Box, { marginBottom: 5, padding: 5, background: "primary50", hasRadius: true, style: { border: "2px solid #bae6fd" }, children: [
349
- /* @__PURE__ */ jsx(Typography, { variant: "delta", fontWeight: "bold", textColor: "primary700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "🚀 Advanced Features Active" }),
349
+ /* @__PURE__ */ jsx(Typography, { variant: "delta", fontWeight: "bold", textColor: "primary700", style: { marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: "Advanced Features Active" }),
350
350
  /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 2, children: [
351
351
  /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "primary700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ Email Notifications & Alerts" }),
352
352
  /* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "primary700", style: { fontSize: "14px", display: "flex", alignItems: "center", gap: "8px" }, children: "✓ Webhook Integration (Discord/Slack)" }),
@@ -6,8 +6,8 @@ const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const icons = require("@strapi/icons");
8
8
  const styled = require("styled-components");
9
- const index = require("./index-Dr2HT-Dd.js");
10
- const useLicense = require("./useLicense-BL_3bX9O.js");
9
+ const index = require("./index-WH04CS1c.js");
10
+ const useLicense = require("./useLicense-BwOlCyhc.js");
11
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
12
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
13
13
  const theme = {
@@ -185,12 +185,12 @@ const validateTemplate = (template, templateType) => {
185
185
  };
186
186
  const getDefaultTemplates = () => ({
187
187
  suspiciousLogin: {
188
- subject: "🚨 Suspicious Login Alert - Session Manager",
188
+ subject: "[ALERT] Suspicious Login Alert - Session Manager",
189
189
  html: `
190
190
  <html>
191
191
  <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
192
192
  <div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f9fafb; border-radius: 10px;">
193
- <h2 style="color: #dc2626;">🚨 Suspicious Login Detected</h2>
193
+ <h2 style="color: #dc2626;">[ALERT] Suspicious Login Detected</h2>
194
194
  <p>A potentially suspicious login was detected for your account.</p>
195
195
 
196
196
  <div style="background: white; padding: 15px; border-radius: 8px; margin: 20px 0;">
@@ -225,7 +225,7 @@ const getDefaultTemplates = () => ({
225
225
  </div>
226
226
  </body>
227
227
  </html>`,
228
- text: `🚨 Suspicious Login Detected
228
+ text: `[ALERT] Suspicious Login Detected
229
229
 
230
230
  A potentially suspicious login was detected for your account.
231
231
 
@@ -240,12 +240,12 @@ Login Details:
240
240
  Security: VPN={{reason.isVpn}}, Proxy={{reason.isProxy}}, Threat={{reason.isThreat}}, Score={{reason.securityScore}}/100`
241
241
  },
242
242
  newLocation: {
243
- subject: "📍 New Location Login Detected",
243
+ subject: "[LOCATION] New Location Login Detected",
244
244
  html: `
245
245
  <html>
246
246
  <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
247
247
  <div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f0f9ff; border-radius: 10px;">
248
- <h2 style="color: #0284c7;">📍 Login from New Location</h2>
248
+ <h2 style="color: #0284c7;">[LOCATION] Login from New Location</h2>
249
249
  <p>Your account was accessed from a new location.</p>
250
250
 
251
251
  <div style="background: white; padding: 15px; border-radius: 8px; margin: 20px 0;">
@@ -268,7 +268,7 @@ Security: VPN={{reason.isVpn}}, Proxy={{reason.isProxy}}, Threat={{reason.isThre
268
268
  </div>
269
269
  </body>
270
270
  </html>`,
271
- text: `📍 Login from New Location
271
+ text: `[LOCATION] Login from New Location
272
272
 
273
273
  Your account was accessed from a new location.
274
274
 
@@ -283,12 +283,12 @@ New Location Details:
283
283
  If this was you, no action is needed.`
284
284
  },
285
285
  vpnProxy: {
286
- subject: "⚠️ VPN/Proxy Login Detected",
286
+ subject: "[WARNING] VPN/Proxy Login Detected",
287
287
  html: `
288
288
  <html>
289
289
  <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
290
290
  <div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #fffbeb; border-radius: 10px;">
291
- <h2 style="color: #d97706;">⚠️ VPN/Proxy Detected</h2>
291
+ <h2 style="color: #d97706;">[WARNING] VPN/Proxy Detected</h2>
292
292
  <p>A login from a VPN or proxy service was detected on your account.</p>
293
293
 
294
294
  <div style="background: white; padding: 15px; border-radius: 8px; margin: 20px 0;">
@@ -313,7 +313,7 @@ If this was you, no action is needed.`
313
313
  </div>
314
314
  </body>
315
315
  </html>`,
316
- text: `⚠️ VPN/Proxy Detected
316
+ text: `[WARNING] VPN/Proxy Detected
317
317
 
318
318
  A login from a VPN or proxy service was detected on your account.
319
319
 
@@ -449,7 +449,7 @@ const SettingsPage = () => {
449
449
  setHasChanges(false);
450
450
  };
451
451
  const handleCleanInactive = async () => {
452
- if (!confirm("⚠️ WARNING: This will permanently delete ALL inactive sessions.\n\nContinue?")) {
452
+ if (!confirm("[WARNING] This will permanently delete ALL inactive sessions.\n\nContinue?")) {
453
453
  return;
454
454
  }
455
455
  setCleaning(true);
@@ -543,7 +543,7 @@ const SettingsPage = () => {
543
543
  }
544
544
  ) }),
545
545
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 6, children: [
546
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "16px", display: "block", color: theme.colors.neutral[700] }, children: "⏱️ SESSION TIMEOUT" }),
546
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "16px", display: "block", color: theme.colors.neutral[700] }, children: "SESSION TIMEOUT" }),
547
547
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Grid.Root, { gap: 6, style: { marginBottom: "32px" }, children: [
548
548
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 6, s: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
549
549
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", style: { marginBottom: "8px", display: "block" }, children: "Inactivity Timeout" }),
@@ -673,7 +673,7 @@ const SettingsPage = () => {
673
673
  }
674
674
  ) }),
675
675
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 6, children: [
676
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "16px", display: "block", color: theme.colors.neutral[700] }, children: "🔒 SECURITY OPTIONS" }),
676
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "16px", display: "block", color: theme.colors.neutral[700] }, children: "SECURITY OPTIONS" }),
677
677
  /* @__PURE__ */ jsxRuntime.jsx(
678
678
  designSystem.Box,
679
679
  {
@@ -983,7 +983,7 @@ const SettingsPage = () => {
983
983
  {
984
984
  checked: settings.alertOnSuspiciousLogin,
985
985
  onChange: () => handleChange("alertOnSuspiciousLogin", !settings.alertOnSuspiciousLogin),
986
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "14px" }, children: "🚨 Suspicious Login" })
986
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "14px" }, children: "Suspicious Login" })
987
987
  }
988
988
  )
989
989
  }
@@ -1005,7 +1005,7 @@ const SettingsPage = () => {
1005
1005
  {
1006
1006
  checked: settings.alertOnNewLocation,
1007
1007
  onChange: () => handleChange("alertOnNewLocation", !settings.alertOnNewLocation),
1008
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "14px" }, children: "📍 New Location" })
1008
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "14px" }, children: "New Location" })
1009
1009
  }
1010
1010
  )
1011
1011
  }
@@ -1027,24 +1027,24 @@ const SettingsPage = () => {
1027
1027
  {
1028
1028
  checked: settings.alertOnVpnProxy,
1029
1029
  onChange: () => handleChange("alertOnVpnProxy", !settings.alertOnVpnProxy),
1030
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "14px" }, children: "⚠️ VPN/Proxy" })
1030
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "14px" }, children: "VPN/Proxy" })
1031
1031
  }
1032
1032
  )
1033
1033
  }
1034
1034
  ) })
1035
1035
  ] }),
1036
1036
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, { style: { marginBottom: "24px" } }),
1037
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "8px", display: "block", color: theme.colors.neutral[700] }, children: "📝 EMAIL TEMPLATES" }),
1037
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", style: { marginBottom: "8px", display: "block", color: theme.colors.neutral[700] }, children: "EMAIL TEMPLATES" }),
1038
1038
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { marginBottom: "20px", display: "block", fontSize: "12px" }, children: "Customize email notification templates with dynamic variables" }),
1039
1039
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tabs.Root, { value: activeTemplateTab, onValueChange: setActiveTemplateTab, children: [
1040
1040
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tabs.List, { "aria-label": "Email Templates", children: [
1041
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Trigger, { value: "suspiciousLogin", children: "🚨 Suspicious Login" }),
1042
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Trigger, { value: "newLocation", children: "📍 New Location" }),
1043
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Trigger, { value: "vpnProxy", children: "⚠️ VPN/Proxy" })
1041
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Trigger, { value: "suspiciousLogin", children: "Suspicious Login" }),
1042
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Trigger, { value: "newLocation", children: "New Location" }),
1043
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Trigger, { value: "vpnProxy", children: "VPN/Proxy" })
1044
1044
  ] }),
1045
1045
  Object.keys(settings.emailTemplates).map((templateKey) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tabs.Content, { value: templateKey, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { paddingTop: 4, children: [
1046
1046
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { style: { marginBottom: "24px" }, children: [
1047
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", style: { marginBottom: "8px", display: "block" }, children: "✉️ Email Subject" }),
1047
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", style: { marginBottom: "8px", display: "block" }, children: "Email Subject" }),
1048
1048
  /* @__PURE__ */ jsxRuntime.jsx(
1049
1049
  designSystem.TextInput,
1050
1050
  {
@@ -1200,7 +1200,7 @@ const SettingsPage = () => {
1200
1200
  const validation = validateTemplate(settings.emailTemplates[templateKey].html, templateKey);
1201
1201
  toggleNotification({
1202
1202
  type: validation.isValid ? "success" : "warning",
1203
- message: validation.isValid ? `✓ Template valid! Found ${validation.foundVars.length}/${validation.totalAvailable} variables.` : "⚠️ No variables found. Add at least one variable."
1203
+ message: validation.isValid ? `✓ Template valid! Found ${validation.foundVars.length}/${validation.totalAvailable} variables.` : "[WARNING] No variables found. Add at least one variable."
1204
1204
  });
1205
1205
  },
1206
1206
  children: "✓ Validate"
@@ -1405,7 +1405,7 @@ const SettingsPage = () => {
1405
1405
  }
1406
1406
  ),
1407
1407
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", style: { marginTop: "10px" }, children: [
1408
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: "💡 Optional: Post session alerts to your Discord channel" }),
1408
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: "Optional: Post session alerts to your Discord channel" }),
1409
1409
  settings.discordWebhookUrl && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "primary600", style: { fontSize: "11px", fontFamily: "monospace" }, children: [
1410
1410
  settings.discordWebhookUrl.length,
1411
1411
  " characters"
@@ -1448,7 +1448,7 @@ const SettingsPage = () => {
1448
1448
  }
1449
1449
  ),
1450
1450
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", style: { marginTop: "10px" }, children: [
1451
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: "💡 Optional: Post session alerts to your Slack workspace" }),
1451
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: "Optional: Post session alerts to your Slack workspace" }),
1452
1452
  settings.slackWebhookUrl && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "primary600", style: { fontSize: "11px", fontFamily: "monospace" }, children: [
1453
1453
  settings.slackWebhookUrl.length,
1454
1454
  " characters"
@@ -1462,7 +1462,7 @@ const SettingsPage = () => {
1462
1462
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 5, background: "primary100", style: { borderRadius: theme.borderRadius.md, marginTop: "32px", border: "2px solid #BAE6FD" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 3, alignItems: "flex-start", children: [
1463
1463
  /* @__PURE__ */ jsxRuntime.jsx(icons.Check, { style: { width: "20px", height: "20px", color: theme.colors.success[600], flexShrink: 0, marginTop: "2px" } }),
1464
1464
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { style: { flex: 1 }, children: [
1465
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", style: { marginBottom: "8px", display: "block", color: theme.colors.primary[700] }, children: "Database-Backed Settings" }),
1465
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", style: { marginBottom: "8px", display: "block", color: theme.colors.primary[700] }, children: "Database-Backed Settings" }),
1466
1466
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "primary700", style: { fontSize: "13px", lineHeight: "1.8" }, children: "All settings are stored in your Strapi database and shared across all admin users. Changes take effect immediately - no server restart required! Email templates, webhooks, and security options are all managed from this interface." })
1467
1467
  ] })
1468
1468
  ] }) })