strapi-plugin-magic-sessionmanager 4.7.1 → 4.8.0
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/CHANGELOG.md +27 -0
- package/README.md +17 -38
- package/dist/admin/Analytics-CaRlu5ad.js +332 -0
- package/dist/admin/Analytics-THqDbNX0.mjs +330 -0
- package/dist/admin/App-AbZwLHtF.js +1263 -0
- package/dist/admin/App-hSh7guii.mjs +1261 -0
- package/dist/admin/FormField-C8kIT2NE.mjs +59 -0
- package/dist/admin/FormField-b5KBvkrj.js +60 -0
- package/dist/admin/License-BXBVwUVu.mjs +299 -0
- package/dist/admin/License-CABdPwnd.js +301 -0
- package/dist/admin/OnlineUsersWidget-BnWFj9IM.mjs +230 -0
- package/dist/admin/OnlineUsersWidget-CPFAACSb.js +230 -0
- package/dist/admin/PluginPageLayout-BPFMcgrx.mjs +42 -0
- package/dist/admin/PluginPageLayout-DmNzMdqu.js +43 -0
- package/dist/admin/Settings-B4DNdeKx.js +2152 -0
- package/dist/admin/Settings-C4RsJosh.mjs +2150 -0
- package/dist/admin/{de-JBE-iylO.mjs → de-AwIFTd9i.mjs} +154 -20
- package/dist/admin/{de-BnqGCokx.js → de-D23nmqnl.js} +154 -20
- package/dist/admin/{en-BRmVwd8-.js → en-C5iYQ0mC.js} +155 -21
- package/dist/admin/{en-kQWtdEai.mjs → en-D6QEGeRh.mjs} +155 -21
- package/dist/admin/{es-CH691xcL.js → es-CIXnsG-p.js} +154 -20
- package/dist/admin/{es-DOQvBxih.mjs → es-CnFfVdKw.mjs} +154 -20
- package/dist/admin/{fr-CLExO0w_.js → fr-BglXE-W4.js} +154 -20
- package/dist/admin/{fr-CmfCpepX.mjs → fr-DefoR7uH.mjs} +154 -20
- package/dist/admin/index-BFVITQ-o.mjs +624 -0
- package/dist/admin/{index-Duc7cR_d.js → index-DlMm-NyK.js} +261 -188
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/maskSensitiveValue-1uGWmrfG.mjs +20 -0
- package/dist/admin/maskSensitiveValue-B9vhxPad.js +19 -0
- package/dist/admin/{pt-BJ_F0yNi.js → pt-J5sf7jiY.js} +154 -20
- package/dist/admin/{pt-BSzZdyAH.mjs → pt-TODwvNQA.mjs} +154 -20
- package/dist/server/index.js +2812 -6159
- package/dist/server/index.mjs +2812 -6159
- package/package.json +21 -19
- package/scripts/geoip-updater.cjs +234 -15
- package/scripts/update-geoip-db.mjs +3 -0
- package/dist/admin/Analytics-CsrpxJwQ.mjs +0 -497
- package/dist/admin/Analytics-D03ZNNMR.js +0 -499
- package/dist/admin/App-B2VCS3cz.js +0 -1481
- package/dist/admin/App-qxKnK7G2.mjs +0 -1479
- package/dist/admin/License-ClW7sZLR.mjs +0 -318
- package/dist/admin/License-fixnQ7wF.js +0 -320
- package/dist/admin/OnlineUsersWidget-mR_OMiwi.mjs +0 -185
- package/dist/admin/OnlineUsersWidget-qb9utPBy.js +0 -185
- package/dist/admin/Settings-U3V4eGMo.mjs +0 -2038
- package/dist/admin/Settings-gv2BF54w.js +0 -2040
- package/dist/admin/StyledButtons-Cz8oYhmc.mjs +0 -418
- package/dist/admin/StyledButtons-DDuxnYz8.js +0 -419
- package/dist/admin/index-B_lFjUAg.mjs +0 -551
- package/dist/admin/sessionStatus-D_fWEzgj.js +0 -11
- package/dist/admin/sessionStatus-kwggjEMw.mjs +0 -12
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Field } from "@strapi/design-system";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const FieldFrame = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
|
|
8
|
+
& > div {
|
|
9
|
+
width: 100%;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
const FieldControl = styled.div`
|
|
14
|
+
width: 100%;
|
|
15
|
+
min-width: 0;
|
|
16
|
+
|
|
17
|
+
& > * {
|
|
18
|
+
width: 100% !important;
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[role='combobox'] {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
input,
|
|
33
|
+
textarea {
|
|
34
|
+
width: 100%;
|
|
35
|
+
max-width: 100%;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
const FieldHint = styled(Field.Hint)`
|
|
41
|
+
display: block;
|
|
42
|
+
width: 100%;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
max-width: 72ch;
|
|
45
|
+
margin-top: 8px;
|
|
46
|
+
line-height: 1.6;
|
|
47
|
+
text-wrap: pretty;
|
|
48
|
+
`;
|
|
49
|
+
const FormField = ({ id, name = id, label, description, children }) => {
|
|
50
|
+
const hintId = `${id}-hint`;
|
|
51
|
+
return /* @__PURE__ */ jsx(FieldFrame, { children: /* @__PURE__ */ jsxs(Field.Root, { id, name, children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Field.Label, { children: label }),
|
|
53
|
+
/* @__PURE__ */ jsx(FieldControl, { children }),
|
|
54
|
+
description ? /* @__PURE__ */ jsx(FieldHint, { id: hintId, children: description }) : null
|
|
55
|
+
] }) });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
FormField as F
|
|
59
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const designSystem = require("@strapi/design-system");
|
|
4
|
+
const styled = require("styled-components");
|
|
5
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
6
|
+
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
7
|
+
const FieldFrame = styled__default.default.div`
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
|
|
11
|
+
& > div {
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
const FieldControl = styled__default.default.div`
|
|
17
|
+
width: 100%;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
|
|
20
|
+
& > * {
|
|
21
|
+
width: 100% !important;
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[role='combobox'] {
|
|
28
|
+
width: 100%;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
input,
|
|
36
|
+
textarea {
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: 100%;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
const FieldHint = styled__default.default(designSystem.Field.Hint)`
|
|
44
|
+
display: block;
|
|
45
|
+
width: 100%;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
max-width: 72ch;
|
|
48
|
+
margin-top: 8px;
|
|
49
|
+
line-height: 1.6;
|
|
50
|
+
text-wrap: pretty;
|
|
51
|
+
`;
|
|
52
|
+
const FormField = ({ id, name = id, label, description, children }) => {
|
|
53
|
+
const hintId = `${id}-hint`;
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldFrame, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { id, name, children: [
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: label }),
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldControl, { children }),
|
|
57
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx(FieldHint, { id: hintId, children: description }) : null
|
|
58
|
+
] }) });
|
|
59
|
+
};
|
|
60
|
+
exports.FormField = FormField;
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { Loader, Box, Alert, Button, Flex, Typography, Badge, Accordion } from "@strapi/design-system";
|
|
5
|
+
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
6
|
+
import { Duplicate, Download, User, Shield, Sparkle, ChartBubble, ArrowClockwise } from "@strapi/icons";
|
|
7
|
+
import styled from "styled-components";
|
|
8
|
+
import { R as ReadableText, p as pluginId, l as logSafeAdminError, a as getTranslation } from "./index-BFVITQ-o.mjs";
|
|
9
|
+
import { P as PluginPageLayout } from "./PluginPageLayout-BPFMcgrx.mjs";
|
|
10
|
+
import { m as maskSensitiveValue, c as copyText } from "./maskSensitiveValue-1uGWmrfG.mjs";
|
|
11
|
+
const Container = styled(Box)`
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
`;
|
|
15
|
+
const LicenseKeyBanner = styled(Box)`
|
|
16
|
+
background: ${(p) => p.theme.colors.neutral0};
|
|
17
|
+
border: 1px solid ${(p) => p.theme.colors.neutral150};
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
padding: 20px;
|
|
21
|
+
margin-bottom: 16px;
|
|
22
|
+
`;
|
|
23
|
+
const FeaturePanel = styled(Box)`
|
|
24
|
+
border: 1px solid ${(p) => p.theme.colors.neutral150};
|
|
25
|
+
`;
|
|
26
|
+
const LoaderContainer = styled(Flex)`
|
|
27
|
+
min-height: 400px;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 16px;
|
|
32
|
+
`;
|
|
33
|
+
const LicensePage = () => {
|
|
34
|
+
const { formatMessage, locale } = useIntl();
|
|
35
|
+
const { get } = useFetchClient();
|
|
36
|
+
const { toggleNotification } = useNotification();
|
|
37
|
+
const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation(id), defaultMessage }, values);
|
|
38
|
+
const [loading, setLoading] = useState(true);
|
|
39
|
+
const [licenseData, setLicenseData] = useState(null);
|
|
40
|
+
const [showLicenseKey, setShowLicenseKey] = useState(false);
|
|
41
|
+
const [error, setError] = useState(null);
|
|
42
|
+
const fetchLicenseStatus = async () => {
|
|
43
|
+
setLoading(true);
|
|
44
|
+
setShowLicenseKey(false);
|
|
45
|
+
setError(null);
|
|
46
|
+
try {
|
|
47
|
+
const response = await get(`/${pluginId}/license/status`);
|
|
48
|
+
setLicenseData(response.data);
|
|
49
|
+
} catch (err) {
|
|
50
|
+
logSafeAdminError("activation.load", err);
|
|
51
|
+
setError(t("license.error.load", "Activation information could not be loaded."));
|
|
52
|
+
} finally {
|
|
53
|
+
setLoading(false);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const handleCopyLicenseKey = async () => {
|
|
57
|
+
try {
|
|
58
|
+
await copyText(licenseData?.data?.licenseKey || "");
|
|
59
|
+
toggleNotification({
|
|
60
|
+
type: "success",
|
|
61
|
+
message: t("license.success.copied", "Activation key copied to clipboard.")
|
|
62
|
+
});
|
|
63
|
+
} catch (err) {
|
|
64
|
+
logSafeAdminError("activation.copyKey", err);
|
|
65
|
+
toggleNotification({
|
|
66
|
+
type: "danger",
|
|
67
|
+
message: t("license.error.copy", "Could not copy the activation key.")
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handleDownloadLicenseKey = () => {
|
|
72
|
+
try {
|
|
73
|
+
const data2 = licenseData?.data || {};
|
|
74
|
+
const licenseKey = data2.licenseKey || "";
|
|
75
|
+
const email = data2.email || "N/A";
|
|
76
|
+
const firstName = data2.firstName || "";
|
|
77
|
+
const lastName = data2.lastName || "";
|
|
78
|
+
const fullName = `${firstName} ${lastName}`.trim() || "N/A";
|
|
79
|
+
const content = `Magic Session Manager - Optional Activation Key
|
|
80
|
+
=======================================
|
|
81
|
+
|
|
82
|
+
Activation Key: ${licenseKey}
|
|
83
|
+
|
|
84
|
+
Activation Holder Information:
|
|
85
|
+
---------------------------------------
|
|
86
|
+
Name: ${fullName}
|
|
87
|
+
Email: ${email}
|
|
88
|
+
|
|
89
|
+
Activation Status:
|
|
90
|
+
---------------------------------------
|
|
91
|
+
Status: ${data2.isActive ? "ACTIVE" : "INACTIVE"}
|
|
92
|
+
Expires: ${data2.expiresAt ? new Date(data2.expiresAt).toLocaleDateString() : "Never"}
|
|
93
|
+
|
|
94
|
+
Features:
|
|
95
|
+
---------------------------------------
|
|
96
|
+
All Session Manager features are included without a paid key.
|
|
97
|
+
|
|
98
|
+
=======================================
|
|
99
|
+
Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
100
|
+
`;
|
|
101
|
+
const blob = new Blob([content], { type: "text/plain" });
|
|
102
|
+
const url = window.URL.createObjectURL(blob);
|
|
103
|
+
const link = document.createElement("a");
|
|
104
|
+
link.href = url;
|
|
105
|
+
link.download = "session-manager-activation.txt";
|
|
106
|
+
document.body.appendChild(link);
|
|
107
|
+
link.click();
|
|
108
|
+
document.body.removeChild(link);
|
|
109
|
+
window.URL.revokeObjectURL(url);
|
|
110
|
+
toggleNotification({
|
|
111
|
+
type: "success",
|
|
112
|
+
message: t("license.success.downloaded", "Activation key downloaded.")
|
|
113
|
+
});
|
|
114
|
+
} catch (err) {
|
|
115
|
+
toggleNotification({
|
|
116
|
+
type: "danger",
|
|
117
|
+
message: t("license.error.download", "Could not download the activation key.")
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
fetchLicenseStatus();
|
|
123
|
+
}, []);
|
|
124
|
+
if (loading) {
|
|
125
|
+
return /* @__PURE__ */ jsx(
|
|
126
|
+
PluginPageLayout,
|
|
127
|
+
{
|
|
128
|
+
headingId: "magic-sessionmanager-activation-title",
|
|
129
|
+
title: t("license.title", "Optional activation"),
|
|
130
|
+
subtitle: t("license.subtitle", "An activation key is optional. All features remain available without one."),
|
|
131
|
+
children: /* @__PURE__ */ jsx(LoaderContainer, { children: /* @__PURE__ */ jsx(Loader, { children: t("license.loading", "Loading activation information...") }) })
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
if (error) {
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
PluginPageLayout,
|
|
138
|
+
{
|
|
139
|
+
headingId: "magic-sessionmanager-activation-title",
|
|
140
|
+
title: t("license.title", "Optional activation"),
|
|
141
|
+
subtitle: t("license.subtitle", "An activation key is optional. All features remain available without one."),
|
|
142
|
+
children: /* @__PURE__ */ jsx(Box, { padding: 8, children: /* @__PURE__ */ jsx(
|
|
143
|
+
Alert,
|
|
144
|
+
{
|
|
145
|
+
variant: "danger",
|
|
146
|
+
title: t("common.error", "Error"),
|
|
147
|
+
closeLabel: t("common.close", "Close"),
|
|
148
|
+
action: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: fetchLicenseStatus, children: t("common.retry", "Retry") }),
|
|
149
|
+
children: /* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "span", children: error })
|
|
150
|
+
}
|
|
151
|
+
) })
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
const isValid = licenseData?.valid;
|
|
156
|
+
const data = licenseData?.data || {};
|
|
157
|
+
const hasKey = licenseData?.hasKey ?? Boolean(data.licenseKey);
|
|
158
|
+
return /* @__PURE__ */ jsx(
|
|
159
|
+
PluginPageLayout,
|
|
160
|
+
{
|
|
161
|
+
headingId: "magic-sessionmanager-activation-title",
|
|
162
|
+
title: t("license.title", "Optional activation"),
|
|
163
|
+
subtitle: t("license.subtitle", "An activation key is optional. All features remain available without one."),
|
|
164
|
+
primaryAction: /* @__PURE__ */ jsx(Button, { startIcon: /* @__PURE__ */ jsx(ArrowClockwise, {}), onClick: fetchLicenseStatus, variant: "secondary", children: t("license.refresh", "Refresh status") }),
|
|
165
|
+
children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Box, { children: [
|
|
166
|
+
!hasKey ? /* @__PURE__ */ jsx(Alert, { variant: "default", title: t("license.status.noKey.title", "No activation key stored"), closeLabel: t("common.close", "Close"), children: /* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "span", children: t("license.status.noKey.description", "All Session Manager features are available. An activation key is optional and only used for install tracking or display.") }) }) : isValid ? /* @__PURE__ */ jsx(Alert, { variant: "success", title: t("license.status.stored.title", "Activation key stored"), closeLabel: t("common.close", "Close"), children: /* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "span", children: t("license.status.stored.description", "Your optional activation key is stored. All features remain available with or without this key.") }) }) : /* @__PURE__ */ jsx(Alert, { variant: "warning", title: t("license.status.failed.title", "Activation check failed"), closeLabel: t("common.close", "Close"), children: /* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "span", children: t("license.status.failed.description", "The activation server could not verify this key. The plugin still keeps all features available.") }) }),
|
|
167
|
+
data.licenseKey && /* @__PURE__ */ jsx(Box, { marginTop: 6, children: /* @__PURE__ */ jsx(LicenseKeyBanner, { children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", gap: 4, wrap: "wrap", children: [
|
|
168
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1 1 240px", minWidth: 0 }, children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", style: { marginBottom: "8px", display: "block" }, children: t("license.key.label", "Activation key") }),
|
|
170
|
+
/* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: 2, wrap: "wrap", style: { marginBottom: "16px" }, children: [
|
|
171
|
+
/* @__PURE__ */ jsx(
|
|
172
|
+
Typography,
|
|
173
|
+
{
|
|
174
|
+
variant: "epsilon",
|
|
175
|
+
fontWeight: "semiBold",
|
|
176
|
+
style: { fontFamily: "monospace", overflowWrap: "anywhere", minWidth: 0 },
|
|
177
|
+
children: showLicenseKey ? data.licenseKey : maskSensitiveValue(data.licenseKey)
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
/* @__PURE__ */ jsx(
|
|
181
|
+
Button,
|
|
182
|
+
{
|
|
183
|
+
type: "button",
|
|
184
|
+
variant: "tertiary",
|
|
185
|
+
size: "S",
|
|
186
|
+
"aria-label": t(
|
|
187
|
+
showLicenseKey ? "license.key.hide" : "license.key.show",
|
|
188
|
+
showLicenseKey ? "Hide key" : "Show key"
|
|
189
|
+
),
|
|
190
|
+
onClick: () => setShowLicenseKey((visible) => !visible),
|
|
191
|
+
children: t(showLicenseKey ? "license.key.hide" : "license.key.show", showLicenseKey ? "Hide key" : "Show key")
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, wrap: "wrap", children: [
|
|
196
|
+
/* @__PURE__ */ jsx(
|
|
197
|
+
Button,
|
|
198
|
+
{
|
|
199
|
+
onClick: handleCopyLicenseKey,
|
|
200
|
+
startIcon: /* @__PURE__ */ jsx(Duplicate, {}),
|
|
201
|
+
size: "S",
|
|
202
|
+
variant: "secondary",
|
|
203
|
+
children: t("license.key.copy", "Copy key")
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
/* @__PURE__ */ jsx(
|
|
207
|
+
Button,
|
|
208
|
+
{
|
|
209
|
+
onClick: handleDownloadLicenseKey,
|
|
210
|
+
startIcon: /* @__PURE__ */ jsx(Download, {}),
|
|
211
|
+
size: "S",
|
|
212
|
+
variant: "secondary",
|
|
213
|
+
children: t("license.key.download", "Download as TXT")
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
] })
|
|
217
|
+
] }),
|
|
218
|
+
/* @__PURE__ */ jsx(Badge, { variant: data.isActive ? "success" : "neutral", size: "S", children: data.isActive ? t("license.active", "Active") : t("license.inactive", "Inactive") })
|
|
219
|
+
] }) }) }),
|
|
220
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 6, children: /* @__PURE__ */ jsxs(Accordion.Root, { defaultValue: "account", collapsible: true, children: [
|
|
221
|
+
/* @__PURE__ */ jsxs(Accordion.Item, { value: "account", children: [
|
|
222
|
+
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: User, children: t("license.account.title", "Account information") }) }),
|
|
223
|
+
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(Flex, { gap: 8, wrap: "wrap", children: [
|
|
224
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "200px" }, children: [
|
|
225
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.account.email", "Email address") }),
|
|
226
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.email || t("license.value.notProvided", "Not provided") })
|
|
227
|
+
] }),
|
|
228
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "200px" }, children: [
|
|
229
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.account.holder", "Activation holder") }),
|
|
230
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.firstName && data.lastName ? `${data.firstName} ${data.lastName}` : t("license.value.notSpecified", "Not specified") })
|
|
231
|
+
] })
|
|
232
|
+
] }) }) })
|
|
233
|
+
] }),
|
|
234
|
+
/* @__PURE__ */ jsxs(Accordion.Item, { value: "details", children: [
|
|
235
|
+
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: Shield, children: t("license.details.title", "Activation details") }) }),
|
|
236
|
+
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(Flex, { gap: 8, wrap: "wrap", children: [
|
|
237
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "180px" }, children: [
|
|
238
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: data.isExpired ? t("license.details.expiredOn", "Expired on") : t("license.details.expiresOn", "Expires on") }),
|
|
239
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.expiresAt ? new Date(data.expiresAt).toLocaleDateString(locale, {
|
|
240
|
+
year: "numeric",
|
|
241
|
+
month: "long",
|
|
242
|
+
day: "numeric"
|
|
243
|
+
}) : t("license.value.never", "Never") })
|
|
244
|
+
] }),
|
|
245
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "180px" }, children: [
|
|
246
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.details.deviceName", "Device name") }),
|
|
247
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.deviceName || t("license.value.unknown", "Unknown") })
|
|
248
|
+
] }),
|
|
249
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "180px" }, children: [
|
|
250
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.details.ipAddress", "IP address") }),
|
|
251
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.ipAddress || t("license.value.notDetected", "Not detected") })
|
|
252
|
+
] })
|
|
253
|
+
] }) }) })
|
|
254
|
+
] }),
|
|
255
|
+
/* @__PURE__ */ jsxs(Accordion.Item, { value: "features", children: [
|
|
256
|
+
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: Sparkle, children: t("license.features.title", "Features and capabilities") }) }),
|
|
257
|
+
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(FeaturePanel, { padding: 5, background: "neutral0", hasRadius: true, children: [
|
|
258
|
+
/* @__PURE__ */ jsx(Typography, { variant: "delta", fontWeight: "semiBold", textColor: "neutral800", style: { marginBottom: "16px", display: "block" }, children: t("license.features.included", "All features included") }),
|
|
259
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 0, children: [
|
|
260
|
+
/* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "p", children: t("license.features.geolocation", "IP geolocation with country, city, and timezone") }),
|
|
261
|
+
/* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "p", children: t("license.features.security", "Security scoring, VPN and proxy detection, and threat analysis") }),
|
|
262
|
+
/* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "p", children: t("license.features.analytics", "Session analytics, CSV and JSON export, and real-time monitoring") }),
|
|
263
|
+
/* @__PURE__ */ jsx(ReadableText, { variant: "pi", textColor: "neutral700", tag: "p", children: t("license.features.alerts", "Email alerts, Discord and Slack webhooks, and geofencing") })
|
|
264
|
+
] })
|
|
265
|
+
] }) }) })
|
|
266
|
+
] }),
|
|
267
|
+
/* @__PURE__ */ jsxs(Accordion.Item, { value: "status", children: [
|
|
268
|
+
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: ChartBubble, children: t("license.system.title", "System status") }) }),
|
|
269
|
+
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(Flex, { gap: 8, wrap: "wrap", children: [
|
|
270
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "150px" }, children: [
|
|
271
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.system.activation", "Activation status") }),
|
|
272
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.isActive ? t("license.active", "Active") : t("license.inactive", "Inactive") })
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "150px" }, children: [
|
|
275
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.system.connection", "Connection") }),
|
|
276
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.isOnline ? t("license.system.online", "Online") : t("license.system.offline", "Offline") })
|
|
277
|
+
] }),
|
|
278
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "150px" }, children: [
|
|
279
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.system.lastSync", "Last sync") }),
|
|
280
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.lastPingAt ? new Date(data.lastPingAt).toLocaleTimeString(locale) : t("license.value.never", "Never") })
|
|
281
|
+
] }),
|
|
282
|
+
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "150px" }, children: [
|
|
283
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.system.deviceLimit", "Device limit") }),
|
|
284
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "omega", fontWeight: "semiBold", children: [
|
|
285
|
+
data.currentDevices || 0,
|
|
286
|
+
" / ",
|
|
287
|
+
data.maxDevices || 1
|
|
288
|
+
] })
|
|
289
|
+
] })
|
|
290
|
+
] }) }) })
|
|
291
|
+
] })
|
|
292
|
+
] }) })
|
|
293
|
+
] }) })
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
};
|
|
297
|
+
export {
|
|
298
|
+
LicensePage as default
|
|
299
|
+
};
|