strapi-plugin-magic-sessionmanager 4.0.1 → 4.0.2
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 +2 -2
- package/admin/src/components/OnlineUsersWidget.jsx +11 -7
- package/admin/src/components/SessionDetailModal.jsx +42 -38
- package/admin/src/components/SessionInfoPanel.jsx +29 -20
- package/admin/src/index.js +9 -0
- package/admin/src/pages/HomePage.jsx +128 -161
- package/admin/src/pages/License.jsx +3 -3
- package/admin/src/pages/Settings.jsx +139 -135
- package/admin/src/pages/UpgradePage.jsx +448 -0
- package/admin/src/pluginId.js +1 -0
- package/admin/src/translations/de.json +294 -15
- package/admin/src/translations/en.json +293 -14
- package/admin/src/translations/es.json +284 -18
- package/admin/src/translations/fr.json +284 -18
- package/admin/src/translations/pt.json +284 -18
- package/admin/src/utils/theme.js +85 -0
- package/dist/_chunks/{Analytics-Dv9f_0eZ.mjs → Analytics-DTE_zmRV.mjs} +2 -2
- package/dist/_chunks/{Analytics-BBdv1I5y.js → Analytics-lw_JaOVy.js} +2 -2
- package/dist/_chunks/{App-CJaZPNjt.js → App-DDKYCjKw.js} +216 -206
- package/dist/_chunks/{App-CIQ-7sa7.mjs → App-DJW1ZNl5.mjs} +216 -206
- package/dist/_chunks/{License-nrmFxoBm.mjs → License-DaOFuImm.mjs} +4 -8
- package/dist/_chunks/{License-D24rgaZQ.js → License-Tk-6UfPl.js} +4 -8
- package/dist/_chunks/{OnlineUsersWidget-B8JS1xZu.js → OnlineUsersWidget-C1qTpsws.js} +11 -7
- package/dist/_chunks/{OnlineUsersWidget-ArMl0nen.mjs → OnlineUsersWidget-CADphbXG.mjs} +11 -7
- package/dist/_chunks/{Settings-D5dLEGc_.mjs → Settings-C9xvckgq.mjs} +191 -179
- package/dist/_chunks/{Settings-CqxgjU0y.js → Settings-DyEAuTNQ.js} +191 -179
- package/dist/_chunks/UpgradePage-Dssk8A0Z.js +354 -0
- package/dist/_chunks/UpgradePage-cINvE9zY.mjs +352 -0
- package/dist/_chunks/de-CDA1V0rF.mjs +292 -0
- package/dist/_chunks/de-I-Q-pWqu.js +292 -0
- package/dist/_chunks/en-Bd7_h-4e.js +292 -0
- package/dist/_chunks/en-DzmOCyzQ.mjs +292 -0
- package/dist/_chunks/es-BcAx18XG.js +277 -0
- package/dist/_chunks/es-Cx-SN6qV.mjs +277 -0
- package/dist/_chunks/fr-DCzYMuJ-.js +277 -0
- package/dist/_chunks/fr-DXlXE5Eo.mjs +277 -0
- package/dist/_chunks/{index-WH04CS1c.js → index-CWcvrfXc.js} +45 -42
- package/dist/_chunks/{index-Duk1_Wrz.mjs → index-DQO9bNP7.mjs} +45 -42
- package/dist/_chunks/pt-21-MAb72.js +277 -0
- package/dist/_chunks/pt-zsdTSjba.mjs +277 -0
- package/dist/_chunks/{useLicense-BwOlCyhc.js → useLicense-DtvJOszr.js} +1 -1
- package/dist/_chunks/{useLicense-Ce8GaxB0.mjs → useLicense-DxbD4Wf8.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/_chunks/de-BxFx1pwE.js +0 -23
- package/dist/_chunks/de-CdO3s01z.mjs +0 -23
- package/dist/_chunks/en-CsPpPJL3.mjs +0 -23
- package/dist/_chunks/en-RqmpDHdS.js +0 -23
- package/dist/_chunks/es-CuLHazN1.js +0 -23
- package/dist/_chunks/es-Dkmjhy9c.mjs +0 -23
- package/dist/_chunks/fr-BAJp2yhI.js +0 -23
- package/dist/_chunks/fr-Bssg_3UF.mjs +0 -23
- package/dist/_chunks/pt-BAP9cKs3.js +0 -23
- package/dist/_chunks/pt-BVNoNcuY.mjs +0 -23
|
@@ -2,15 +2,70 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
|
+
const reactIntl = require("react-intl");
|
|
5
6
|
const admin = require("@strapi/strapi/admin");
|
|
6
7
|
const styled = require("styled-components");
|
|
8
|
+
const index = require("./index-CWcvrfXc.js");
|
|
7
9
|
const designSystem = require("@strapi/design-system");
|
|
8
10
|
const icons = require("@strapi/icons");
|
|
9
|
-
const
|
|
10
|
-
const useLicense = require("./useLicense-BwOlCyhc.js");
|
|
11
|
+
const useLicense = require("./useLicense-DtvJOszr.js");
|
|
11
12
|
const reactRouterDom = require("react-router-dom");
|
|
12
13
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
14
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
15
|
+
const theme = {
|
|
16
|
+
colors: {
|
|
17
|
+
primary: {
|
|
18
|
+
50: "#F0F9FF",
|
|
19
|
+
100: "#E0F2FE",
|
|
20
|
+
600: "#0284C7"
|
|
21
|
+
},
|
|
22
|
+
secondary: {
|
|
23
|
+
50: "#FAF5FF",
|
|
24
|
+
100: "#F3E8FF",
|
|
25
|
+
600: "#9333EA"
|
|
26
|
+
},
|
|
27
|
+
success: {
|
|
28
|
+
50: "#F0FDF4",
|
|
29
|
+
100: "#DCFCE7",
|
|
30
|
+
500: "#22C55E",
|
|
31
|
+
600: "#16A34A"
|
|
32
|
+
},
|
|
33
|
+
warning: {
|
|
34
|
+
50: "#FFFBEB",
|
|
35
|
+
100: "#FEF3C7",
|
|
36
|
+
500: "#F59E0B",
|
|
37
|
+
600: "#D97706"
|
|
38
|
+
},
|
|
39
|
+
danger: {
|
|
40
|
+
50: "#FEF2F2",
|
|
41
|
+
100: "#FEE2E2",
|
|
42
|
+
500: "#EF4444",
|
|
43
|
+
600: "#DC2626"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
shadows: {
|
|
47
|
+
sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)",
|
|
48
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"
|
|
49
|
+
},
|
|
50
|
+
transitions: {
|
|
51
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
52
|
+
normal: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
53
|
+
slow: "500ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
54
|
+
},
|
|
55
|
+
spacing: {
|
|
56
|
+
xs: "4px",
|
|
57
|
+
sm: "8px",
|
|
58
|
+
md: "16px",
|
|
59
|
+
lg: "24px",
|
|
60
|
+
xl: "32px",
|
|
61
|
+
"2xl": "48px"
|
|
62
|
+
},
|
|
63
|
+
borderRadius: {
|
|
64
|
+
md: "8px",
|
|
65
|
+
lg: "12px",
|
|
66
|
+
xl: "16px"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
14
69
|
const TwoColumnGrid = styled__default.default.div`
|
|
15
70
|
display: grid;
|
|
16
71
|
grid-template-columns: 1fr 1fr;
|
|
@@ -35,6 +90,7 @@ const Section = styled__default.default(designSystem.Box)`
|
|
|
35
90
|
margin-bottom: 24px;
|
|
36
91
|
`;
|
|
37
92
|
const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
93
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
38
94
|
const { get, post } = admin.useFetchClient();
|
|
39
95
|
const { toggleNotification } = admin.useNotification();
|
|
40
96
|
const { isPremium } = useLicense.useLicense();
|
|
@@ -42,6 +98,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
42
98
|
const [showUserAgent, setShowUserAgent] = react.useState(false);
|
|
43
99
|
const [geoData, setGeoData] = react.useState(null);
|
|
44
100
|
const [geoLoading, setGeoLoading] = react.useState(false);
|
|
101
|
+
const t = (id, defaultMessage, values) => formatMessage({ id: index.getTranslation(id), defaultMessage }, values);
|
|
45
102
|
if (!session) return null;
|
|
46
103
|
const deviceInfo = index.parseUserAgent(session.userAgent);
|
|
47
104
|
const isOnline = session.isTrulyActive;
|
|
@@ -88,7 +145,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
88
145
|
};
|
|
89
146
|
const DeviceIcon = getDeviceIcon(deviceInfo.device);
|
|
90
147
|
const handleTerminate = async () => {
|
|
91
|
-
if (!confirm("Are you sure you want to terminate this session?")) {
|
|
148
|
+
if (!confirm(t("modal.confirm.terminate", "Are you sure you want to terminate this session?"))) {
|
|
92
149
|
return;
|
|
93
150
|
}
|
|
94
151
|
setTerminating(true);
|
|
@@ -96,7 +153,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
96
153
|
await post(`/${index.pluginId}/sessions/${session.id}/terminate`);
|
|
97
154
|
toggleNotification({
|
|
98
155
|
type: "success",
|
|
99
|
-
message: "Session terminated successfully"
|
|
156
|
+
message: t("notifications.success.terminated", "Session terminated successfully")
|
|
100
157
|
});
|
|
101
158
|
onSessionTerminated();
|
|
102
159
|
onClose();
|
|
@@ -104,7 +161,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
104
161
|
console.error("[SessionDetailModal] Error:", err);
|
|
105
162
|
toggleNotification({
|
|
106
163
|
type: "danger",
|
|
107
|
-
message: "Failed to terminate session"
|
|
164
|
+
message: t("notifications.error.terminate", "Failed to terminate session")
|
|
108
165
|
});
|
|
109
166
|
} finally {
|
|
110
167
|
setTerminating(false);
|
|
@@ -138,11 +195,8 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
138
195
|
justifyContent: "center"
|
|
139
196
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(DeviceIcon, { width: "24px", height: "24px" }) }),
|
|
140
197
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", children: [
|
|
141
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", fontWeight: "bold", children: "Session Details" }),
|
|
142
|
-
/* @__PURE__ */ jsxRuntime.
|
|
143
|
-
"ID: ",
|
|
144
|
-
session.id
|
|
145
|
-
] })
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", fontWeight: "bold", children: t("modal.title", "Session Details") }),
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: t("modal.id", "ID: {id}", { id: session.id }) })
|
|
146
200
|
] })
|
|
147
201
|
] }) }),
|
|
148
202
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 6, children: [
|
|
@@ -153,34 +207,34 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
153
207
|
textColor: "neutral0",
|
|
154
208
|
size: "M",
|
|
155
209
|
style: { fontSize: "14px", padding: "8px 20px", fontWeight: "600" },
|
|
156
|
-
children: isOnline ? "ONLINE" : "OFFLINE"
|
|
210
|
+
children: isOnline ? t("modal.status.online", "ONLINE") : t("modal.status.offline", "OFFLINE")
|
|
157
211
|
}
|
|
158
212
|
) }),
|
|
159
213
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, { style: { marginBottom: "24px" } }),
|
|
160
214
|
/* @__PURE__ */ jsxRuntime.jsxs(TwoColumnGrid, { children: [
|
|
161
215
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
162
216
|
/* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
|
|
163
|
-
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "User" }),
|
|
164
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Check, label: "Username", value: session.user?.username || "N/A" }),
|
|
165
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: "Email", value: session.user?.email || "N/A" }),
|
|
166
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: "User ID", value: session.user?.id || "N/A" })
|
|
217
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: t("modal.section.user", "User") }),
|
|
218
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Check, label: t("modal.user.username", "Username"), value: session.user?.username || t("modal.user.na", "N/A") }),
|
|
219
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: t("modal.user.email", "Email"), value: session.user?.email || t("modal.user.na", "N/A") }),
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: t("modal.user.id", "User ID"), value: session.user?.id || t("modal.user.na", "N/A") })
|
|
167
221
|
] }),
|
|
168
222
|
/* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
|
|
169
|
-
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "Device" }),
|
|
170
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: DeviceIcon, label: "Device", value: deviceInfo.device }),
|
|
171
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Monitor, label: "Browser", value: `${deviceInfo.browser} ${deviceInfo.browserVersion || ""}` }),
|
|
172
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Server, label: "OS", value: deviceInfo.os }),
|
|
173
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: "IP", value: session.ipAddress })
|
|
223
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: t("modal.section.device", "Device") }),
|
|
224
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: DeviceIcon, label: t("modal.device.device", "Device"), value: deviceInfo.device }),
|
|
225
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Monitor, label: t("modal.device.browser", "Browser"), value: `${deviceInfo.browser} ${deviceInfo.browserVersion || ""}` }),
|
|
226
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Server, label: t("modal.device.os", "OS"), value: deviceInfo.os }),
|
|
227
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Information, label: t("modal.device.ip", "IP"), value: session.ipAddress })
|
|
174
228
|
] })
|
|
175
229
|
] }),
|
|
176
230
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
|
|
177
|
-
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "Timeline" }),
|
|
231
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: t("modal.section.timeline", "Timeline") }),
|
|
178
232
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
179
233
|
DetailRow,
|
|
180
234
|
{
|
|
181
235
|
compact: true,
|
|
182
236
|
icon: icons.Clock,
|
|
183
|
-
label: "Login",
|
|
237
|
+
label: t("modal.timeline.login", "Login"),
|
|
184
238
|
value: new Date(session.loginTime).toLocaleString("de-DE", {
|
|
185
239
|
day: "2-digit",
|
|
186
240
|
month: "short",
|
|
@@ -194,7 +248,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
194
248
|
{
|
|
195
249
|
compact: true,
|
|
196
250
|
icon: icons.Clock,
|
|
197
|
-
label: "Last Active",
|
|
251
|
+
label: t("modal.timeline.lastActive", "Last Active"),
|
|
198
252
|
value: new Date(session.lastActive || session.loginTime).toLocaleString("de-DE", {
|
|
199
253
|
day: "2-digit",
|
|
200
254
|
month: "short",
|
|
@@ -208,8 +262,8 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
208
262
|
{
|
|
209
263
|
compact: true,
|
|
210
264
|
icon: icons.Clock,
|
|
211
|
-
label: "Idle Time",
|
|
212
|
-
value:
|
|
265
|
+
label: t("modal.timeline.idleTime", "Idle Time"),
|
|
266
|
+
value: t("modal.timeline.minutes", "{minutes} min", { minutes: session.minutesSinceActive })
|
|
213
267
|
}
|
|
214
268
|
),
|
|
215
269
|
session.logoutTime && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -217,7 +271,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
217
271
|
{
|
|
218
272
|
compact: true,
|
|
219
273
|
icon: icons.Cross,
|
|
220
|
-
label: "Logout",
|
|
274
|
+
label: t("modal.timeline.logout", "Logout"),
|
|
221
275
|
value: new Date(session.logoutTime).toLocaleString("de-DE", {
|
|
222
276
|
day: "2-digit",
|
|
223
277
|
month: "short",
|
|
@@ -229,20 +283,20 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
229
283
|
] }) })
|
|
230
284
|
] }),
|
|
231
285
|
isPremium ? /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
|
|
232
|
-
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: "Location and Security" }),
|
|
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: [
|
|
286
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: t("modal.section.security", "Location and Security") }),
|
|
287
|
+
geoLoading ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 4, style: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: t("modal.security.loading", "Loading location data...") }) }) : /* @__PURE__ */ jsxRuntime.jsxs(TwoColumnGrid, { children: [
|
|
234
288
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
235
289
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
236
290
|
DetailRow,
|
|
237
291
|
{
|
|
238
292
|
compact: true,
|
|
239
293
|
icon: icons.Earth,
|
|
240
|
-
label: "Country",
|
|
294
|
+
label: t("modal.security.country", "Country"),
|
|
241
295
|
value: `${premiumData.country_flag || ""} ${premiumData.country}`.trim()
|
|
242
296
|
}
|
|
243
297
|
),
|
|
244
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Earth, label: "City", value: premiumData.city }),
|
|
245
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Clock, label: "Timezone", value: premiumData.timezone })
|
|
298
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Earth, label: t("modal.security.city", "City"), value: premiumData.city }),
|
|
299
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { compact: true, icon: icons.Clock, label: t("modal.security.timezone", "Timezone"), value: premiumData.timezone })
|
|
246
300
|
] }),
|
|
247
301
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
248
302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -250,7 +304,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
250
304
|
{
|
|
251
305
|
compact: true,
|
|
252
306
|
icon: icons.Shield,
|
|
253
|
-
label: "Security",
|
|
307
|
+
label: t("modal.security.score", "Security"),
|
|
254
308
|
value: `${premiumData.securityScore}/100 (${premiumData.riskLevel})`
|
|
255
309
|
}
|
|
256
310
|
),
|
|
@@ -259,8 +313,8 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
259
313
|
{
|
|
260
314
|
compact: true,
|
|
261
315
|
icon: icons.Shield,
|
|
262
|
-
label: "VPN",
|
|
263
|
-
value: premiumData.isVpn ? "[WARNING] Yes" : "No"
|
|
316
|
+
label: t("modal.security.vpn", "VPN"),
|
|
317
|
+
value: premiumData.isVpn ? t("modal.security.vpnWarning", "[WARNING] Yes") : t("modal.security.no", "No")
|
|
264
318
|
}
|
|
265
319
|
),
|
|
266
320
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -268,8 +322,8 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
268
322
|
{
|
|
269
323
|
compact: true,
|
|
270
324
|
icon: icons.Shield,
|
|
271
|
-
label: "Proxy",
|
|
272
|
-
value: premiumData.isProxy ? "[WARNING] Yes" : "No"
|
|
325
|
+
label: t("modal.security.proxy", "Proxy"),
|
|
326
|
+
value: premiumData.isProxy ? t("modal.security.vpnWarning", "[WARNING] Yes") : t("modal.security.no", "No")
|
|
273
327
|
}
|
|
274
328
|
)
|
|
275
329
|
] })
|
|
@@ -286,8 +340,8 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
286
340
|
},
|
|
287
341
|
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 3, children: [
|
|
288
342
|
/* @__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 and Security Analysis" }),
|
|
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" }),
|
|
343
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", style: { color: "#92400e", fontWeight: "700" }, children: t("modal.premium.title", "Location and Security Analysis") }),
|
|
344
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", style: { color: "#78350f", fontSize: "14px", lineHeight: "1.6" }, children: t("modal.premium.description", "Unlock premium features to get IP geolocation, security scoring, and VPN/Proxy detection for every session") }),
|
|
291
345
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
292
346
|
designSystem.Button,
|
|
293
347
|
{
|
|
@@ -302,7 +356,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
302
356
|
marginTop: "8px",
|
|
303
357
|
boxShadow: "0 4px 12px rgba(245, 158, 11, 0.3)"
|
|
304
358
|
},
|
|
305
|
-
children: "Upgrade to Premium"
|
|
359
|
+
children: t("modal.premium.upgrade", "Upgrade to Premium")
|
|
306
360
|
}
|
|
307
361
|
)
|
|
308
362
|
] })
|
|
@@ -310,7 +364,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
310
364
|
) }),
|
|
311
365
|
/* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
|
|
312
366
|
/* @__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" }),
|
|
367
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { style: { marginBottom: 0, paddingBottom: 0, border: "none" }, children: t("modal.section.technical", "Technical Details") }),
|
|
314
368
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
315
369
|
designSystem.Button,
|
|
316
370
|
{
|
|
@@ -318,7 +372,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
318
372
|
size: "S",
|
|
319
373
|
onClick: () => setShowUserAgent(!showUserAgent),
|
|
320
374
|
style: { fontSize: "12px" },
|
|
321
|
-
children: showUserAgent ? "
|
|
375
|
+
children: showUserAgent ? `▲ ${t("modal.technical.hide", "Hide Details")}` : `▼ ${t("modal.technical.show", "Show Details")}`
|
|
322
376
|
}
|
|
323
377
|
)
|
|
324
378
|
] }),
|
|
@@ -343,7 +397,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
343
397
|
] })
|
|
344
398
|
] }) }),
|
|
345
399
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", style: { width: "100%" }, children: [
|
|
346
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onClose, variant: "tertiary", children: "Close" }),
|
|
400
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { onClick: onClose, variant: "tertiary", children: t("modal.actions.close", "Close") }),
|
|
347
401
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
348
402
|
designSystem.Button,
|
|
349
403
|
{
|
|
@@ -352,72 +406,12 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
|
|
|
352
406
|
disabled: !session.isActive || terminating,
|
|
353
407
|
loading: terminating,
|
|
354
408
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
|
|
355
|
-
children: "Terminate Session"
|
|
409
|
+
children: t("modal.actions.terminate", "Terminate Session")
|
|
356
410
|
}
|
|
357
411
|
)
|
|
358
412
|
] }) })
|
|
359
413
|
] }) });
|
|
360
414
|
};
|
|
361
|
-
const theme = {
|
|
362
|
-
colors: {
|
|
363
|
-
primary: {
|
|
364
|
-
50: "#F0F9FF",
|
|
365
|
-
100: "#E0F2FE",
|
|
366
|
-
500: "#0EA5E9",
|
|
367
|
-
600: "#0284C7"
|
|
368
|
-
},
|
|
369
|
-
secondary: {
|
|
370
|
-
500: "#A855F7",
|
|
371
|
-
600: "#9333EA"
|
|
372
|
-
},
|
|
373
|
-
success: {
|
|
374
|
-
100: "#DCFCE7",
|
|
375
|
-
500: "#22C55E",
|
|
376
|
-
600: "#16A34A"
|
|
377
|
-
},
|
|
378
|
-
warning: {
|
|
379
|
-
100: "#FEF3C7",
|
|
380
|
-
500: "#F59E0B",
|
|
381
|
-
600: "#D97706"
|
|
382
|
-
},
|
|
383
|
-
danger: {
|
|
384
|
-
100: "#FEE2E2",
|
|
385
|
-
500: "#EF4444",
|
|
386
|
-
600: "#DC2626"
|
|
387
|
-
},
|
|
388
|
-
neutral: {
|
|
389
|
-
0: "#FFFFFF",
|
|
390
|
-
50: "#F9FAFB",
|
|
391
|
-
100: "#F3F4F6",
|
|
392
|
-
200: "#E5E7EB",
|
|
393
|
-
600: "#4B5563",
|
|
394
|
-
700: "#374151",
|
|
395
|
-
800: "#1F2937"
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
shadows: {
|
|
399
|
-
sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)",
|
|
400
|
-
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"
|
|
401
|
-
},
|
|
402
|
-
transitions: {
|
|
403
|
-
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
404
|
-
normal: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
405
|
-
slow: "500ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
406
|
-
},
|
|
407
|
-
spacing: {
|
|
408
|
-
xs: "4px",
|
|
409
|
-
sm: "8px",
|
|
410
|
-
md: "16px",
|
|
411
|
-
lg: "24px",
|
|
412
|
-
xl: "32px",
|
|
413
|
-
"2xl": "48px"
|
|
414
|
-
},
|
|
415
|
-
borderRadius: {
|
|
416
|
-
md: "8px",
|
|
417
|
-
lg: "12px",
|
|
418
|
-
xl: "16px"
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
415
|
const fadeIn$1 = styled.keyframes`
|
|
422
416
|
from { opacity: 0; transform: translateY(10px); }
|
|
423
417
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -506,7 +500,7 @@ const HeaderContent = styled__default.default(designSystem.Flex)`
|
|
|
506
500
|
z-index: 1;
|
|
507
501
|
`;
|
|
508
502
|
const Title = styled__default.default(designSystem.Typography)`
|
|
509
|
-
color:
|
|
503
|
+
color: white;
|
|
510
504
|
font-size: 2rem;
|
|
511
505
|
font-weight: 700;
|
|
512
506
|
letter-spacing: -0.025em;
|
|
@@ -558,7 +552,7 @@ const StatsGrid = styled__default.default.div`
|
|
|
558
552
|
}
|
|
559
553
|
`;
|
|
560
554
|
const StatCard = styled__default.default(designSystem.Box)`
|
|
561
|
-
background: ${theme.colors.
|
|
555
|
+
background: ${(props) => props.theme.colors.neutral0};
|
|
562
556
|
border-radius: ${theme.borderRadius.lg};
|
|
563
557
|
padding: 28px ${theme.spacing.lg};
|
|
564
558
|
position: relative;
|
|
@@ -567,7 +561,7 @@ const StatCard = styled__default.default(designSystem.Box)`
|
|
|
567
561
|
${styled.css`animation: ${fadeIn$1} ${theme.transitions.slow} backwards;`}
|
|
568
562
|
animation-delay: ${(props) => props.$delay || "0s"};
|
|
569
563
|
box-shadow: ${theme.shadows.sm};
|
|
570
|
-
border: 1px solid ${theme.colors.
|
|
564
|
+
border: 1px solid ${(props) => props.theme.colors.neutral200};
|
|
571
565
|
min-width: 200px;
|
|
572
566
|
flex: 1;
|
|
573
567
|
text-align: center;
|
|
@@ -588,7 +582,7 @@ const StatCard = styled__default.default(designSystem.Box)`
|
|
|
588
582
|
&:hover {
|
|
589
583
|
transform: translateY(-6px);
|
|
590
584
|
box-shadow: ${theme.shadows.xl};
|
|
591
|
-
border-color: ${(props) => props.$color || theme.colors.
|
|
585
|
+
border-color: ${(props) => props.$color || props.theme.colors.primary600};
|
|
592
586
|
|
|
593
587
|
.stat-icon {
|
|
594
588
|
transform: scale(1.15) rotate(5deg);
|
|
@@ -596,7 +590,7 @@ const StatCard = styled__default.default(designSystem.Box)`
|
|
|
596
590
|
|
|
597
591
|
.stat-value {
|
|
598
592
|
transform: scale(1.08);
|
|
599
|
-
color: ${(props) => props.$color || theme.colors.
|
|
593
|
+
color: ${(props) => props.$color || props.theme.colors.primary600};
|
|
600
594
|
}
|
|
601
595
|
}
|
|
602
596
|
`;
|
|
@@ -607,7 +601,7 @@ const StatIcon = styled__default.default(designSystem.Box)`
|
|
|
607
601
|
display: flex;
|
|
608
602
|
align-items: center;
|
|
609
603
|
justify-content: center;
|
|
610
|
-
background: ${(props) => props.$bg || theme.colors.
|
|
604
|
+
background: ${(props) => props.$bg || props.theme.colors.primary100};
|
|
611
605
|
transition: all ${theme.transitions.normal};
|
|
612
606
|
margin: 0 auto 20px;
|
|
613
607
|
box-shadow: ${theme.shadows.sm};
|
|
@@ -615,7 +609,7 @@ const StatIcon = styled__default.default(designSystem.Box)`
|
|
|
615
609
|
svg {
|
|
616
610
|
width: 34px;
|
|
617
611
|
height: 34px;
|
|
618
|
-
color: ${(props) => props.$color || theme.colors.
|
|
612
|
+
color: ${(props) => props.$color || props.theme.colors.primary600};
|
|
619
613
|
}
|
|
620
614
|
|
|
621
615
|
@media screen and (max-width: ${breakpoints.mobile}) {
|
|
@@ -632,7 +626,7 @@ const StatIcon = styled__default.default(designSystem.Box)`
|
|
|
632
626
|
const StatValue = styled__default.default(designSystem.Typography)`
|
|
633
627
|
font-size: 2.75rem;
|
|
634
628
|
font-weight: 700;
|
|
635
|
-
color: ${theme.colors.
|
|
629
|
+
color: ${(props) => props.theme.colors.neutral800};
|
|
636
630
|
line-height: 1;
|
|
637
631
|
margin-bottom: 10px;
|
|
638
632
|
transition: all ${theme.transitions.normal};
|
|
@@ -645,7 +639,7 @@ const StatValue = styled__default.default(designSystem.Typography)`
|
|
|
645
639
|
`;
|
|
646
640
|
const StatLabel = styled__default.default(designSystem.Typography)`
|
|
647
641
|
font-size: 0.95rem;
|
|
648
|
-
color: ${theme.colors.
|
|
642
|
+
color: ${(props) => props.theme.colors.neutral600};
|
|
649
643
|
font-weight: 500;
|
|
650
644
|
letter-spacing: 0.025em;
|
|
651
645
|
text-align: center;
|
|
@@ -655,21 +649,21 @@ const StatLabel = styled__default.default(designSystem.Typography)`
|
|
|
655
649
|
}
|
|
656
650
|
`;
|
|
657
651
|
const DataTable = styled__default.default(designSystem.Box)`
|
|
658
|
-
background: ${theme.colors.
|
|
652
|
+
background: ${(props) => props.theme.colors.neutral0};
|
|
659
653
|
border-radius: ${theme.borderRadius.lg};
|
|
660
654
|
overflow: hidden;
|
|
661
655
|
box-shadow: ${theme.shadows.sm};
|
|
662
|
-
border: 1px solid ${theme.colors.
|
|
656
|
+
border: 1px solid ${(props) => props.theme.colors.neutral200};
|
|
663
657
|
margin-bottom: ${theme.spacing.xl};
|
|
664
658
|
`;
|
|
665
659
|
const StyledTable = styled__default.default(designSystem.Table)`
|
|
666
660
|
thead {
|
|
667
|
-
background: ${theme.colors.
|
|
668
|
-
border-bottom: 2px solid ${theme.colors.
|
|
661
|
+
background: ${(props) => props.theme.colors.neutral100};
|
|
662
|
+
border-bottom: 2px solid ${(props) => props.theme.colors.neutral200};
|
|
669
663
|
|
|
670
664
|
th {
|
|
671
665
|
font-weight: 600;
|
|
672
|
-
color: ${theme.colors.
|
|
666
|
+
color: ${(props) => props.theme.colors.neutral800};
|
|
673
667
|
font-size: 0.875rem;
|
|
674
668
|
text-transform: uppercase;
|
|
675
669
|
letter-spacing: 0.025em;
|
|
@@ -679,14 +673,14 @@ const StyledTable = styled__default.default(designSystem.Table)`
|
|
|
679
673
|
|
|
680
674
|
tbody tr {
|
|
681
675
|
transition: all ${theme.transitions.fast};
|
|
682
|
-
border-bottom: 1px solid ${theme.colors.
|
|
676
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.neutral150};
|
|
683
677
|
|
|
684
678
|
&:last-child {
|
|
685
679
|
border-bottom: none;
|
|
686
680
|
}
|
|
687
681
|
|
|
688
682
|
&:hover {
|
|
689
|
-
background: ${theme.colors.
|
|
683
|
+
background: ${(props) => props.theme.colors.primary100};
|
|
690
684
|
|
|
691
685
|
.action-buttons {
|
|
692
686
|
opacity: 1;
|
|
@@ -695,7 +689,7 @@ const StyledTable = styled__default.default(designSystem.Table)`
|
|
|
695
689
|
|
|
696
690
|
td {
|
|
697
691
|
padding: ${theme.spacing.lg} ${theme.spacing.lg};
|
|
698
|
-
color: ${theme.colors.
|
|
692
|
+
color: ${(props) => props.theme.colors.neutral800};
|
|
699
693
|
vertical-align: middle;
|
|
700
694
|
}
|
|
701
695
|
}
|
|
@@ -704,18 +698,18 @@ const OnlineIndicator = styled__default.default.div`
|
|
|
704
698
|
width: 10px;
|
|
705
699
|
height: 10px;
|
|
706
700
|
border-radius: 50%;
|
|
707
|
-
background: ${(props) => props.$online ? theme.colors.success[500] : theme.colors.
|
|
701
|
+
background: ${(props) => props.$online ? theme.colors.success[500] : props.theme.colors.neutral400};
|
|
708
702
|
display: inline-block;
|
|
709
703
|
margin-right: 8px;
|
|
710
704
|
${styled.css`animation: ${(props) => props.$online ? pulse : "none"} 2s ease-in-out infinite;`}
|
|
711
705
|
`;
|
|
712
706
|
const FilterBar = styled__default.default(designSystem.Flex)`
|
|
713
|
-
background: ${theme.colors.
|
|
707
|
+
background: ${(props) => props.theme.colors.neutral0};
|
|
714
708
|
padding: ${theme.spacing.md} ${theme.spacing.lg};
|
|
715
709
|
border-radius: ${theme.borderRadius.lg};
|
|
716
710
|
margin-bottom: ${theme.spacing.lg};
|
|
717
711
|
box-shadow: ${theme.shadows.sm};
|
|
718
|
-
border: 1px solid ${theme.colors.
|
|
712
|
+
border: 1px solid ${(props) => props.theme.colors.neutral200};
|
|
719
713
|
gap: ${theme.spacing.md};
|
|
720
714
|
align-items: center;
|
|
721
715
|
`;
|
|
@@ -730,27 +724,27 @@ const SearchIcon = styled__default.default(icons.Search)`
|
|
|
730
724
|
left: 12px;
|
|
731
725
|
width: 16px;
|
|
732
726
|
height: 16px;
|
|
733
|
-
color: ${theme.colors.
|
|
727
|
+
color: ${(props) => props.theme.colors.neutral600};
|
|
734
728
|
pointer-events: none;
|
|
735
729
|
`;
|
|
736
730
|
const StyledSearchInput = styled__default.default.input`
|
|
737
731
|
width: 100%;
|
|
738
732
|
padding: ${theme.spacing.sm} ${theme.spacing.sm} ${theme.spacing.sm} 36px;
|
|
739
|
-
border: 1px solid ${theme.colors.
|
|
733
|
+
border: 1px solid ${(props) => props.theme.colors.neutral200};
|
|
740
734
|
border-radius: ${theme.borderRadius.md};
|
|
741
735
|
font-size: 0.875rem;
|
|
742
736
|
transition: all ${theme.transitions.fast};
|
|
743
|
-
background: ${theme.colors.
|
|
744
|
-
color: ${theme.colors.
|
|
737
|
+
background: ${(props) => props.theme.colors.neutral0};
|
|
738
|
+
color: ${(props) => props.theme.colors.neutral800};
|
|
745
739
|
|
|
746
740
|
&:focus {
|
|
747
741
|
outline: none;
|
|
748
|
-
border-color: ${theme.colors.
|
|
749
|
-
box-shadow: 0 0 0 3px ${theme.colors.
|
|
742
|
+
border-color: ${(props) => props.theme.colors.primary600};
|
|
743
|
+
box-shadow: 0 0 0 3px ${(props) => props.theme.colors.primary100};
|
|
750
744
|
}
|
|
751
745
|
|
|
752
746
|
&::placeholder {
|
|
753
|
-
color: ${theme.colors.
|
|
747
|
+
color: ${(props) => props.theme.colors.neutral500};
|
|
754
748
|
}
|
|
755
749
|
`;
|
|
756
750
|
const ActionButtons = styled__default.default(designSystem.Flex)`
|
|
@@ -763,13 +757,38 @@ const ClickableRow = styled__default.default(designSystem.Tr)`
|
|
|
763
757
|
cursor: pointer;
|
|
764
758
|
|
|
765
759
|
&:hover {
|
|
766
|
-
background: ${theme.colors.
|
|
760
|
+
background: ${(props) => props.theme.colors.primary100} !important;
|
|
767
761
|
}
|
|
768
762
|
`;
|
|
763
|
+
styled__default.default(designSystem.Box)`
|
|
764
|
+
background: ${(props) => props.theme.colors.neutral0};
|
|
765
|
+
border-radius: ${theme.borderRadius.xl};
|
|
766
|
+
border: 2px dashed ${(props) => props.theme.colors.neutral300};
|
|
767
|
+
padding: 80px 32px;
|
|
768
|
+
text-align: center;
|
|
769
|
+
position: relative;
|
|
770
|
+
overflow: hidden;
|
|
771
|
+
min-height: 400px;
|
|
772
|
+
display: flex;
|
|
773
|
+
align-items: center;
|
|
774
|
+
justify-content: center;
|
|
775
|
+
`;
|
|
776
|
+
styled__default.default.div`
|
|
777
|
+
position: absolute;
|
|
778
|
+
top: 0;
|
|
779
|
+
left: 0;
|
|
780
|
+
right: 0;
|
|
781
|
+
bottom: 0;
|
|
782
|
+
background: linear-gradient(135deg, ${theme.colors.primary[50]} 0%, ${theme.colors.secondary[50]} 100%);
|
|
783
|
+
opacity: 0.3;
|
|
784
|
+
z-index: 0;
|
|
785
|
+
`;
|
|
769
786
|
const HomePage = () => {
|
|
787
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
770
788
|
const { get, post, del } = admin.useFetchClient();
|
|
771
789
|
const { toggleNotification } = admin.useNotification();
|
|
772
790
|
const { isPremium } = useLicense.useLicense();
|
|
791
|
+
const t = (id, defaultMessage, values) => formatMessage({ id: index.getTranslation(id), defaultMessage }, values);
|
|
773
792
|
const [sessions, setSessions] = react.useState([]);
|
|
774
793
|
const [loading, setLoading] = react.useState(true);
|
|
775
794
|
const [filterStatus, setFilterStatus] = react.useState("active");
|
|
@@ -798,7 +817,7 @@ const HomePage = () => {
|
|
|
798
817
|
}
|
|
799
818
|
};
|
|
800
819
|
const handleTerminateSession = async (sessionId) => {
|
|
801
|
-
if (!confirm("Are you sure you want to terminate this session?\n\nThis will set isActive to false (user will be logged out).")) {
|
|
820
|
+
if (!confirm(t("homepage.confirm.terminate", "Are you sure you want to terminate this session?\n\nThis will set isActive to false (user will be logged out)."))) {
|
|
802
821
|
return;
|
|
803
822
|
}
|
|
804
823
|
try {
|
|
@@ -809,7 +828,7 @@ const HomePage = () => {
|
|
|
809
828
|
}
|
|
810
829
|
};
|
|
811
830
|
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?")) {
|
|
831
|
+
if (!confirm(t("homepage.confirm.delete", "[WARNING] This will PERMANENTLY delete this session from the database!\n\nThis action cannot be undone.\n\nAre you sure?"))) {
|
|
813
832
|
return;
|
|
814
833
|
}
|
|
815
834
|
try {
|
|
@@ -817,13 +836,13 @@ const HomePage = () => {
|
|
|
817
836
|
fetchSessions();
|
|
818
837
|
toggleNotification({
|
|
819
838
|
type: "success",
|
|
820
|
-
message: "Session permanently deleted"
|
|
839
|
+
message: t("notifications.success.deleted", "Session permanently deleted")
|
|
821
840
|
});
|
|
822
841
|
} catch (err) {
|
|
823
842
|
console.error("[SessionManager] Error deleting session:", err);
|
|
824
843
|
toggleNotification({
|
|
825
844
|
type: "danger",
|
|
826
|
-
message: "Failed to delete session"
|
|
845
|
+
message: t("notifications.error.delete", "Failed to delete session")
|
|
827
846
|
});
|
|
828
847
|
}
|
|
829
848
|
};
|
|
@@ -831,7 +850,7 @@ const HomePage = () => {
|
|
|
831
850
|
if (!isPremium) {
|
|
832
851
|
toggleNotification({
|
|
833
852
|
type: "warning",
|
|
834
|
-
message: "Premium license required for export functionality"
|
|
853
|
+
message: t("notifications.warning.premiumRequired", "Premium license required for export functionality")
|
|
835
854
|
});
|
|
836
855
|
return;
|
|
837
856
|
}
|
|
@@ -866,13 +885,13 @@ const HomePage = () => {
|
|
|
866
885
|
link.click();
|
|
867
886
|
toggleNotification({
|
|
868
887
|
type: "success",
|
|
869
|
-
message:
|
|
888
|
+
message: t("notifications.success.exported", "Exported {count} sessions to {format}", { count: filteredSessions.length, format: "CSV" })
|
|
870
889
|
});
|
|
871
890
|
} catch (err) {
|
|
872
891
|
console.error("[SessionManager] Export error:", err);
|
|
873
892
|
toggleNotification({
|
|
874
893
|
type: "danger",
|
|
875
|
-
message: "Failed to export sessions"
|
|
894
|
+
message: t("notifications.error.export", "Failed to export sessions")
|
|
876
895
|
});
|
|
877
896
|
}
|
|
878
897
|
};
|
|
@@ -880,7 +899,7 @@ const HomePage = () => {
|
|
|
880
899
|
if (!isPremium) {
|
|
881
900
|
toggleNotification({
|
|
882
901
|
type: "warning",
|
|
883
|
-
message: "Premium license required for export functionality"
|
|
902
|
+
message: t("notifications.warning.premiumRequired", "Premium license required for export functionality")
|
|
884
903
|
});
|
|
885
904
|
return;
|
|
886
905
|
}
|
|
@@ -923,13 +942,13 @@ const HomePage = () => {
|
|
|
923
942
|
link.click();
|
|
924
943
|
toggleNotification({
|
|
925
944
|
type: "success",
|
|
926
|
-
message:
|
|
945
|
+
message: t("notifications.success.exported", "Exported {count} sessions to {format}", { count: filteredSessions.length, format: "JSON" })
|
|
927
946
|
});
|
|
928
947
|
} catch (err) {
|
|
929
948
|
console.error("[SessionManager] Export error:", err);
|
|
930
949
|
toggleNotification({
|
|
931
950
|
type: "danger",
|
|
932
|
-
message: "Failed to export sessions"
|
|
951
|
+
message: t("notifications.error.export", "Failed to export sessions")
|
|
933
952
|
});
|
|
934
953
|
}
|
|
935
954
|
};
|
|
@@ -980,9 +999,10 @@ const HomePage = () => {
|
|
|
980
999
|
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 2, children: [
|
|
981
1000
|
/* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
|
|
982
1001
|
/* @__PURE__ */ jsxRuntime.jsx(icons.Monitor, {}),
|
|
983
|
-
"
|
|
1002
|
+
" ",
|
|
1003
|
+
t("homepage.title", "Session Manager")
|
|
984
1004
|
] }),
|
|
985
|
-
/* @__PURE__ */ jsxRuntime.jsx(Subtitle, { children: "Monitor and manage user sessions in real-time" })
|
|
1005
|
+
/* @__PURE__ */ jsxRuntime.jsx(Subtitle, { children: t("homepage.subtitle", "Monitor and manage user sessions in real-time") })
|
|
986
1006
|
] }),
|
|
987
1007
|
isPremium && filteredSessions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
988
1008
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -998,7 +1018,7 @@ const HomePage = () => {
|
|
|
998
1018
|
border: "1px solid rgba(255,255,255,0.3)",
|
|
999
1019
|
fontWeight: "600"
|
|
1000
1020
|
},
|
|
1001
|
-
children: "Export CSV"
|
|
1021
|
+
children: t("homepage.export.csv", "Export CSV")
|
|
1002
1022
|
}
|
|
1003
1023
|
),
|
|
1004
1024
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1014,7 +1034,7 @@ const HomePage = () => {
|
|
|
1014
1034
|
border: "1px solid rgba(255,255,255,0.3)",
|
|
1015
1035
|
fontWeight: "600"
|
|
1016
1036
|
},
|
|
1017
|
-
children: "Export JSON"
|
|
1037
|
+
children: t("homepage.export.json", "Export JSON")
|
|
1018
1038
|
}
|
|
1019
1039
|
)
|
|
1020
1040
|
] })
|
|
@@ -1023,32 +1043,32 @@ const HomePage = () => {
|
|
|
1023
1043
|
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.1s", $color: theme.colors.success[500], children: [
|
|
1024
1044
|
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.success[100], $color: theme.colors.success[600], children: /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}) }),
|
|
1025
1045
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: activeSessions.length }),
|
|
1026
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Active" })
|
|
1046
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: t("homepage.stats.active", "Active") })
|
|
1027
1047
|
] }),
|
|
1028
1048
|
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.2s", $color: theme.colors.warning[500], children: [
|
|
1029
1049
|
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.warning[100], $color: theme.colors.warning[600], children: /* @__PURE__ */ jsxRuntime.jsx(icons.Clock, {}) }),
|
|
1030
1050
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: idleSessions.length }),
|
|
1031
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Idle" })
|
|
1051
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: t("homepage.stats.idle", "Idle") })
|
|
1032
1052
|
] }),
|
|
1033
1053
|
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.3s", $color: theme.colors.danger[500], children: [
|
|
1034
1054
|
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: theme.colors.danger[100], $color: theme.colors.danger[600], children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}) }),
|
|
1035
1055
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: loggedOutSessions.length }),
|
|
1036
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Logged Out" })
|
|
1056
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: t("homepage.stats.loggedOut", "Logged Out") })
|
|
1037
1057
|
] }),
|
|
1038
|
-
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.4s", $color:
|
|
1039
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg:
|
|
1058
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.4s", $color: "#4B5563", children: [
|
|
1059
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: "#F3F4F6", $color: "#4B5563", children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}) }),
|
|
1040
1060
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: terminatedSessions.length }),
|
|
1041
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Terminated" })
|
|
1061
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: t("homepage.stats.terminated", "Terminated") })
|
|
1042
1062
|
] }),
|
|
1043
|
-
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.5s", $color:
|
|
1044
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg:
|
|
1063
|
+
/* @__PURE__ */ jsxRuntime.jsxs(StatCard, { $delay: "0.5s", $color: "#A855F7", children: [
|
|
1064
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatIcon, { className: "stat-icon", $bg: "#EDE9FE", $color: "#9333EA", children: /* @__PURE__ */ jsxRuntime.jsx(icons.User, {}) }),
|
|
1045
1065
|
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { className: "stat-value", children: sessions.length }),
|
|
1046
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Total" })
|
|
1066
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: t("homepage.stats.total", "Total") })
|
|
1047
1067
|
] })
|
|
1048
1068
|
] }),
|
|
1049
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", padding: 8, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { children: "Loading sessions..." }) }),
|
|
1069
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", padding: 8, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { children: t("homepage.loading", "Loading sessions...") }) }),
|
|
1050
1070
|
!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
|
|
1071
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", textColor: "neutral700", style: { marginBottom: theme.spacing.md }, children: t("homepage.allSessions", "All Sessions") }) }),
|
|
1052
1072
|
/* @__PURE__ */ jsxRuntime.jsxs(FilterBar, { children: [
|
|
1053
1073
|
/* @__PURE__ */ jsxRuntime.jsxs(SearchInputWrapper, { children: [
|
|
1054
1074
|
/* @__PURE__ */ jsxRuntime.jsx(SearchIcon, {}),
|
|
@@ -1057,7 +1077,7 @@ const HomePage = () => {
|
|
|
1057
1077
|
{
|
|
1058
1078
|
value: searchQuery,
|
|
1059
1079
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
1060
|
-
placeholder: "Search by user, IP address, or device...",
|
|
1080
|
+
placeholder: t("homepage.search.placeholder", "Search by user, IP address, or device..."),
|
|
1061
1081
|
type: "text"
|
|
1062
1082
|
}
|
|
1063
1083
|
)
|
|
@@ -1070,11 +1090,11 @@ const HomePage = () => {
|
|
|
1070
1090
|
placeholder: "Filter",
|
|
1071
1091
|
size: "S",
|
|
1072
1092
|
children: [
|
|
1073
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "all", children: "All Sessions" }),
|
|
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" })
|
|
1093
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "all", children: t("homepage.filter.all", "All Sessions") }),
|
|
1094
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "active", children: t("homepage.filter.active", "Active (less than 15 min)") }),
|
|
1095
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "idle", children: t("homepage.filter.idle", "Idle (more than 15 min)") }),
|
|
1096
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "loggedout", children: t("homepage.filter.loggedout", "Logged Out") }),
|
|
1097
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "terminated", children: t("homepage.filter.terminated", "Terminated") })
|
|
1078
1098
|
]
|
|
1079
1099
|
}
|
|
1080
1100
|
) }),
|
|
@@ -1086,31 +1106,24 @@ const HomePage = () => {
|
|
|
1086
1106
|
placeholder: "Entries",
|
|
1087
1107
|
size: "S",
|
|
1088
1108
|
children: [
|
|
1089
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "10", children: "10 entries" }),
|
|
1090
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "25", children: "25 entries" }),
|
|
1091
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "50", children: "50 entries" }),
|
|
1092
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "100", children: "100 entries" })
|
|
1109
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "10", children: t("homepage.entries.10", "10 entries") }),
|
|
1110
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "25", children: t("homepage.entries.25", "25 entries") }),
|
|
1111
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "50", children: t("homepage.entries.50", "50 entries") }),
|
|
1112
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "100", children: t("homepage.entries.100", "100 entries") })
|
|
1093
1113
|
]
|
|
1094
1114
|
}
|
|
1095
1115
|
) })
|
|
1096
1116
|
] }),
|
|
1097
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.
|
|
1098
|
-
"Showing ",
|
|
1099
|
-
filteredSessions.length,
|
|
1100
|
-
" of ",
|
|
1101
|
-
sessions.length,
|
|
1102
|
-
" sessions",
|
|
1103
|
-
searchQuery && ` (filtered by "${searchQuery}")`
|
|
1104
|
-
] }) }),
|
|
1117
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { marginBottom: theme.spacing.md }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: searchQuery ? t("homepage.showingFiltered", 'Showing {count} of {total} sessions (filtered by "{query}")', { count: filteredSessions.length, total: sessions.length, query: searchQuery }) : t("homepage.showing", "Showing {count} of {total} sessions", { count: filteredSessions.length, total: sessions.length }) }) }),
|
|
1105
1118
|
filteredSessions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(DataTable, { children: /* @__PURE__ */ jsxRuntime.jsxs(StyledTable, { children: [
|
|
1106
1119
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
|
|
1107
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "Status" }),
|
|
1108
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "User" }),
|
|
1109
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "Device" }),
|
|
1110
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "IP Address" }),
|
|
1111
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "Login Time" }),
|
|
1112
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "Last Active" }),
|
|
1113
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: "Actions" })
|
|
1120
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.status", "Status") }),
|
|
1121
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.user", "User") }),
|
|
1122
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.device", "Device") }),
|
|
1123
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.ipAddress", "IP Address") }),
|
|
1124
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.loginTime", "Login Time") }),
|
|
1125
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.lastActive", "Last Active") }),
|
|
1126
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { children: t("homepage.table.actions", "Actions") })
|
|
1114
1127
|
] }) }),
|
|
1115
1128
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Tbody, { children: filteredSessions.map((session) => {
|
|
1116
1129
|
const deviceInfo = index.parseUserAgent(session.userAgent);
|
|
@@ -1120,26 +1133,26 @@ const HomePage = () => {
|
|
|
1120
1133
|
active: {
|
|
1121
1134
|
bg: theme.colors.success[50],
|
|
1122
1135
|
badgeColor: "success600",
|
|
1123
|
-
label: "Active",
|
|
1136
|
+
label: t("homepage.status.active", "Active"),
|
|
1124
1137
|
indicator: true
|
|
1125
1138
|
},
|
|
1126
1139
|
idle: {
|
|
1127
1140
|
bg: theme.colors.warning[50],
|
|
1128
1141
|
badgeColor: "warning600",
|
|
1129
|
-
label: "Idle",
|
|
1142
|
+
label: t("homepage.status.idle", "Idle"),
|
|
1130
1143
|
indicator: false
|
|
1131
1144
|
},
|
|
1132
1145
|
loggedout: {
|
|
1133
1146
|
bg: theme.colors.danger[50],
|
|
1134
1147
|
badgeColor: "danger600",
|
|
1135
|
-
label: "Logged Out",
|
|
1148
|
+
label: t("homepage.status.loggedOut", "Logged Out"),
|
|
1136
1149
|
indicator: false,
|
|
1137
1150
|
opacity: 0.7
|
|
1138
1151
|
},
|
|
1139
1152
|
terminated: {
|
|
1140
|
-
bg:
|
|
1153
|
+
bg: "#F3F4F6",
|
|
1141
1154
|
badgeColor: "neutral600",
|
|
1142
|
-
label: "Terminated",
|
|
1155
|
+
label: t("homepage.status.terminated", "Terminated"),
|
|
1143
1156
|
indicator: false,
|
|
1144
1157
|
opacity: 0.6
|
|
1145
1158
|
}
|
|
@@ -1167,7 +1180,7 @@ const HomePage = () => {
|
|
|
1167
1180
|
)
|
|
1168
1181
|
] }) }),
|
|
1169
1182
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", children: [
|
|
1170
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "semiBold", ellipsis: true, children: session.user?.username || session.user?.email || "Unknown" }),
|
|
1183
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "semiBold", ellipsis: true, children: session.user?.username || session.user?.email || t("homepage.user.unknown", "Unknown") }),
|
|
1171
1184
|
session.user?.email && session.user?.username && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", ellipsis: true, children: session.user.email })
|
|
1172
1185
|
] }) }),
|
|
1173
1186
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { alignItems: "center", gap: 2, children: [
|
|
@@ -1185,10 +1198,7 @@ const HomePage = () => {
|
|
|
1185
1198
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral700", children: new Date(session.loginTime).toLocaleString() }) }),
|
|
1186
1199
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "flex-start", children: [
|
|
1187
1200
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral700", children: new Date(session.lastActive || session.loginTime).toLocaleString() }),
|
|
1188
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1189
|
-
session.minutesSinceActive,
|
|
1190
|
-
" min ago"
|
|
1191
|
-
] })
|
|
1201
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: sessionStatus === "active" ? "success600" : "neutral500", children: t("homepage.time.minAgo", "{minutes} min ago", { minutes: session.minutesSinceActive }) })
|
|
1192
1202
|
] }) }),
|
|
1193
1203
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsxs(ActionButtons, { className: "action-buttons", children: [
|
|
1194
1204
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1200,7 +1210,7 @@ const HomePage = () => {
|
|
|
1200
1210
|
e.stopPropagation();
|
|
1201
1211
|
handleSessionClick(session);
|
|
1202
1212
|
},
|
|
1203
|
-
title: "View Details",
|
|
1213
|
+
title: t("homepage.actions.viewDetails", "View Details"),
|
|
1204
1214
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Eye, {})
|
|
1205
1215
|
}
|
|
1206
1216
|
),
|
|
@@ -1214,7 +1224,7 @@ const HomePage = () => {
|
|
|
1214
1224
|
handleTerminateSession(session.id);
|
|
1215
1225
|
},
|
|
1216
1226
|
disabled: sessionStatus !== "active" && sessionStatus !== "idle",
|
|
1217
|
-
title: session.isActive ? "Terminate (Logout)" : "Already inactive",
|
|
1227
|
+
title: session.isActive ? t("homepage.actions.terminate", "Terminate (Logout)") : t("homepage.actions.alreadyInactive", "Already inactive"),
|
|
1218
1228
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {})
|
|
1219
1229
|
}
|
|
1220
1230
|
),
|
|
@@ -1227,7 +1237,7 @@ const HomePage = () => {
|
|
|
1227
1237
|
e.stopPropagation();
|
|
1228
1238
|
handleDeleteSession(session.id);
|
|
1229
1239
|
},
|
|
1230
|
-
title: "Delete Permanently",
|
|
1240
|
+
title: t("homepage.actions.deletePermanently", "Delete Permanently"),
|
|
1231
1241
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
|
|
1232
1242
|
}
|
|
1233
1243
|
)
|
|
@@ -1242,10 +1252,10 @@ const HomePage = () => {
|
|
|
1242
1252
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1243
1253
|
designSystem.Box,
|
|
1244
1254
|
{
|
|
1255
|
+
background: "neutral0",
|
|
1245
1256
|
style: {
|
|
1246
|
-
background: theme.colors.neutral[0],
|
|
1247
1257
|
borderRadius: theme.borderRadius.xl,
|
|
1248
|
-
border:
|
|
1258
|
+
border: "2px dashed #E5E7EB",
|
|
1249
1259
|
padding: "60px 32px",
|
|
1250
1260
|
textAlign: "center",
|
|
1251
1261
|
position: "relative",
|
|
@@ -1286,20 +1296,20 @@ const HomePage = () => {
|
|
|
1286
1296
|
justifyContent: "center",
|
|
1287
1297
|
boxShadow: theme.shadows.xl
|
|
1288
1298
|
},
|
|
1289
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, { style: { width: "50px", height: "50px", color:
|
|
1299
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, { style: { width: "50px", height: "50px", color: "#0284C7" } })
|
|
1290
1300
|
}
|
|
1291
1301
|
),
|
|
1292
1302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1293
1303
|
designSystem.Typography,
|
|
1294
1304
|
{
|
|
1295
1305
|
variant: "alpha",
|
|
1306
|
+
textColor: "neutral800",
|
|
1296
1307
|
style: {
|
|
1297
1308
|
fontSize: "1.5rem",
|
|
1298
1309
|
fontWeight: "700",
|
|
1299
|
-
color: theme.colors.neutral[800],
|
|
1300
1310
|
marginBottom: "4px"
|
|
1301
1311
|
},
|
|
1302
|
-
children: "No sessions found"
|
|
1312
|
+
children: t("homepage.noResults.title", "No sessions found")
|
|
1303
1313
|
}
|
|
1304
1314
|
),
|
|
1305
1315
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1312,7 +1322,7 @@ const HomePage = () => {
|
|
|
1312
1322
|
maxWidth: "400px",
|
|
1313
1323
|
lineHeight: "1.6"
|
|
1314
1324
|
},
|
|
1315
|
-
children: "Try adjusting your search query or filters to find sessions"
|
|
1325
|
+
children: t("homepage.noResults.description", "Try adjusting your search query or filters to find sessions")
|
|
1316
1326
|
}
|
|
1317
1327
|
)
|
|
1318
1328
|
] })
|
|
@@ -1324,10 +1334,10 @@ const HomePage = () => {
|
|
|
1324
1334
|
!loading && sessions.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1325
1335
|
designSystem.Box,
|
|
1326
1336
|
{
|
|
1337
|
+
background: "neutral0",
|
|
1327
1338
|
style: {
|
|
1328
|
-
background: theme.colors.neutral[0],
|
|
1329
1339
|
borderRadius: theme.borderRadius.xl,
|
|
1330
|
-
border:
|
|
1340
|
+
border: "2px dashed #E5E7EB",
|
|
1331
1341
|
padding: "80px 32px",
|
|
1332
1342
|
textAlign: "center",
|
|
1333
1343
|
position: "relative",
|
|
@@ -1367,20 +1377,20 @@ const HomePage = () => {
|
|
|
1367
1377
|
justifyContent: "center",
|
|
1368
1378
|
boxShadow: theme.shadows.xl
|
|
1369
1379
|
},
|
|
1370
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Monitor, { style: { width: "60px", height: "60px", color:
|
|
1380
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Monitor, { style: { width: "60px", height: "60px", color: "#0284C7" } })
|
|
1371
1381
|
}
|
|
1372
1382
|
),
|
|
1373
1383
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1374
1384
|
designSystem.Typography,
|
|
1375
1385
|
{
|
|
1376
1386
|
variant: "alpha",
|
|
1387
|
+
textColor: "neutral800",
|
|
1377
1388
|
style: {
|
|
1378
1389
|
fontSize: "1.75rem",
|
|
1379
1390
|
fontWeight: "700",
|
|
1380
|
-
color: theme.colors.neutral[800],
|
|
1381
1391
|
marginBottom: "8px"
|
|
1382
1392
|
},
|
|
1383
|
-
children: "No sessions yet"
|
|
1393
|
+
children: t("homepage.empty.title", "No sessions yet")
|
|
1384
1394
|
}
|
|
1385
1395
|
),
|
|
1386
1396
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1393,7 +1403,7 @@ const HomePage = () => {
|
|
|
1393
1403
|
maxWidth: "500px",
|
|
1394
1404
|
lineHeight: "1.6"
|
|
1395
1405
|
},
|
|
1396
|
-
children: "Sessions will appear here when users log in to your application"
|
|
1406
|
+
children: t("homepage.empty.description", "Sessions will appear here when users log in to your application")
|
|
1397
1407
|
}
|
|
1398
1408
|
)
|
|
1399
1409
|
] })
|