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.
- package/README.md +90 -0
- package/admin/src/components/LicenseGuard.jsx +6 -6
- package/admin/src/components/SessionDetailModal.jsx +12 -12
- package/admin/src/components/SessionInfoCard.jsx +3 -3
- package/admin/src/components/SessionInfoPanel.jsx +3 -2
- package/admin/src/hooks/useLicense.js +1 -1
- package/admin/src/index.js +2 -2
- package/admin/src/pages/Analytics.jsx +2 -2
- package/admin/src/pages/HomePage.jsx +11 -14
- package/admin/src/pages/License.jsx +2 -2
- package/admin/src/pages/Settings.jsx +24 -25
- package/admin/src/pages/SettingsNew.jsx +21 -21
- package/admin/src/utils/parseUserAgent.js +7 -7
- package/dist/_chunks/{Analytics-Bi-vcT63.js → Analytics-BBdv1I5y.js} +4 -4
- package/dist/_chunks/{Analytics-BM9i88xu.mjs → Analytics-Dv9f_0eZ.mjs} +4 -4
- package/dist/_chunks/{App-DcnJOCL9.mjs → App-CIQ-7sa7.mjs} +26 -31
- package/dist/_chunks/{App-BbiNy_cT.js → App-CJaZPNjt.js} +26 -31
- package/dist/_chunks/{License-kYo8j2yl.js → License-D24rgaZQ.js} +3 -3
- package/dist/_chunks/{License-DsxP-MAL.mjs → License-nrmFxoBm.mjs} +3 -3
- package/dist/_chunks/{Settings-jW0TOE_d.js → Settings-CqxgjU0y.js} +26 -26
- package/dist/_chunks/{Settings-C3sW9eBD.mjs → Settings-D5dLEGc_.mjs} +26 -26
- package/dist/_chunks/{index-DG9XeVSg.mjs → index-Duk1_Wrz.mjs} +15 -15
- package/dist/_chunks/{index-Dr2HT-Dd.js → index-WH04CS1c.js} +15 -15
- package/dist/_chunks/{useLicense-BL_3bX9O.js → useLicense-BwOlCyhc.js} +2 -2
- package/dist/_chunks/{useLicense-DOkJX-tk.mjs → useLicense-Ce8GaxB0.mjs} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +250 -119
- package/dist/server/index.mjs +250 -119
- package/package.json +1 -1
- package/server/src/bootstrap.js +106 -28
- package/server/src/controllers/license.js +4 -4
- package/server/src/controllers/session.js +67 -13
- package/server/src/destroy.js +1 -1
- package/server/src/middlewares/last-seen.js +13 -7
- package/server/src/register.js +4 -4
- package/server/src/routes/content-api.js +11 -2
- package/server/src/services/geolocation.js +4 -2
- package/server/src/services/license-guard.js +13 -10
- package/server/src/services/notifications.js +20 -20
- package/server/src/services/service.js +1 -1
- package/server/src/services/session.js +63 -33
- package/server/src/utils/encryption.js +1 -1
|
@@ -206,12 +206,12 @@ const validateTemplate = (template, templateType) => {
|
|
|
206
206
|
// Get default email templates
|
|
207
207
|
const getDefaultTemplates = () => ({
|
|
208
208
|
suspiciousLogin: {
|
|
209
|
-
subject: '
|
|
209
|
+
subject: '[ALERT] Suspicious Login Alert - Session Manager',
|
|
210
210
|
html: `
|
|
211
211
|
<html>
|
|
212
212
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
|
|
213
213
|
<div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f9fafb; border-radius: 10px;">
|
|
214
|
-
<h2 style="color: #dc2626;"
|
|
214
|
+
<h2 style="color: #dc2626;">[ALERT] Suspicious Login Detected</h2>
|
|
215
215
|
<p>A potentially suspicious login was detected for your account.</p>
|
|
216
216
|
|
|
217
217
|
<div style="background: white; padding: 15px; border-radius: 8px; margin: 20px 0;">
|
|
@@ -246,7 +246,7 @@ const getDefaultTemplates = () => ({
|
|
|
246
246
|
</div>
|
|
247
247
|
</body>
|
|
248
248
|
</html>`,
|
|
249
|
-
text:
|
|
249
|
+
text: `[ALERT] Suspicious Login Detected
|
|
250
250
|
|
|
251
251
|
A potentially suspicious login was detected for your account.
|
|
252
252
|
|
|
@@ -261,12 +261,12 @@ Login Details:
|
|
|
261
261
|
Security: VPN={{reason.isVpn}}, Proxy={{reason.isProxy}}, Threat={{reason.isThreat}}, Score={{reason.securityScore}}/100`,
|
|
262
262
|
},
|
|
263
263
|
newLocation: {
|
|
264
|
-
subject: '
|
|
264
|
+
subject: '[LOCATION] New Location Login Detected',
|
|
265
265
|
html: `
|
|
266
266
|
<html>
|
|
267
267
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
|
|
268
268
|
<div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f0f9ff; border-radius: 10px;">
|
|
269
|
-
<h2 style="color: #0284c7;"
|
|
269
|
+
<h2 style="color: #0284c7;">[LOCATION] Login from New Location</h2>
|
|
270
270
|
<p>Your account was accessed from a new location.</p>
|
|
271
271
|
|
|
272
272
|
<div style="background: white; padding: 15px; border-radius: 8px; margin: 20px 0;">
|
|
@@ -289,7 +289,7 @@ Security: VPN={{reason.isVpn}}, Proxy={{reason.isProxy}}, Threat={{reason.isThre
|
|
|
289
289
|
</div>
|
|
290
290
|
</body>
|
|
291
291
|
</html>`,
|
|
292
|
-
text:
|
|
292
|
+
text: `[LOCATION] Login from New Location
|
|
293
293
|
|
|
294
294
|
Your account was accessed from a new location.
|
|
295
295
|
|
|
@@ -304,12 +304,12 @@ New Location Details:
|
|
|
304
304
|
If this was you, no action is needed.`,
|
|
305
305
|
},
|
|
306
306
|
vpnProxy: {
|
|
307
|
-
subject: '
|
|
307
|
+
subject: '[WARNING] VPN/Proxy Login Detected',
|
|
308
308
|
html: `
|
|
309
309
|
<html>
|
|
310
310
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
|
|
311
311
|
<div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #fffbeb; border-radius: 10px;">
|
|
312
|
-
<h2 style="color: #d97706;"
|
|
312
|
+
<h2 style="color: #d97706;">[WARNING] VPN/Proxy Detected</h2>
|
|
313
313
|
<p>A login from a VPN or proxy service was detected on your account.</p>
|
|
314
314
|
|
|
315
315
|
<div style="background: white; padding: 15px; border-radius: 8px; margin: 20px 0;">
|
|
@@ -334,7 +334,7 @@ If this was you, no action is needed.`,
|
|
|
334
334
|
</div>
|
|
335
335
|
</body>
|
|
336
336
|
</html>`,
|
|
337
|
-
text:
|
|
337
|
+
text: `[WARNING] VPN/Proxy Detected
|
|
338
338
|
|
|
339
339
|
A login from a VPN or proxy service was detected on your account.
|
|
340
340
|
|
|
@@ -444,7 +444,7 @@ const SettingsPage = () => {
|
|
|
444
444
|
};
|
|
445
445
|
|
|
446
446
|
const handleCleanInactive = async () => {
|
|
447
|
-
if (!confirm('
|
|
447
|
+
if (!confirm('[WARNING] This will permanently delete ALL inactive sessions.\n\nContinue?')) {
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
450
|
|
|
@@ -553,7 +553,7 @@ const SettingsPage = () => {
|
|
|
553
553
|
|
|
554
554
|
{/* Session Timeout */}
|
|
555
555
|
<Typography variant="sigma" fontWeight="bold" style={{ marginBottom: '16px', display: 'block', color: theme.colors.neutral[700] }}>
|
|
556
|
-
|
|
556
|
+
SESSION TIMEOUT
|
|
557
557
|
</Typography>
|
|
558
558
|
<Grid.Root gap={6} style={{ marginBottom: '32px' }}>
|
|
559
559
|
<Grid.Item col={6} s={12}>
|
|
@@ -694,7 +694,7 @@ const SettingsPage = () => {
|
|
|
694
694
|
<Box padding={6}>
|
|
695
695
|
|
|
696
696
|
<Typography variant="sigma" fontWeight="bold" style={{ marginBottom: '16px', display: 'block', color: theme.colors.neutral[700] }}>
|
|
697
|
-
|
|
697
|
+
SECURITY OPTIONS
|
|
698
698
|
</Typography>
|
|
699
699
|
|
|
700
700
|
{/* Feature Toggles */}
|
|
@@ -866,7 +866,7 @@ const SettingsPage = () => {
|
|
|
866
866
|
checked={settings.alertOnSuspiciousLogin}
|
|
867
867
|
onChange={() => handleChange('alertOnSuspiciousLogin', !settings.alertOnSuspiciousLogin)}
|
|
868
868
|
>
|
|
869
|
-
|
|
869
|
+
Suspicious Login
|
|
870
870
|
</Checkbox>
|
|
871
871
|
</Box>
|
|
872
872
|
</Grid.Item>
|
|
@@ -876,7 +876,7 @@ const SettingsPage = () => {
|
|
|
876
876
|
checked={settings.alertOnNewLocation}
|
|
877
877
|
onChange={() => handleChange('alertOnNewLocation', !settings.alertOnNewLocation)}
|
|
878
878
|
>
|
|
879
|
-
|
|
879
|
+
New Location
|
|
880
880
|
</Checkbox>
|
|
881
881
|
</Box>
|
|
882
882
|
</Grid.Item>
|
|
@@ -886,7 +886,7 @@ const SettingsPage = () => {
|
|
|
886
886
|
checked={settings.alertOnVpnProxy}
|
|
887
887
|
onChange={() => handleChange('alertOnVpnProxy', !settings.alertOnVpnProxy)}
|
|
888
888
|
>
|
|
889
|
-
|
|
889
|
+
VPN/Proxy
|
|
890
890
|
</Checkbox>
|
|
891
891
|
</Box>
|
|
892
892
|
</Grid.Item>
|
|
@@ -895,7 +895,7 @@ const SettingsPage = () => {
|
|
|
895
895
|
{/* Email Templates */}
|
|
896
896
|
<Divider style={{ marginBottom: '24px' }} />
|
|
897
897
|
<Typography variant="sigma" fontWeight="bold" style={{ marginBottom: '8px', display: 'block', color: theme.colors.neutral[700] }}>
|
|
898
|
-
|
|
898
|
+
EMAIL TEMPLATES
|
|
899
899
|
</Typography>
|
|
900
900
|
<Typography variant="pi" textColor="neutral600" style={{ marginBottom: '20px', display: 'block', fontSize: '12px' }}>
|
|
901
901
|
Customize email notification templates with dynamic variables
|
|
@@ -904,9 +904,9 @@ const SettingsPage = () => {
|
|
|
904
904
|
{/* Template Tabs */}
|
|
905
905
|
<Tabs.Root value={activeTemplateTab} onValueChange={setActiveTemplateTab}>
|
|
906
906
|
<Tabs.List aria-label="Email Templates">
|
|
907
|
-
<Tabs.Trigger value="suspiciousLogin"
|
|
908
|
-
<Tabs.Trigger value="newLocation"
|
|
909
|
-
<Tabs.Trigger value="vpnProxy"
|
|
907
|
+
<Tabs.Trigger value="suspiciousLogin">Suspicious Login</Tabs.Trigger>
|
|
908
|
+
<Tabs.Trigger value="newLocation">New Location</Tabs.Trigger>
|
|
909
|
+
<Tabs.Trigger value="vpnProxy">VPN/Proxy</Tabs.Trigger>
|
|
910
910
|
</Tabs.List>
|
|
911
911
|
|
|
912
912
|
{Object.keys(settings.emailTemplates).map((templateKey) => (
|
|
@@ -915,7 +915,7 @@ const SettingsPage = () => {
|
|
|
915
915
|
{/* Subject */}
|
|
916
916
|
<Box style={{ marginBottom: '24px' }}>
|
|
917
917
|
<Typography variant="pi" fontWeight="bold" style={{ marginBottom: '8px', display: 'block' }}>
|
|
918
|
-
|
|
918
|
+
Email Subject
|
|
919
919
|
</Typography>
|
|
920
920
|
<TextInput
|
|
921
921
|
value={settings.emailTemplates[templateKey].subject}
|
|
@@ -1151,7 +1151,7 @@ const SettingsPage = () => {
|
|
|
1151
1151
|
<Information style={{ width: '20px', height: '20px', color: theme.colors.neutral[600], flexShrink: 0, marginTop: '2px' }} />
|
|
1152
1152
|
<Box style={{ flex: 1 }}>
|
|
1153
1153
|
<Typography variant="omega" fontWeight="bold" style={{ marginBottom: '8px', display: 'block' }}>
|
|
1154
|
-
|
|
1154
|
+
How to Apply These Settings
|
|
1155
1155
|
</Typography>
|
|
1156
1156
|
<Typography variant="pi" textColor="neutral600" style={{ fontSize: '13px', lineHeight: '1.8' }}>
|
|
1157
1157
|
Settings are saved in your browser. To apply permanently, copy the config below and paste it into{' '}
|
|
@@ -7,7 +7,7 @@ export const parseUserAgent = (userAgent) => {
|
|
|
7
7
|
if (!userAgent) {
|
|
8
8
|
return {
|
|
9
9
|
device: 'Unknown',
|
|
10
|
-
deviceIcon: '
|
|
10
|
+
deviceIcon: 'question',
|
|
11
11
|
browser: 'Unknown',
|
|
12
12
|
os: 'Unknown',
|
|
13
13
|
};
|
|
@@ -17,14 +17,14 @@ export const parseUserAgent = (userAgent) => {
|
|
|
17
17
|
|
|
18
18
|
// Device detection
|
|
19
19
|
let device = 'Desktop';
|
|
20
|
-
let deviceIcon = '
|
|
20
|
+
let deviceIcon = 'desktop';
|
|
21
21
|
|
|
22
22
|
if (/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(userAgent)) {
|
|
23
23
|
device = 'Tablet';
|
|
24
|
-
deviceIcon = '
|
|
24
|
+
deviceIcon = 'tablet';
|
|
25
25
|
} else if (/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(userAgent)) {
|
|
26
26
|
device = 'Mobile';
|
|
27
|
-
deviceIcon = '
|
|
27
|
+
deviceIcon = 'mobile';
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// Browser detection
|
|
@@ -41,15 +41,15 @@ export const parseUserAgent = (userAgent) => {
|
|
|
41
41
|
browser = 'Opera';
|
|
42
42
|
} else if (ua.includes('curl/')) {
|
|
43
43
|
browser = 'cURL';
|
|
44
|
-
deviceIcon = '
|
|
44
|
+
deviceIcon = 'gear';
|
|
45
45
|
device = 'API Client';
|
|
46
46
|
} else if (ua.includes('postman')) {
|
|
47
47
|
browser = 'Postman';
|
|
48
|
-
deviceIcon = '
|
|
48
|
+
deviceIcon = 'code';
|
|
49
49
|
device = 'API Client';
|
|
50
50
|
} else if (ua.includes('insomnia')) {
|
|
51
51
|
browser = 'Insomnia';
|
|
52
|
-
deviceIcon = '
|
|
52
|
+
deviceIcon = 'code';
|
|
53
53
|
device = 'API Client';
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -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-
|
|
10
|
-
const useLicense = require("./useLicense-
|
|
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 = {
|
|
@@ -428,7 +428,7 @@ const AnalyticsPage = () => {
|
|
|
428
428
|
display: "block",
|
|
429
429
|
textShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
|
430
430
|
},
|
|
431
|
-
children: "
|
|
431
|
+
children: "Analytics Dashboard"
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
434
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -471,7 +471,7 @@ const AnalyticsPage = () => {
|
|
|
471
471
|
e.currentTarget.style.transform = "translateY(0) scale(1)";
|
|
472
472
|
e.currentTarget.style.boxShadow = "0 6px 16px rgba(245, 158, 11, 0.4)";
|
|
473
473
|
},
|
|
474
|
-
children: "
|
|
474
|
+
children: "Upgrade to Premium"
|
|
475
475
|
}
|
|
476
476
|
)
|
|
477
477
|
] })
|
|
@@ -4,8 +4,8 @@ import { useFetchClient } from "@strapi/strapi/admin";
|
|
|
4
4
|
import styled, { css, keyframes } from "styled-components";
|
|
5
5
|
import { Loader, Typography, Box, Flex, Badge } from "@strapi/design-system";
|
|
6
6
|
import { ChartBubble, Crown, User, Clock, Monitor } from "@strapi/icons";
|
|
7
|
-
import { a as pluginId } from "./index-
|
|
8
|
-
import { u as useLicense } from "./useLicense-
|
|
7
|
+
import { a as pluginId } from "./index-Duk1_Wrz.mjs";
|
|
8
|
+
import { u as useLicense } from "./useLicense-Ce8GaxB0.mjs";
|
|
9
9
|
const theme = {
|
|
10
10
|
colors: {
|
|
11
11
|
primary: { 100: "#E0F2FE", 500: "#0EA5E9", 600: "#0284C7" },
|
|
@@ -424,7 +424,7 @@ const AnalyticsPage = () => {
|
|
|
424
424
|
display: "block",
|
|
425
425
|
textShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
|
426
426
|
},
|
|
427
|
-
children: "
|
|
427
|
+
children: "Analytics Dashboard"
|
|
428
428
|
}
|
|
429
429
|
),
|
|
430
430
|
/* @__PURE__ */ jsx(
|
|
@@ -467,7 +467,7 @@ const AnalyticsPage = () => {
|
|
|
467
467
|
e.currentTarget.style.transform = "translateY(0) scale(1)";
|
|
468
468
|
e.currentTarget.style.boxShadow = "0 6px 16px rgba(245, 158, 11, 0.4)";
|
|
469
469
|
},
|
|
470
|
-
children: "
|
|
470
|
+
children: "Upgrade to Premium"
|
|
471
471
|
}
|
|
472
472
|
)
|
|
473
473
|
] })
|
|
@@ -4,8 +4,8 @@ import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
|
4
4
|
import styled, { css, keyframes } from "styled-components";
|
|
5
5
|
import { Modal, Flex, Box, Typography, Badge, Divider, Button, Loader, SingleSelect, SingleSelectOption, Thead, Tr, Th, Tbody, Td, Table, TextInput } from "@strapi/design-system";
|
|
6
6
|
import { Check, Information, Monitor, Server, Clock, Cross, Earth, Shield, Crown, Phone, Download, User, Eye, Trash, Search, Key } from "@strapi/icons";
|
|
7
|
-
import { p as parseUserAgent, a as pluginId } from "./index-
|
|
8
|
-
import { u as useLicense } from "./useLicense-
|
|
7
|
+
import { p as parseUserAgent, a as pluginId } from "./index-Duk1_Wrz.mjs";
|
|
8
|
+
import { u as useLicense } from "./useLicense-Ce8GaxB0.mjs";
|
|
9
9
|
import { useNavigate } from "react-router-dom";
|
|
10
10
|
const TwoColumnGrid = styled.div`
|
|
11
11
|
display: grid;
|
|
@@ -54,7 +54,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
54
54
|
} catch (err) {
|
|
55
55
|
console.error("[SessionDetailModal] Error fetching geolocation:", err);
|
|
56
56
|
setGeoData({
|
|
57
|
-
country_flag: "
|
|
57
|
+
country_flag: "",
|
|
58
58
|
country: "Unknown",
|
|
59
59
|
city: "Unknown",
|
|
60
60
|
timezone: "Unknown",
|
|
@@ -68,7 +68,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
const premiumData = geoData || {
|
|
71
|
-
country_flag: "
|
|
71
|
+
country_flag: "",
|
|
72
72
|
country: "Loading...",
|
|
73
73
|
city: "Loading...",
|
|
74
74
|
timezone: "Loading...",
|
|
@@ -149,20 +149,20 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
149
149
|
textColor: "neutral0",
|
|
150
150
|
size: "M",
|
|
151
151
|
style: { fontSize: "14px", padding: "8px 20px", fontWeight: "600" },
|
|
152
|
-
children: isOnline ? "
|
|
152
|
+
children: isOnline ? "ONLINE" : "OFFLINE"
|
|
153
153
|
}
|
|
154
154
|
) }),
|
|
155
155
|
/* @__PURE__ */ jsx(Divider, { style: { marginBottom: "24px" } }),
|
|
156
156
|
/* @__PURE__ */ jsxs(TwoColumnGrid, { children: [
|
|
157
157
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
158
158
|
/* @__PURE__ */ jsxs(Section, { children: [
|
|
159
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "
|
|
159
|
+
/* @__PURE__ */ jsx(SectionTitle, { children: "User" }),
|
|
160
160
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: Check, label: "Username", value: session.user?.username || "N/A" }),
|
|
161
161
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: Information, label: "Email", value: session.user?.email || "N/A" }),
|
|
162
162
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: Information, label: "User ID", value: session.user?.id || "N/A" })
|
|
163
163
|
] }),
|
|
164
164
|
/* @__PURE__ */ jsxs(Section, { children: [
|
|
165
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "
|
|
165
|
+
/* @__PURE__ */ jsx(SectionTitle, { children: "Device" }),
|
|
166
166
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: DeviceIcon, label: "Device", value: deviceInfo.device }),
|
|
167
167
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: Monitor, label: "Browser", value: `${deviceInfo.browser} ${deviceInfo.browserVersion || ""}` }),
|
|
168
168
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: Server, label: "OS", value: deviceInfo.os }),
|
|
@@ -170,7 +170,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
170
170
|
] })
|
|
171
171
|
] }),
|
|
172
172
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Section, { children: [
|
|
173
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "
|
|
173
|
+
/* @__PURE__ */ jsx(SectionTitle, { children: "Timeline" }),
|
|
174
174
|
/* @__PURE__ */ jsx(
|
|
175
175
|
DetailRow,
|
|
176
176
|
{
|
|
@@ -225,7 +225,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
225
225
|
] }) })
|
|
226
226
|
] }),
|
|
227
227
|
isPremium ? /* @__PURE__ */ jsxs(Section, { children: [
|
|
228
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: "
|
|
228
|
+
/* @__PURE__ */ jsx(SectionTitle, { children: "Location and Security" }),
|
|
229
229
|
geoLoading ? /* @__PURE__ */ jsx(Box, { padding: 4, style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: "Loading location data..." }) }) : /* @__PURE__ */ jsxs(TwoColumnGrid, { children: [
|
|
230
230
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
231
231
|
/* @__PURE__ */ jsx(
|
|
@@ -234,7 +234,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
234
234
|
compact: true,
|
|
235
235
|
icon: Earth,
|
|
236
236
|
label: "Country",
|
|
237
|
-
value: `${premiumData.country_flag || "
|
|
237
|
+
value: `${premiumData.country_flag || ""} ${premiumData.country}`.trim()
|
|
238
238
|
}
|
|
239
239
|
),
|
|
240
240
|
/* @__PURE__ */ jsx(DetailRow, { compact: true, icon: Earth, label: "City", value: premiumData.city }),
|
|
@@ -256,7 +256,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
256
256
|
compact: true,
|
|
257
257
|
icon: Shield,
|
|
258
258
|
label: "VPN",
|
|
259
|
-
value: premiumData.isVpn ? "
|
|
259
|
+
value: premiumData.isVpn ? "[WARNING] Yes" : "No"
|
|
260
260
|
}
|
|
261
261
|
),
|
|
262
262
|
/* @__PURE__ */ jsx(
|
|
@@ -265,7 +265,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
265
265
|
compact: true,
|
|
266
266
|
icon: Shield,
|
|
267
267
|
label: "Proxy",
|
|
268
|
-
value: premiumData.isProxy ? "
|
|
268
|
+
value: premiumData.isProxy ? "[WARNING] Yes" : "No"
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
271
|
] })
|
|
@@ -282,7 +282,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
282
282
|
},
|
|
283
283
|
children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "center", gap: 3, children: [
|
|
284
284
|
/* @__PURE__ */ jsx(Crown, { style: { width: "40px", height: "40px", color: "#d97706" } }),
|
|
285
|
-
/* @__PURE__ */ jsx(Typography, { variant: "beta", style: { color: "#92400e", fontWeight: "700" }, children: "
|
|
285
|
+
/* @__PURE__ */ jsx(Typography, { variant: "beta", style: { color: "#92400e", fontWeight: "700" }, children: "Location and Security Analysis" }),
|
|
286
286
|
/* @__PURE__ */ jsx(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" }),
|
|
287
287
|
/* @__PURE__ */ jsx(
|
|
288
288
|
Button,
|
|
@@ -306,7 +306,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
306
306
|
) }),
|
|
307
307
|
/* @__PURE__ */ jsxs(Section, { children: [
|
|
308
308
|
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "center", style: { marginBottom: "12px" }, children: [
|
|
309
|
-
/* @__PURE__ */ jsx(SectionTitle, { style: { marginBottom: 0, paddingBottom: 0, border: "none" }, children: "
|
|
309
|
+
/* @__PURE__ */ jsx(SectionTitle, { style: { marginBottom: 0, paddingBottom: 0, border: "none" }, children: "Technical Details" }),
|
|
310
310
|
/* @__PURE__ */ jsx(
|
|
311
311
|
Button,
|
|
312
312
|
{
|
|
@@ -805,7 +805,7 @@ const HomePage = () => {
|
|
|
805
805
|
}
|
|
806
806
|
};
|
|
807
807
|
const handleDeleteSession = async (sessionId) => {
|
|
808
|
-
if (!confirm("
|
|
808
|
+
if (!confirm("[WARNING] This will PERMANENTLY delete this session from the database!\n\nThis action cannot be undone.\n\nAre you sure?")) {
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
811
|
try {
|
|
@@ -1044,7 +1044,7 @@ const HomePage = () => {
|
|
|
1044
1044
|
] }),
|
|
1045
1045
|
loading && /* @__PURE__ */ jsx(Flex, { justifyContent: "center", padding: 8, children: /* @__PURE__ */ jsx(Loader, { children: "Loading sessions..." }) }),
|
|
1046
1046
|
!loading && sessions.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
1047
|
-
/* @__PURE__ */ jsx(Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color: theme.colors.neutral[700] }, children: "
|
|
1047
|
+
/* @__PURE__ */ jsx(Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", style: { marginBottom: theme.spacing.md, color: theme.colors.neutral[700] }, children: "All Sessions" }) }),
|
|
1048
1048
|
/* @__PURE__ */ jsxs(FilterBar, { children: [
|
|
1049
1049
|
/* @__PURE__ */ jsxs(SearchInputWrapper, { children: [
|
|
1050
1050
|
/* @__PURE__ */ jsx(SearchIcon, {}),
|
|
@@ -1067,10 +1067,10 @@ const HomePage = () => {
|
|
|
1067
1067
|
size: "S",
|
|
1068
1068
|
children: [
|
|
1069
1069
|
/* @__PURE__ */ jsx(SingleSelectOption, { value: "all", children: "All Sessions" }),
|
|
1070
|
-
/* @__PURE__ */ jsx(SingleSelectOption, { value: "active", children: "
|
|
1071
|
-
/* @__PURE__ */ jsx(SingleSelectOption, { value: "idle", children: "
|
|
1072
|
-
/* @__PURE__ */ jsx(SingleSelectOption, { value: "loggedout", children: "
|
|
1073
|
-
/* @__PURE__ */ jsx(SingleSelectOption, { value: "terminated", children: "
|
|
1070
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "active", children: "Active (less than 15 min)" }),
|
|
1071
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "idle", children: "Idle (more than 15 min)" }),
|
|
1072
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "loggedout", children: "Logged Out" }),
|
|
1073
|
+
/* @__PURE__ */ jsx(SingleSelectOption, { value: "terminated", children: "Terminated" })
|
|
1074
1074
|
]
|
|
1075
1075
|
}
|
|
1076
1076
|
) }),
|
|
@@ -1116,26 +1116,26 @@ const HomePage = () => {
|
|
|
1116
1116
|
active: {
|
|
1117
1117
|
bg: theme.colors.success[50],
|
|
1118
1118
|
badgeColor: "success600",
|
|
1119
|
-
label: "
|
|
1119
|
+
label: "Active",
|
|
1120
1120
|
indicator: true
|
|
1121
1121
|
},
|
|
1122
1122
|
idle: {
|
|
1123
1123
|
bg: theme.colors.warning[50],
|
|
1124
1124
|
badgeColor: "warning600",
|
|
1125
|
-
label: "
|
|
1125
|
+
label: "Idle",
|
|
1126
1126
|
indicator: false
|
|
1127
1127
|
},
|
|
1128
1128
|
loggedout: {
|
|
1129
1129
|
bg: theme.colors.danger[50],
|
|
1130
1130
|
badgeColor: "danger600",
|
|
1131
|
-
label: "
|
|
1131
|
+
label: "Logged Out",
|
|
1132
1132
|
indicator: false,
|
|
1133
1133
|
opacity: 0.7
|
|
1134
1134
|
},
|
|
1135
1135
|
terminated: {
|
|
1136
1136
|
bg: theme.colors.neutral[100],
|
|
1137
1137
|
badgeColor: "neutral600",
|
|
1138
|
-
label: "
|
|
1138
|
+
label: "Terminated",
|
|
1139
1139
|
indicator: false,
|
|
1140
1140
|
opacity: 0.6
|
|
1141
1141
|
}
|
|
@@ -1349,7 +1349,6 @@ const HomePage = () => {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
),
|
|
1352
|
-
/* @__PURE__ */ jsx(FloatingEmoji, { children: "💻" }),
|
|
1353
1352
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "center", gap: 6, style: { position: "relative", zIndex: 1 }, children: [
|
|
1354
1353
|
/* @__PURE__ */ jsx(
|
|
1355
1354
|
Box,
|
|
@@ -1755,7 +1754,7 @@ const LicenseGuard = ({ children }) => {
|
|
|
1755
1754
|
border: "2px solid #BAE6FD",
|
|
1756
1755
|
width: "100%"
|
|
1757
1756
|
},
|
|
1758
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: useExistingKey ? "
|
|
1757
|
+
children: /* @__PURE__ */ jsx(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." })
|
|
1759
1758
|
}
|
|
1760
1759
|
),
|
|
1761
1760
|
useExistingKey ? (
|
|
@@ -1822,15 +1821,11 @@ const LicenseGuard = ({ children }) => {
|
|
|
1822
1821
|
children: [
|
|
1823
1822
|
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "bold", style: { marginBottom: "12px", display: "block" }, children: "Ready to activate with your account:" }),
|
|
1824
1823
|
/* @__PURE__ */ jsxs(Typography, { variant: "pi", style: { marginBottom: "4px", display: "block" }, children: [
|
|
1825
|
-
"👤 ",
|
|
1826
1824
|
adminUser.firstname || "Admin",
|
|
1827
1825
|
" ",
|
|
1828
1826
|
adminUser.lastname || "User"
|
|
1829
1827
|
] }),
|
|
1830
|
-
/* @__PURE__ */
|
|
1831
|
-
"📧 ",
|
|
1832
|
-
adminUser.email || "Loading..."
|
|
1833
|
-
] })
|
|
1828
|
+
/* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: adminUser.email || "Loading..." })
|
|
1834
1829
|
]
|
|
1835
1830
|
}
|
|
1836
1831
|
)
|