strapi-plugin-magic-link-v5 5.5.9 → 6.0.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 +733 -0
- package/README.md +662 -928
- package/dist/admin/LicenseGuard-BgLA9go3.mjs +495 -0
- package/dist/admin/LicenseGuard-ewCjpc17.js +513 -0
- package/dist/admin/de-B1FNErPH.mjs +673 -0
- package/dist/admin/de-e75OECdq.js +673 -0
- package/dist/admin/en-CABKGbxH.js +673 -0
- package/dist/admin/en-HqDOFBCc.mjs +673 -0
- package/dist/admin/es-DpWl0Fax.js +673 -0
- package/dist/admin/es-jb94jqPR.mjs +673 -0
- package/dist/admin/fr-BQhLPvYw.js +673 -0
- package/dist/admin/fr-BseH1wrr.mjs +673 -0
- package/dist/admin/index-6ot9j1cN.js +5268 -0
- package/dist/admin/index-B390rccl.js +622 -0
- package/dist/admin/index-BPGKtruf.mjs +5266 -0
- package/dist/admin/index-BaTIQtnA.js +3869 -0
- package/dist/admin/index-CmG-93yx.js +141 -0
- package/dist/admin/index-DXe_ge4v.mjs +620 -0
- package/dist/admin/index-Dv5PVT1E.mjs +3867 -0
- package/dist/admin/index-k240ls6p.mjs +142 -0
- package/dist/admin/index.js +3 -3
- package/dist/admin/index.mjs +1 -2
- package/dist/admin/pt-CPkaveti.js +673 -0
- package/dist/admin/pt-DhlSCJn2.mjs +673 -0
- package/dist/admin/useUnsavedChangesGuard-BVZ4Mg4E.js +225 -0
- package/dist/admin/useUnsavedChangesGuard-QnkiZTLP.mjs +224 -0
- package/dist/server/i18n/de.json +32 -1
- package/dist/server/i18n/en.json +32 -1
- package/dist/server/i18n/es.json +32 -1
- package/dist/server/i18n/fr.json +32 -1
- package/dist/server/i18n/pt.json +32 -1
- package/dist/server/index.js +7092 -5971
- package/dist/server/index.mjs +7115 -5972
- package/package.json +42 -41
- package/strapi-admin.js +3 -1
- package/strapi-server.js +3 -2
- package/dist/_chunks/LicenseGuard-CiyjFnrw.js +0 -54
- package/dist/_chunks/LicenseGuard-DJ5fq2UZ.mjs +0 -55
- package/dist/_chunks/de-BSOk5suQ.js +0 -454
- package/dist/_chunks/de-CwhYs3O3.mjs +0 -454
- package/dist/_chunks/en-DnvSpXvu.js +0 -454
- package/dist/_chunks/en-gXXgGDV1.mjs +0 -454
- package/dist/_chunks/es-B-tnwByt.js +0 -407
- package/dist/_chunks/es-DG5gW3RZ.mjs +0 -407
- package/dist/_chunks/fr-BKo8t7Fx.js +0 -407
- package/dist/_chunks/fr-BQn1OHOR.mjs +0 -407
- package/dist/_chunks/index-01GHNxSr.js +0 -307
- package/dist/_chunks/index-5jsDgD-q.mjs +0 -330
- package/dist/_chunks/index-BWuj-5WE.js +0 -5068
- package/dist/_chunks/index-Bj3H_Z4B.js +0 -142
- package/dist/_chunks/index-CC4Eu9Dm.js +0 -332
- package/dist/_chunks/index-Csyi13vd.mjs +0 -2891
- package/dist/_chunks/index-DJqXiiP1.js +0 -2893
- package/dist/_chunks/index-DQUYFsLT.mjs +0 -143
- package/dist/_chunks/index-Dufv-daf.mjs +0 -305
- package/dist/_chunks/index-szeYJKpN.mjs +0 -5066
- package/dist/_chunks/pt-CjEkXBAz.js +0 -407
- package/dist/_chunks/pt-trziAOzT.mjs +0 -407
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Key } from "@strapi/icons";
|
|
4
|
-
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
5
|
-
const v = glob[path];
|
|
6
|
-
if (v) {
|
|
7
|
-
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
8
|
-
}
|
|
9
|
-
return new Promise((_, reject) => {
|
|
10
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
11
|
-
reject.bind(
|
|
12
|
-
null,
|
|
13
|
-
new Error(
|
|
14
|
-
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
15
|
-
)
|
|
16
|
-
)
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
const strapi = {
|
|
21
|
-
name: "magic-link"
|
|
22
|
-
};
|
|
23
|
-
const pluginPkg = {
|
|
24
|
-
strapi
|
|
25
|
-
};
|
|
26
|
-
const PLUGIN_ID = "magic-link";
|
|
27
|
-
const Initializer = ({ setPlugin }) => {
|
|
28
|
-
const ref = useRef(setPlugin);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
ref.current(PLUGIN_ID);
|
|
31
|
-
}, []);
|
|
32
|
-
return null;
|
|
33
|
-
};
|
|
34
|
-
const PluginIcon = () => /* @__PURE__ */ jsx(Key, {});
|
|
35
|
-
const pluginPermissions = {
|
|
36
|
-
access: [{ action: "plugin::magic-link.access", subject: null }],
|
|
37
|
-
readSettings: [{ action: "plugin::magic-link.settings.read", subject: null }]
|
|
38
|
-
};
|
|
39
|
-
const getTrad = (id) => {
|
|
40
|
-
if (id.startsWith(`${PLUGIN_ID}.`)) {
|
|
41
|
-
return id;
|
|
42
|
-
}
|
|
43
|
-
return `${PLUGIN_ID}.${id}`;
|
|
44
|
-
};
|
|
45
|
-
const name = pluginPkg.strapi.name;
|
|
46
|
-
const index = {
|
|
47
|
-
register(app) {
|
|
48
|
-
app.registerPlugin({
|
|
49
|
-
id: PLUGIN_ID,
|
|
50
|
-
initializer: Initializer,
|
|
51
|
-
isReady: false,
|
|
52
|
-
name
|
|
53
|
-
});
|
|
54
|
-
app.addMenuLink({
|
|
55
|
-
to: `plugins/${PLUGIN_ID}/tokens`,
|
|
56
|
-
icon: PluginIcon,
|
|
57
|
-
intlLabel: {
|
|
58
|
-
id: getTrad("tokens.title"),
|
|
59
|
-
defaultMessage: "Magic Link Tokens"
|
|
60
|
-
},
|
|
61
|
-
Component: () => import(
|
|
62
|
-
/* webpackChunkName: "magic-link-tokens" */
|
|
63
|
-
"./index-szeYJKpN.mjs"
|
|
64
|
-
),
|
|
65
|
-
permissions: pluginPermissions.access
|
|
66
|
-
});
|
|
67
|
-
app.createSettingSection(
|
|
68
|
-
{
|
|
69
|
-
id: PLUGIN_ID,
|
|
70
|
-
intlLabel: {
|
|
71
|
-
id: getTrad("Header.Settings"),
|
|
72
|
-
defaultMessage: "Magic Link"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
[
|
|
76
|
-
{
|
|
77
|
-
intlLabel: {
|
|
78
|
-
id: getTrad("Form.title.Settings"),
|
|
79
|
-
defaultMessage: "Settings"
|
|
80
|
-
},
|
|
81
|
-
id: "magic-link-settings",
|
|
82
|
-
to: `${PLUGIN_ID}/config`,
|
|
83
|
-
Component: () => import(
|
|
84
|
-
/* webpackChunkName: "magic-link-settings" */
|
|
85
|
-
"./index-Csyi13vd.mjs"
|
|
86
|
-
),
|
|
87
|
-
permissions: pluginPermissions.readSettings
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
intlLabel: {
|
|
91
|
-
id: getTrad("Form.title.License"),
|
|
92
|
-
defaultMessage: "License"
|
|
93
|
-
},
|
|
94
|
-
id: "magic-link-license",
|
|
95
|
-
to: `${PLUGIN_ID}/license`,
|
|
96
|
-
Component: () => import(
|
|
97
|
-
/* webpackChunkName: "magic-link-license" */
|
|
98
|
-
"./index-Dufv-daf.mjs"
|
|
99
|
-
),
|
|
100
|
-
permissions: pluginPermissions.access
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
intlLabel: {
|
|
104
|
-
id: getTrad("Form.title.WhatsApp"),
|
|
105
|
-
defaultMessage: "WhatsApp"
|
|
106
|
-
},
|
|
107
|
-
id: "magic-link-whatsapp",
|
|
108
|
-
to: `${PLUGIN_ID}/whatsapp`,
|
|
109
|
-
Component: () => import(
|
|
110
|
-
/* webpackChunkName: "magic-link-whatsapp" */
|
|
111
|
-
"./index-5jsDgD-q.mjs"
|
|
112
|
-
),
|
|
113
|
-
permissions: pluginPermissions.access
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
);
|
|
117
|
-
},
|
|
118
|
-
bootstrap() {
|
|
119
|
-
},
|
|
120
|
-
async registerTrads({ locales }) {
|
|
121
|
-
const importedTrads = await Promise.all(
|
|
122
|
-
locales.map((locale) => {
|
|
123
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-CwhYs3O3.mjs"), "./translations/en.json": () => import("./en-gXXgGDV1.mjs"), "./translations/es.json": () => import("./es-DG5gW3RZ.mjs"), "./translations/fr.json": () => import("./fr-BQn1OHOR.mjs"), "./translations/pt.json": () => import("./pt-trziAOzT.mjs") }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
|
|
124
|
-
return {
|
|
125
|
-
data,
|
|
126
|
-
locale
|
|
127
|
-
};
|
|
128
|
-
}).catch(() => {
|
|
129
|
-
return {
|
|
130
|
-
data: {},
|
|
131
|
-
locale
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
})
|
|
135
|
-
);
|
|
136
|
-
return Promise.resolve(importedTrads);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
export {
|
|
140
|
-
PLUGIN_ID as P,
|
|
141
|
-
getTrad as g,
|
|
142
|
-
index as i
|
|
143
|
-
};
|
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
|
-
import { Loader, Box, Alert, Flex, Typography, Button, Badge, Accordion } from "@strapi/design-system";
|
|
4
|
-
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
5
|
-
import { ArrowClockwise, Duplicate, Download, User, Shield, ChartBubble } from "@strapi/icons";
|
|
6
|
-
import styled, { keyframes } from "styled-components";
|
|
7
|
-
const theme = {
|
|
8
|
-
colors: {
|
|
9
|
-
neutral: { 200: "#E5E7EB" }
|
|
10
|
-
},
|
|
11
|
-
shadows: { sm: "0 1px 3px rgba(0,0,0,0.1)" },
|
|
12
|
-
borderRadius: { lg: "12px" }
|
|
13
|
-
};
|
|
14
|
-
const fadeIn = keyframes`
|
|
15
|
-
from { opacity: 0; transform: translateY(10px); }
|
|
16
|
-
to { opacity: 1; transform: translateY(0); }
|
|
17
|
-
`;
|
|
18
|
-
const shimmer = keyframes`
|
|
19
|
-
0% { background-position: -200% 0; }
|
|
20
|
-
100% { background-position: 200% 0; }
|
|
21
|
-
`;
|
|
22
|
-
const Container = styled(Box)`
|
|
23
|
-
animation: ${fadeIn} 0.5s;
|
|
24
|
-
max-width: 1400px;
|
|
25
|
-
margin: 0 auto;
|
|
26
|
-
`;
|
|
27
|
-
const StickySaveBar = styled(Box)`
|
|
28
|
-
position: sticky;
|
|
29
|
-
top: 0;
|
|
30
|
-
z-index: 10;
|
|
31
|
-
background: white;
|
|
32
|
-
border-bottom: 1px solid ${theme.colors.neutral[200]};
|
|
33
|
-
box-shadow: ${theme.shadows.sm};
|
|
34
|
-
`;
|
|
35
|
-
const LicenseKeyBanner = styled(Box)`
|
|
36
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
37
|
-
border-radius: ${theme.borderRadius.lg};
|
|
38
|
-
padding: 28px 32px;
|
|
39
|
-
color: white;
|
|
40
|
-
position: relative;
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
|
|
43
|
-
margin-bottom: 24px;
|
|
44
|
-
|
|
45
|
-
&::after {
|
|
46
|
-
content: '';
|
|
47
|
-
position: absolute;
|
|
48
|
-
top: -50%;
|
|
49
|
-
right: -50%;
|
|
50
|
-
width: 200%;
|
|
51
|
-
height: 200%;
|
|
52
|
-
background: linear-gradient(
|
|
53
|
-
45deg,
|
|
54
|
-
transparent,
|
|
55
|
-
rgba(255, 255, 255, 0.08),
|
|
56
|
-
transparent
|
|
57
|
-
);
|
|
58
|
-
animation: ${shimmer} 3s infinite;
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
z-index: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& > * {
|
|
64
|
-
position: relative;
|
|
65
|
-
z-index: 1;
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
|
-
styled(Flex)`
|
|
69
|
-
padding: 16px 0;
|
|
70
|
-
border-bottom: 1px solid ${theme.colors.neutral[200]};
|
|
71
|
-
|
|
72
|
-
&:last-child {
|
|
73
|
-
border-bottom: none;
|
|
74
|
-
}
|
|
75
|
-
`;
|
|
76
|
-
const LoaderContainer = styled(Flex)`
|
|
77
|
-
min-height: 400px;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
flex-direction: column;
|
|
81
|
-
gap: 16px;
|
|
82
|
-
`;
|
|
83
|
-
const LicensePage = () => {
|
|
84
|
-
const { get } = useFetchClient();
|
|
85
|
-
const { toggleNotification } = useNotification();
|
|
86
|
-
const [loading, setLoading] = useState(true);
|
|
87
|
-
const [licenseData, setLicenseData] = useState(null);
|
|
88
|
-
const [error, setError] = useState(null);
|
|
89
|
-
const fetchLicenseStatus = async () => {
|
|
90
|
-
setLoading(true);
|
|
91
|
-
setError(null);
|
|
92
|
-
try {
|
|
93
|
-
const response = await get("/magic-link/license/status");
|
|
94
|
-
setLicenseData(response.data);
|
|
95
|
-
} catch (err) {
|
|
96
|
-
console.error("Error fetching license:", err);
|
|
97
|
-
setError("Failed to load license information");
|
|
98
|
-
} finally {
|
|
99
|
-
setLoading(false);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const handleCopyLicenseKey = async () => {
|
|
103
|
-
try {
|
|
104
|
-
await navigator.clipboard.writeText(licenseData?.data?.licenseKey || "");
|
|
105
|
-
toggleNotification({
|
|
106
|
-
type: "success",
|
|
107
|
-
message: "License key copied to clipboard!",
|
|
108
|
-
title: "Copied"
|
|
109
|
-
});
|
|
110
|
-
} catch (err) {
|
|
111
|
-
toggleNotification({
|
|
112
|
-
type: "danger",
|
|
113
|
-
message: "Failed to copy license key",
|
|
114
|
-
title: "Error"
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const handleDownloadLicenseKey = () => {
|
|
119
|
-
try {
|
|
120
|
-
const data2 = licenseData?.data || {};
|
|
121
|
-
const licenseKey = data2.licenseKey || "";
|
|
122
|
-
const email = data2.email || "N/A";
|
|
123
|
-
const firstName = data2.firstName || "";
|
|
124
|
-
const lastName = data2.lastName || "";
|
|
125
|
-
const fullName = `${firstName} ${lastName}`.trim() || "N/A";
|
|
126
|
-
const content = `Magic Link Plugin License Key
|
|
127
|
-
═══════════════════════════════════════
|
|
128
|
-
|
|
129
|
-
License Key: ${licenseKey}
|
|
130
|
-
|
|
131
|
-
License Holder Information:
|
|
132
|
-
──────────────────────────────────────
|
|
133
|
-
Name: ${fullName}
|
|
134
|
-
Email: ${email}
|
|
135
|
-
|
|
136
|
-
License Status:
|
|
137
|
-
──────────────────────────────────────
|
|
138
|
-
Status: ${data2.isActive ? "ACTIVE" : "INACTIVE"}
|
|
139
|
-
Expires: ${data2.expiresAt ? new Date(data2.expiresAt).toLocaleDateString() : "Never"}
|
|
140
|
-
|
|
141
|
-
═══════════════════════════════════════
|
|
142
|
-
Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
|
|
143
|
-
`;
|
|
144
|
-
const blob = new Blob([content], { type: "text/plain" });
|
|
145
|
-
const url = window.URL.createObjectURL(blob);
|
|
146
|
-
const link = document.createElement("a");
|
|
147
|
-
link.href = url;
|
|
148
|
-
link.download = `magic-link-license-${licenseKey.substring(0, 8)}.txt`;
|
|
149
|
-
document.body.appendChild(link);
|
|
150
|
-
link.click();
|
|
151
|
-
document.body.removeChild(link);
|
|
152
|
-
window.URL.revokeObjectURL(url);
|
|
153
|
-
toggleNotification({
|
|
154
|
-
type: "success",
|
|
155
|
-
message: "License key downloaded successfully!",
|
|
156
|
-
title: "Downloaded"
|
|
157
|
-
});
|
|
158
|
-
} catch (err) {
|
|
159
|
-
toggleNotification({
|
|
160
|
-
type: "danger",
|
|
161
|
-
message: "Failed to download license key",
|
|
162
|
-
title: "Error"
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
useEffect(() => {
|
|
167
|
-
fetchLicenseStatus();
|
|
168
|
-
}, []);
|
|
169
|
-
if (loading) {
|
|
170
|
-
return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(LoaderContainer, { children: /* @__PURE__ */ jsx(Loader, { children: "Loading license information..." }) }) });
|
|
171
|
-
}
|
|
172
|
-
if (error) {
|
|
173
|
-
return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Box, { padding: 8, children: /* @__PURE__ */ jsx(Alert, { variant: "danger", title: "Error", children: error }) }) });
|
|
174
|
-
}
|
|
175
|
-
const isValid = licenseData?.valid !== false;
|
|
176
|
-
const hasKey = !!licenseData?.hasKey;
|
|
177
|
-
const data = licenseData?.data || {};
|
|
178
|
-
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
179
|
-
/* @__PURE__ */ jsx(StickySaveBar, { paddingTop: 5, paddingBottom: 5, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [
|
|
180
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 1, children: [
|
|
181
|
-
/* @__PURE__ */ jsx(Typography, { variant: "alpha", fontWeight: "bold", children: "License Management" }),
|
|
182
|
-
/* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", children: "View your Magic Link plugin license" })
|
|
183
|
-
] }),
|
|
184
|
-
/* @__PURE__ */ jsx(
|
|
185
|
-
Button,
|
|
186
|
-
{
|
|
187
|
-
startIcon: /* @__PURE__ */ jsx(ArrowClockwise, {}),
|
|
188
|
-
onClick: fetchLicenseStatus,
|
|
189
|
-
size: "L",
|
|
190
|
-
style: {
|
|
191
|
-
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
192
|
-
color: "white",
|
|
193
|
-
fontWeight: "600",
|
|
194
|
-
border: "none"
|
|
195
|
-
},
|
|
196
|
-
children: "Refresh Status"
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
] }) }),
|
|
200
|
-
/* @__PURE__ */ jsxs(Box, { paddingTop: 6, paddingLeft: 6, paddingRight: 6, paddingBottom: 10, children: [
|
|
201
|
-
hasKey && isValid ? /* @__PURE__ */ jsx(Alert, { variant: "success", title: "License Active", children: "License key registered. Thanks for supporting the plugin!" }) : hasKey && !isValid ? /* @__PURE__ */ jsx(Alert, { variant: "warning", title: "License Verification", children: "We couldn't reach the license server right now. The plugin keeps working — try Refresh Status later." }) : /* @__PURE__ */ jsx(Alert, { variant: "default", title: "No license key registered", children: 'All Magic Link features are available without activation. If you want to register a license key, use the form below or run "Auto-Activate" to generate one for your admin email.' }),
|
|
202
|
-
data.licenseKey && /* @__PURE__ */ jsx(Box, { marginTop: 6, children: /* @__PURE__ */ jsx(LicenseKeyBanner, { children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
203
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: 1 }, children: [
|
|
204
|
-
/* @__PURE__ */ jsx(Typography, { variant: "pi", style: { color: "rgba(255,255,255,0.8)", marginBottom: "12px", textTransform: "uppercase", fontSize: "11px", letterSpacing: "0.5px", display: "block" }, children: "License Key" }),
|
|
205
|
-
/* @__PURE__ */ jsx(Typography, { style: { color: "white", fontFamily: "monospace", fontSize: "28px", fontWeight: "bold", wordBreak: "break-all", marginBottom: "16px" }, children: data.licenseKey }),
|
|
206
|
-
/* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
|
|
207
|
-
/* @__PURE__ */ jsx(
|
|
208
|
-
Button,
|
|
209
|
-
{
|
|
210
|
-
onClick: handleCopyLicenseKey,
|
|
211
|
-
startIcon: /* @__PURE__ */ jsx(Duplicate, {}),
|
|
212
|
-
size: "S",
|
|
213
|
-
variant: "secondary",
|
|
214
|
-
style: {
|
|
215
|
-
backgroundColor: "rgba(255,255,255,0.2)",
|
|
216
|
-
color: "white",
|
|
217
|
-
border: "1px solid rgba(255,255,255,0.3)",
|
|
218
|
-
fontWeight: "600"
|
|
219
|
-
},
|
|
220
|
-
children: "Copy Key"
|
|
221
|
-
}
|
|
222
|
-
),
|
|
223
|
-
/* @__PURE__ */ jsx(
|
|
224
|
-
Button,
|
|
225
|
-
{
|
|
226
|
-
onClick: handleDownloadLicenseKey,
|
|
227
|
-
startIcon: /* @__PURE__ */ jsx(Download, {}),
|
|
228
|
-
size: "S",
|
|
229
|
-
variant: "secondary",
|
|
230
|
-
style: {
|
|
231
|
-
backgroundColor: "rgba(255,255,255,0.2)",
|
|
232
|
-
color: "white",
|
|
233
|
-
border: "1px solid rgba(255,255,255,0.3)",
|
|
234
|
-
fontWeight: "600"
|
|
235
|
-
},
|
|
236
|
-
children: "Download as TXT"
|
|
237
|
-
}
|
|
238
|
-
)
|
|
239
|
-
] })
|
|
240
|
-
] }),
|
|
241
|
-
/* @__PURE__ */ jsx(
|
|
242
|
-
Badge,
|
|
243
|
-
{
|
|
244
|
-
backgroundColor: data.isActive ? "success100" : "danger100",
|
|
245
|
-
textColor: data.isActive ? "success700" : "danger700",
|
|
246
|
-
style: { fontSize: "11px", fontWeight: "700", padding: "6px 12px", marginLeft: "16px", flexShrink: 0 },
|
|
247
|
-
children: data.isActive ? "ACTIVE" : "INACTIVE"
|
|
248
|
-
}
|
|
249
|
-
)
|
|
250
|
-
] }) }) }),
|
|
251
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 6, children: /* @__PURE__ */ jsxs(Accordion.Root, { defaultValue: ["account", "details", "features", "status"], children: [
|
|
252
|
-
/* @__PURE__ */ jsxs(Accordion.Item, { value: "account", children: [
|
|
253
|
-
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: User, children: "Account Information" }) }),
|
|
254
|
-
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(Flex, { gap: 8, wrap: "wrap", children: [
|
|
255
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "200px" }, children: [
|
|
256
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: "Email Address" }),
|
|
257
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.email || "Not provided" })
|
|
258
|
-
] }),
|
|
259
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "200px" }, children: [
|
|
260
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: "License Holder" }),
|
|
261
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.firstName && data.lastName ? `${data.firstName} ${data.lastName}` : "Not specified" })
|
|
262
|
-
] })
|
|
263
|
-
] }) }) })
|
|
264
|
-
] }),
|
|
265
|
-
/* @__PURE__ */ jsxs(Accordion.Item, { value: "details", children: [
|
|
266
|
-
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: Shield, children: "License Details" }) }),
|
|
267
|
-
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(Flex, { gap: 8, wrap: "wrap", children: [
|
|
268
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "180px" }, children: [
|
|
269
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: data.isExpired ? "Expired On" : "Expires On" }),
|
|
270
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.expiresAt ? new Date(data.expiresAt).toLocaleDateString("en-US", {
|
|
271
|
-
year: "numeric",
|
|
272
|
-
month: "long",
|
|
273
|
-
day: "numeric"
|
|
274
|
-
}) : "Never" })
|
|
275
|
-
] }),
|
|
276
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "180px" }, children: [
|
|
277
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: "Device Name" }),
|
|
278
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.deviceName || "Unknown" })
|
|
279
|
-
] }),
|
|
280
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "180px" }, children: [
|
|
281
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: "IP Address" }),
|
|
282
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: data.ipAddress || "Not detected" })
|
|
283
|
-
] })
|
|
284
|
-
] }) }) })
|
|
285
|
-
] }),
|
|
286
|
-
/* @__PURE__ */ jsxs(Accordion.Item, { value: "status", children: [
|
|
287
|
-
/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { icon: ChartBubble, children: "System Status" }) }),
|
|
288
|
-
/* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(Box, { padding: 6, children: /* @__PURE__ */ jsxs(Flex, { gap: 8, wrap: "wrap", children: [
|
|
289
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "150px" }, children: [
|
|
290
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: "License Status" }),
|
|
291
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: hasKey ? data.isActive ? "Active" : "Inactive" : "No key registered" })
|
|
292
|
-
] }),
|
|
293
|
-
/* @__PURE__ */ jsxs(Box, { style: { flex: "1", minWidth: "150px" }, children: [
|
|
294
|
-
/* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: "Plugin Mode" }),
|
|
295
|
-
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", children: "Fully unlocked" })
|
|
296
|
-
] })
|
|
297
|
-
] }) }) })
|
|
298
|
-
] })
|
|
299
|
-
] }) })
|
|
300
|
-
] })
|
|
301
|
-
] });
|
|
302
|
-
};
|
|
303
|
-
export {
|
|
304
|
-
LicensePage as default
|
|
305
|
-
};
|