strapi-plugin-magic-sessionmanager 3.6.0 → 4.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.
Files changed (43) hide show
  1. package/README.md +104 -0
  2. package/admin/src/hooks/useLicense.js +1 -1
  3. package/admin/src/index.js +5 -2
  4. package/admin/src/pages/Settings.jsx +0 -1
  5. package/admin/src/translations/es.json +21 -0
  6. package/admin/src/translations/fr.json +21 -0
  7. package/admin/src/translations/pt.json +21 -0
  8. package/admin/src/utils/parseUserAgent.js +1 -1
  9. package/dist/_chunks/{Analytics-DRzCKaDF.js → Analytics-ioaeEh-E.js} +2 -2
  10. package/dist/_chunks/{Analytics-CwyLwdOZ.mjs → Analytics-mYu_uGwU.mjs} +2 -2
  11. package/dist/_chunks/{App-Zhs_vt59.mjs → App-BXpIS12l.mjs} +2 -2
  12. package/dist/_chunks/{App-nGu2Eb87.js → App-DdnUYWbC.js} +2 -2
  13. package/dist/_chunks/{License-CPI0p_W8.mjs → License-C03C2j9P.mjs} +1 -1
  14. package/dist/_chunks/{License-k5vvhgKr.js → License-DZYrOgcx.js} +1 -1
  15. package/dist/_chunks/{Settings-CL2im8M3.mjs → Settings-0ocB3qHk.mjs} +2 -2
  16. package/dist/_chunks/{Settings-Lkmxisuv.js → Settings-C6_CqpCC.js} +2 -2
  17. package/dist/_chunks/es-CuLHazN1.js +23 -0
  18. package/dist/_chunks/es-Dkmjhy9c.mjs +23 -0
  19. package/dist/_chunks/fr-BAJp2yhI.js +23 -0
  20. package/dist/_chunks/fr-Bssg_3UF.mjs +23 -0
  21. package/dist/_chunks/{index-B-0VPfeF.mjs → index-DBRS3kt5.mjs} +11 -8
  22. package/dist/_chunks/{index-W_QbTAYU.js → index-DC8Y0qxx.js} +11 -8
  23. package/dist/_chunks/pt-BAP9cKs3.js +23 -0
  24. package/dist/_chunks/pt-BVNoNcuY.mjs +23 -0
  25. package/dist/_chunks/{useLicense-DUGjNbQ9.mjs → useLicense-DSLL9n3Y.mjs} +2 -2
  26. package/dist/_chunks/{useLicense-C_Rneohy.js → useLicense-qgGfMvse.js} +2 -2
  27. package/dist/admin/index.js +1 -1
  28. package/dist/admin/index.mjs +1 -1
  29. package/dist/server/index.js +117 -95
  30. package/dist/server/index.mjs +117 -95
  31. package/package.json +1 -1
  32. package/server/src/bootstrap.js +32 -26
  33. package/server/src/controllers/license.js +4 -4
  34. package/server/src/controllers/session.js +10 -6
  35. package/server/src/destroy.js +1 -1
  36. package/server/src/middlewares/last-seen.js +8 -3
  37. package/server/src/register.js +4 -4
  38. package/server/src/services/geolocation.js +4 -2
  39. package/server/src/services/license-guard.js +13 -10
  40. package/server/src/services/notifications.js +10 -10
  41. package/server/src/services/service.js +1 -1
  42. package/server/src/services/session.js +41 -31
  43. package/server/src/utils/encryption.js +1 -1
package/README.md CHANGED
@@ -300,6 +300,96 @@ Add to `config/plugins.ts`:
300
300
 
301
301
  ---
302
302
 
303
+ ## 📧 Email Alerts Setup (Premium)
304
+
305
+ The Session Manager uses **Strapi's Email Plugin** to send notifications. You need to configure an email provider first.
306
+
307
+ ### Step 1: Install Email Provider
308
+
309
+ Choose one of these providers:
310
+
311
+ **Option A: Nodemailer (Recommended)**
312
+ ```bash
313
+ npm install @strapi/provider-email-nodemailer
314
+ ```
315
+
316
+ **Option B: SendGrid**
317
+ ```bash
318
+ npm install @strapi/provider-email-sendgrid
319
+ ```
320
+
321
+ **Option C: Mailgun**
322
+ ```bash
323
+ npm install @strapi/provider-email-mailgun
324
+ ```
325
+
326
+ ### Step 2: Configure Email Plugin
327
+
328
+ Add to `config/plugins.ts`:
329
+
330
+ ```typescript
331
+ export default () => ({
332
+ // Email configuration
333
+ email: {
334
+ config: {
335
+ provider: 'nodemailer',
336
+ providerOptions: {
337
+ host: process.env.SMTP_HOST || 'smtp.gmail.com',
338
+ port: process.env.SMTP_PORT || 587,
339
+ auth: {
340
+ user: process.env.SMTP_USER,
341
+ pass: process.env.SMTP_PASSWORD,
342
+ },
343
+ },
344
+ settings: {
345
+ defaultFrom: process.env.SMTP_DEFAULT_FROM || 'noreply@yourapp.com',
346
+ defaultReplyTo: process.env.SMTP_DEFAULT_REPLY_TO || 'support@yourapp.com',
347
+ },
348
+ },
349
+ },
350
+
351
+ // Session Manager configuration
352
+ 'magic-sessionmanager': {
353
+ enabled: true,
354
+ },
355
+ });
356
+ ```
357
+
358
+ ### Step 3: Add Environment Variables
359
+
360
+ Add to your `.env` file:
361
+
362
+ ```env
363
+ SMTP_HOST=smtp.gmail.com
364
+ SMTP_PORT=587
365
+ SMTP_USER=your-email@gmail.com
366
+ SMTP_PASSWORD=your-app-password
367
+ SMTP_DEFAULT_FROM=noreply@yourapp.com
368
+ SMTP_DEFAULT_REPLY_TO=support@yourapp.com
369
+ ```
370
+
371
+ **For Gmail:**
372
+ - Use an [App Password](https://support.google.com/accounts/answer/185833), not your regular password!
373
+
374
+ ### Step 4: Enable in Admin Panel
375
+
376
+ 1. Go to **Sessions → Settings**
377
+ 2. Scroll to **"Email Notifications"**
378
+ 3. Toggle **"Enable Email Alerts"** to ON
379
+ 4. Customize email templates (optional)
380
+ 5. Click **Save**
381
+
382
+ ### Step 5: Test It
383
+
384
+ Trigger a suspicious login (e.g., use a VPN) and check if the email arrives!
385
+
386
+ **Troubleshooting:**
387
+ - Check Strapi logs for email errors
388
+ - Verify SMTP credentials are correct
389
+ - Test SMTP connection with a tool like [smtp-tester](https://www.npmjs.com/package/smtp-tester)
390
+
391
+ ---
392
+
303
393
  ## 📋 Simple API Guide
304
394
 
305
395
  ### Get Sessions
@@ -517,4 +607,18 @@ See [LICENSE](./LICENSE) and [COPYRIGHT_NOTICE.txt](./COPYRIGHT_NOTICE.txt) for
517
607
 
518
608
  ---
519
609
 
610
+ ## 🌐 Supported Languages
611
+
612
+ The admin interface is available in **5 languages:**
613
+
614
+ - 🇬🇧 **English** - Default
615
+ - 🇩🇪 **Deutsch** - German
616
+ - 🇪🇸 **Español** - Spanish
617
+ - 🇫🇷 **Français** - French
618
+ - 🇵🇹 **Português** - Portuguese
619
+
620
+ Language automatically follows your Strapi admin interface setting.
621
+
622
+ ---
623
+
520
624
  **Made with ❤️ for Strapi v5**
@@ -60,7 +60,7 @@ export const useLicense = () => {
60
60
  if ((newIsPremium !== isPremium || !silent) && !silent) {
61
61
  console.log(`[magic-sessionmanager/useLicense] Premium Status: ${newIsPremium} (valid: ${isValid}, featurePremium: ${hasPremiumFeature})`);
62
62
  if (!newIsPremium && isValid) {
63
- console.warn('[magic-sessionmanager/useLicense] ⚠️ License is valid but Premium feature is not enabled!');
63
+ console.warn('[magic-sessionmanager/useLicense] [WARN] License is valid but Premium feature is not enabled!');
64
64
  }
65
65
  }
66
66
 
@@ -86,7 +86,7 @@ export default {
86
86
  id: 'online-users-widget',
87
87
  pluginId: pluginId,
88
88
  });
89
- console.log(`[${pluginId}] Online Users Widget registered`);
89
+ console.log(`[${pluginId}] [SUCCESS] Online Users Widget registered`);
90
90
  }
91
91
  },
92
92
 
@@ -99,7 +99,7 @@ export default {
99
99
  if (contentManagerPlugin && contentManagerPlugin.apis) {
100
100
  console.log(`[${pluginId}] Injecting SessionInfoPanel into edit view sidebar...`);
101
101
  contentManagerPlugin.apis.addEditViewSidePanel([SessionInfoPanel]);
102
- console.log(`[${pluginId}] SessionInfoPanel injected successfully`);
102
+ console.log(`[${pluginId}] [SUCCESS] SessionInfoPanel injected successfully`);
103
103
  } else {
104
104
  console.warn(`[${pluginId}] Content Manager plugin or APIs not available`);
105
105
  }
@@ -112,6 +112,9 @@ export default {
112
112
  const importedTrads = {
113
113
  en: () => import('./translations/en.json'),
114
114
  de: () => import('./translations/de.json'),
115
+ es: () => import('./translations/es.json'),
116
+ fr: () => import('./translations/fr.json'),
117
+ pt: () => import('./translations/pt.json'),
115
118
  };
116
119
 
117
120
  const translatedLanguages = Object.keys(importedTrads).filter((lang) =>
@@ -10,7 +10,6 @@ import {
10
10
  Checkbox,
11
11
  Alert,
12
12
  TextInput,
13
- Textarea,
14
13
  Tabs,
15
14
  Divider,
16
15
  Badge,
@@ -0,0 +1,21 @@
1
+ {
2
+ "plugin.name": "Gestor de Sesiones",
3
+ "plugin.description": "Seguimiento de inicio/cierre de sesión y actividad de usuarios",
4
+ "settings.section": "Gestor de Sesiones",
5
+ "settings.sessions": "Sesiones Activas",
6
+ "settings.emailTemplates.title": "Plantillas de Correo",
7
+ "settings.emailTemplates.description": "Personalizar plantillas de notificación por correo con variables dinámicas",
8
+ "settings.emailTemplates.validate": "Validar",
9
+ "settings.emailTemplates.loadDefault": "Cargar Plantilla Predeterminada",
10
+ "settings.emailTemplates.subject": "Asunto del Correo",
11
+ "settings.emailTemplates.htmlTemplate": "Plantilla HTML",
12
+ "settings.emailTemplates.textTemplate": "Plantilla de Texto (Respaldo)",
13
+ "settings.emailTemplates.variables": "Variables Disponibles (clic para copiar)",
14
+ "settings.emailTemplates.validation.success": "¡Plantilla válida! Se encontraron {count} variables.",
15
+ "settings.emailTemplates.validation.warning": "No se encontraron variables en la plantilla. Agregue al menos una variable.",
16
+ "settings.emailTemplates.defaultLoaded": "¡Plantilla predeterminada cargada!",
17
+ "settings.emailTemplates.suspiciousLogin": "Inicio de Sesión Sospechoso",
18
+ "settings.emailTemplates.newLocation": "Nueva Ubicación",
19
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
20
+ }
21
+
@@ -0,0 +1,21 @@
1
+ {
2
+ "plugin.name": "Gestionnaire de Sessions",
3
+ "plugin.description": "Suivi des connexions/déconnexions et activité des utilisateurs",
4
+ "settings.section": "Gestionnaire de Sessions",
5
+ "settings.sessions": "Sessions Actives",
6
+ "settings.emailTemplates.title": "Modèles d'Email",
7
+ "settings.emailTemplates.description": "Personnaliser les modèles de notification par email avec des variables dynamiques",
8
+ "settings.emailTemplates.validate": "Valider",
9
+ "settings.emailTemplates.loadDefault": "Charger le Modèle par Défaut",
10
+ "settings.emailTemplates.subject": "Objet de l'Email",
11
+ "settings.emailTemplates.htmlTemplate": "Modèle HTML",
12
+ "settings.emailTemplates.textTemplate": "Modèle Texte (Secours)",
13
+ "settings.emailTemplates.variables": "Variables Disponibles (cliquez pour copier)",
14
+ "settings.emailTemplates.validation.success": "Modèle valide! {count} variables trouvées.",
15
+ "settings.emailTemplates.validation.warning": "Aucune variable trouvée dans le modèle. Ajoutez au moins une variable.",
16
+ "settings.emailTemplates.defaultLoaded": "Modèle par défaut chargé!",
17
+ "settings.emailTemplates.suspiciousLogin": "Connexion Suspecte",
18
+ "settings.emailTemplates.newLocation": "Nouvelle Localisation",
19
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
20
+ }
21
+
@@ -0,0 +1,21 @@
1
+ {
2
+ "plugin.name": "Gerenciador de Sessões",
3
+ "plugin.description": "Rastreamento de login/logout e atividade de usuários",
4
+ "settings.section": "Gerenciador de Sessões",
5
+ "settings.sessions": "Sessões Ativas",
6
+ "settings.emailTemplates.title": "Modelos de Email",
7
+ "settings.emailTemplates.description": "Personalizar modelos de notificação por email com variáveis dinâmicas",
8
+ "settings.emailTemplates.validate": "Validar",
9
+ "settings.emailTemplates.loadDefault": "Carregar Modelo Padrão",
10
+ "settings.emailTemplates.subject": "Assunto do Email",
11
+ "settings.emailTemplates.htmlTemplate": "Modelo HTML",
12
+ "settings.emailTemplates.textTemplate": "Modelo de Texto (Reserva)",
13
+ "settings.emailTemplates.variables": "Variáveis Disponíveis (clique para copiar)",
14
+ "settings.emailTemplates.validation.success": "Modelo válido! {count} variáveis encontradas.",
15
+ "settings.emailTemplates.validation.warning": "Nenhuma variável encontrada no modelo. Adicione pelo menos uma variável.",
16
+ "settings.emailTemplates.defaultLoaded": "Modelo padrão carregado!",
17
+ "settings.emailTemplates.suspiciousLogin": "Login Suspeito",
18
+ "settings.emailTemplates.newLocation": "Nova Localização",
19
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
20
+ }
21
+
@@ -41,7 +41,7 @@ export const parseUserAgent = (userAgent) => {
41
41
  browser = 'Opera';
42
42
  } else if (ua.includes('curl/')) {
43
43
  browser = 'cURL';
44
- deviceIcon = '⚙️';
44
+ deviceIcon = 'gear';
45
45
  device = 'API Client';
46
46
  } else if (ua.includes('postman')) {
47
47
  browser = 'Postman';
@@ -6,8 +6,8 @@ const admin = require("@strapi/strapi/admin");
6
6
  const styled = require("styled-components");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
- const index = require("./index-W_QbTAYU.js");
10
- const useLicense = require("./useLicense-C_Rneohy.js");
9
+ const index = require("./index-DC8Y0qxx.js");
10
+ const useLicense = require("./useLicense-qgGfMvse.js");
11
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
12
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
13
13
  const theme = {
@@ -4,8 +4,8 @@ import { useFetchClient } from "@strapi/strapi/admin";
4
4
  import styled, { css, keyframes } from "styled-components";
5
5
  import { Loader, Typography, Box, Flex, Badge } from "@strapi/design-system";
6
6
  import { ChartBubble, Crown, User, Clock, Monitor } from "@strapi/icons";
7
- import { a as pluginId } from "./index-B-0VPfeF.mjs";
8
- import { u as useLicense } from "./useLicense-DUGjNbQ9.mjs";
7
+ import { a as pluginId } from "./index-DBRS3kt5.mjs";
8
+ import { u as useLicense } from "./useLicense-DSLL9n3Y.mjs";
9
9
  const theme = {
10
10
  colors: {
11
11
  primary: { 100: "#E0F2FE", 500: "#0EA5E9", 600: "#0284C7" },
@@ -4,8 +4,8 @@ import { useFetchClient, useNotification } from "@strapi/strapi/admin";
4
4
  import styled, { css, keyframes } from "styled-components";
5
5
  import { Modal, Flex, Box, Typography, Badge, Divider, Button, Loader, SingleSelect, SingleSelectOption, Thead, Tr, Th, Tbody, Td, Table, TextInput } from "@strapi/design-system";
6
6
  import { Check, Information, Monitor, Server, Clock, Cross, Earth, Shield, Crown, Phone, Download, User, Eye, Trash, Search, Key } from "@strapi/icons";
7
- import { p as parseUserAgent, a as pluginId } from "./index-B-0VPfeF.mjs";
8
- import { u as useLicense } from "./useLicense-DUGjNbQ9.mjs";
7
+ import { p as parseUserAgent, a as pluginId } from "./index-DBRS3kt5.mjs";
8
+ import { u as useLicense } from "./useLicense-DSLL9n3Y.mjs";
9
9
  import { useNavigate } from "react-router-dom";
10
10
  const TwoColumnGrid = styled.div`
11
11
  display: grid;
@@ -6,8 +6,8 @@ const admin = require("@strapi/strapi/admin");
6
6
  const styled = require("styled-components");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
- const index = require("./index-W_QbTAYU.js");
10
- const useLicense = require("./useLicense-C_Rneohy.js");
9
+ const index = require("./index-DC8Y0qxx.js");
10
+ const useLicense = require("./useLicense-qgGfMvse.js");
11
11
  const reactRouterDom = require("react-router-dom");
12
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
13
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -4,7 +4,7 @@ import { Loader, Box, Alert, Flex, Typography, Button, Badge, Accordion } from "
4
4
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
5
5
  import { ArrowClockwise, Duplicate, Download, User, Shield, Sparkle, ChartBubble } from "@strapi/icons";
6
6
  import styled, { css, keyframes } from "styled-components";
7
- import { a as pluginId } from "./index-B-0VPfeF.mjs";
7
+ import { a as pluginId } from "./index-DBRS3kt5.mjs";
8
8
  const theme = {
9
9
  colors: {
10
10
  neutral: { 200: "#E5E7EB" }
@@ -6,7 +6,7 @@ const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const icons = require("@strapi/icons");
8
8
  const styled = require("styled-components");
9
- const index = require("./index-W_QbTAYU.js");
9
+ const index = require("./index-DC8Y0qxx.js");
10
10
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
11
11
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
12
12
  const theme = {
@@ -4,8 +4,8 @@ import { Flex, Loader, Typography, Button, Box, Badge, Accordion, Grid, SingleSe
4
4
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
5
5
  import { Check, Information, Cog, Trash, Shield, Code, Duplicate, Mail } from "@strapi/icons";
6
6
  import styled, { css, keyframes } from "styled-components";
7
- import { a as pluginId } from "./index-B-0VPfeF.mjs";
8
- import { u as useLicense } from "./useLicense-DUGjNbQ9.mjs";
7
+ import { a as pluginId } from "./index-DBRS3kt5.mjs";
8
+ import { u as useLicense } from "./useLicense-DSLL9n3Y.mjs";
9
9
  const theme = {
10
10
  colors: {
11
11
  primary: { 600: "#0284C7", 700: "#075985", 100: "#E0F2FE", 50: "#F0F9FF" },
@@ -6,8 +6,8 @@ const designSystem = require("@strapi/design-system");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const icons = require("@strapi/icons");
8
8
  const styled = require("styled-components");
9
- const index = require("./index-W_QbTAYU.js");
10
- const useLicense = require("./useLicense-C_Rneohy.js");
9
+ const index = require("./index-DC8Y0qxx.js");
10
+ const useLicense = require("./useLicense-qgGfMvse.js");
11
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
12
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
13
13
  const theme = {
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const es = {
4
+ "plugin.name": "Gestor de Sesiones",
5
+ "plugin.description": "Seguimiento de inicio/cierre de sesión y actividad de usuarios",
6
+ "settings.section": "Gestor de Sesiones",
7
+ "settings.sessions": "Sesiones Activas",
8
+ "settings.emailTemplates.title": "Plantillas de Correo",
9
+ "settings.emailTemplates.description": "Personalizar plantillas de notificación por correo con variables dinámicas",
10
+ "settings.emailTemplates.validate": "Validar",
11
+ "settings.emailTemplates.loadDefault": "Cargar Plantilla Predeterminada",
12
+ "settings.emailTemplates.subject": "Asunto del Correo",
13
+ "settings.emailTemplates.htmlTemplate": "Plantilla HTML",
14
+ "settings.emailTemplates.textTemplate": "Plantilla de Texto (Respaldo)",
15
+ "settings.emailTemplates.variables": "Variables Disponibles (clic para copiar)",
16
+ "settings.emailTemplates.validation.success": "¡Plantilla válida! Se encontraron {count} variables.",
17
+ "settings.emailTemplates.validation.warning": "No se encontraron variables en la plantilla. Agregue al menos una variable.",
18
+ "settings.emailTemplates.defaultLoaded": "¡Plantilla predeterminada cargada!",
19
+ "settings.emailTemplates.suspiciousLogin": "Inicio de Sesión Sospechoso",
20
+ "settings.emailTemplates.newLocation": "Nueva Ubicación",
21
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
22
+ };
23
+ exports.default = es;
@@ -0,0 +1,23 @@
1
+ const es = {
2
+ "plugin.name": "Gestor de Sesiones",
3
+ "plugin.description": "Seguimiento de inicio/cierre de sesión y actividad de usuarios",
4
+ "settings.section": "Gestor de Sesiones",
5
+ "settings.sessions": "Sesiones Activas",
6
+ "settings.emailTemplates.title": "Plantillas de Correo",
7
+ "settings.emailTemplates.description": "Personalizar plantillas de notificación por correo con variables dinámicas",
8
+ "settings.emailTemplates.validate": "Validar",
9
+ "settings.emailTemplates.loadDefault": "Cargar Plantilla Predeterminada",
10
+ "settings.emailTemplates.subject": "Asunto del Correo",
11
+ "settings.emailTemplates.htmlTemplate": "Plantilla HTML",
12
+ "settings.emailTemplates.textTemplate": "Plantilla de Texto (Respaldo)",
13
+ "settings.emailTemplates.variables": "Variables Disponibles (clic para copiar)",
14
+ "settings.emailTemplates.validation.success": "¡Plantilla válida! Se encontraron {count} variables.",
15
+ "settings.emailTemplates.validation.warning": "No se encontraron variables en la plantilla. Agregue al menos una variable.",
16
+ "settings.emailTemplates.defaultLoaded": "¡Plantilla predeterminada cargada!",
17
+ "settings.emailTemplates.suspiciousLogin": "Inicio de Sesión Sospechoso",
18
+ "settings.emailTemplates.newLocation": "Nueva Ubicación",
19
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
20
+ };
21
+ export {
22
+ es as default
23
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const fr = {
4
+ "plugin.name": "Gestionnaire de Sessions",
5
+ "plugin.description": "Suivi des connexions/déconnexions et activité des utilisateurs",
6
+ "settings.section": "Gestionnaire de Sessions",
7
+ "settings.sessions": "Sessions Actives",
8
+ "settings.emailTemplates.title": "Modèles d'Email",
9
+ "settings.emailTemplates.description": "Personnaliser les modèles de notification par email avec des variables dynamiques",
10
+ "settings.emailTemplates.validate": "Valider",
11
+ "settings.emailTemplates.loadDefault": "Charger le Modèle par Défaut",
12
+ "settings.emailTemplates.subject": "Objet de l'Email",
13
+ "settings.emailTemplates.htmlTemplate": "Modèle HTML",
14
+ "settings.emailTemplates.textTemplate": "Modèle Texte (Secours)",
15
+ "settings.emailTemplates.variables": "Variables Disponibles (cliquez pour copier)",
16
+ "settings.emailTemplates.validation.success": "Modèle valide! {count} variables trouvées.",
17
+ "settings.emailTemplates.validation.warning": "Aucune variable trouvée dans le modèle. Ajoutez au moins une variable.",
18
+ "settings.emailTemplates.defaultLoaded": "Modèle par défaut chargé!",
19
+ "settings.emailTemplates.suspiciousLogin": "Connexion Suspecte",
20
+ "settings.emailTemplates.newLocation": "Nouvelle Localisation",
21
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
22
+ };
23
+ exports.default = fr;
@@ -0,0 +1,23 @@
1
+ const fr = {
2
+ "plugin.name": "Gestionnaire de Sessions",
3
+ "plugin.description": "Suivi des connexions/déconnexions et activité des utilisateurs",
4
+ "settings.section": "Gestionnaire de Sessions",
5
+ "settings.sessions": "Sessions Actives",
6
+ "settings.emailTemplates.title": "Modèles d'Email",
7
+ "settings.emailTemplates.description": "Personnaliser les modèles de notification par email avec des variables dynamiques",
8
+ "settings.emailTemplates.validate": "Valider",
9
+ "settings.emailTemplates.loadDefault": "Charger le Modèle par Défaut",
10
+ "settings.emailTemplates.subject": "Objet de l'Email",
11
+ "settings.emailTemplates.htmlTemplate": "Modèle HTML",
12
+ "settings.emailTemplates.textTemplate": "Modèle Texte (Secours)",
13
+ "settings.emailTemplates.variables": "Variables Disponibles (cliquez pour copier)",
14
+ "settings.emailTemplates.validation.success": "Modèle valide! {count} variables trouvées.",
15
+ "settings.emailTemplates.validation.warning": "Aucune variable trouvée dans le modèle. Ajoutez au moins une variable.",
16
+ "settings.emailTemplates.defaultLoaded": "Modèle par défaut chargé!",
17
+ "settings.emailTemplates.suspiciousLogin": "Connexion Suspecte",
18
+ "settings.emailTemplates.newLocation": "Nouvelle Localisation",
19
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
20
+ };
21
+ export {
22
+ fr as default
23
+ };
@@ -50,7 +50,7 @@ const parseUserAgent = (userAgent) => {
50
50
  browser = "Opera";
51
51
  } else if (ua.includes("curl/")) {
52
52
  browser = "cURL";
53
- deviceIcon = "⚙️";
53
+ deviceIcon = "gear";
54
54
  device = "API Client";
55
55
  } else if (ua.includes("postman")) {
56
56
  browser = "Postman";
@@ -403,7 +403,7 @@ const index = {
403
403
  id: `${pluginId}.plugin.name`,
404
404
  defaultMessage: pluginPkg.strapi.displayName
405
405
  },
406
- Component: () => import("./App-Zhs_vt59.mjs")
406
+ Component: () => import("./App-BXpIS12l.mjs")
407
407
  });
408
408
  app.createSettingSection(
409
409
  {
@@ -419,7 +419,7 @@ const index = {
419
419
  },
420
420
  id: "general",
421
421
  to: `/settings/${pluginId}/general`,
422
- Component: () => import("./Settings-CL2im8M3.mjs")
422
+ Component: () => import("./Settings-0ocB3qHk.mjs")
423
423
  },
424
424
  {
425
425
  intlLabel: {
@@ -428,7 +428,7 @@ const index = {
428
428
  },
429
429
  id: "analytics",
430
430
  to: `/settings/${pluginId}/analytics`,
431
- Component: () => import("./Analytics-CwyLwdOZ.mjs")
431
+ Component: () => import("./Analytics-mYu_uGwU.mjs")
432
432
  },
433
433
  {
434
434
  intlLabel: {
@@ -437,7 +437,7 @@ const index = {
437
437
  },
438
438
  id: "license",
439
439
  to: `/settings/${pluginId}/license`,
440
- Component: () => import("./License-CPI0p_W8.mjs")
440
+ Component: () => import("./License-C03C2j9P.mjs")
441
441
  }
442
442
  ]
443
443
  );
@@ -461,7 +461,7 @@ const index = {
461
461
  id: "online-users-widget",
462
462
  pluginId
463
463
  });
464
- console.log(`[${pluginId}] Online Users Widget registered`);
464
+ console.log(`[${pluginId}] [SUCCESS] Online Users Widget registered`);
465
465
  }
466
466
  },
467
467
  bootstrap(app) {
@@ -471,7 +471,7 @@ const index = {
471
471
  if (contentManagerPlugin && contentManagerPlugin.apis) {
472
472
  console.log(`[${pluginId}] Injecting SessionInfoPanel into edit view sidebar...`);
473
473
  contentManagerPlugin.apis.addEditViewSidePanel([SessionInfoPanel]);
474
- console.log(`[${pluginId}] SessionInfoPanel injected successfully`);
474
+ console.log(`[${pluginId}] [SUCCESS] SessionInfoPanel injected successfully`);
475
475
  } else {
476
476
  console.warn(`[${pluginId}] Content Manager plugin or APIs not available`);
477
477
  }
@@ -482,7 +482,10 @@ const index = {
482
482
  async registerTrads({ locales }) {
483
483
  const importedTrads = {
484
484
  en: () => import("./en-CsPpPJL3.mjs"),
485
- de: () => import("./de-CdO3s01z.mjs")
485
+ de: () => import("./de-CdO3s01z.mjs"),
486
+ es: () => import("./es-Dkmjhy9c.mjs"),
487
+ fr: () => import("./fr-Bssg_3UF.mjs"),
488
+ pt: () => import("./pt-BVNoNcuY.mjs")
486
489
  };
487
490
  const translatedLanguages = Object.keys(importedTrads).filter(
488
491
  (lang) => locales.includes(lang)
@@ -51,7 +51,7 @@ const parseUserAgent = (userAgent) => {
51
51
  browser = "Opera";
52
52
  } else if (ua.includes("curl/")) {
53
53
  browser = "cURL";
54
- deviceIcon = "⚙️";
54
+ deviceIcon = "gear";
55
55
  device = "API Client";
56
56
  } else if (ua.includes("postman")) {
57
57
  browser = "Postman";
@@ -404,7 +404,7 @@ const index = {
404
404
  id: `${pluginId}.plugin.name`,
405
405
  defaultMessage: pluginPkg.strapi.displayName
406
406
  },
407
- Component: () => Promise.resolve().then(() => require("./App-nGu2Eb87.js"))
407
+ Component: () => Promise.resolve().then(() => require("./App-DdnUYWbC.js"))
408
408
  });
409
409
  app.createSettingSection(
410
410
  {
@@ -420,7 +420,7 @@ const index = {
420
420
  },
421
421
  id: "general",
422
422
  to: `/settings/${pluginId}/general`,
423
- Component: () => Promise.resolve().then(() => require("./Settings-Lkmxisuv.js"))
423
+ Component: () => Promise.resolve().then(() => require("./Settings-C6_CqpCC.js"))
424
424
  },
425
425
  {
426
426
  intlLabel: {
@@ -429,7 +429,7 @@ const index = {
429
429
  },
430
430
  id: "analytics",
431
431
  to: `/settings/${pluginId}/analytics`,
432
- Component: () => Promise.resolve().then(() => require("./Analytics-DRzCKaDF.js"))
432
+ Component: () => Promise.resolve().then(() => require("./Analytics-ioaeEh-E.js"))
433
433
  },
434
434
  {
435
435
  intlLabel: {
@@ -438,7 +438,7 @@ const index = {
438
438
  },
439
439
  id: "license",
440
440
  to: `/settings/${pluginId}/license`,
441
- Component: () => Promise.resolve().then(() => require("./License-k5vvhgKr.js"))
441
+ Component: () => Promise.resolve().then(() => require("./License-DZYrOgcx.js"))
442
442
  }
443
443
  ]
444
444
  );
@@ -462,7 +462,7 @@ const index = {
462
462
  id: "online-users-widget",
463
463
  pluginId
464
464
  });
465
- console.log(`[${pluginId}] Online Users Widget registered`);
465
+ console.log(`[${pluginId}] [SUCCESS] Online Users Widget registered`);
466
466
  }
467
467
  },
468
468
  bootstrap(app) {
@@ -472,7 +472,7 @@ const index = {
472
472
  if (contentManagerPlugin && contentManagerPlugin.apis) {
473
473
  console.log(`[${pluginId}] Injecting SessionInfoPanel into edit view sidebar...`);
474
474
  contentManagerPlugin.apis.addEditViewSidePanel([SessionInfoPanel]);
475
- console.log(`[${pluginId}] SessionInfoPanel injected successfully`);
475
+ console.log(`[${pluginId}] [SUCCESS] SessionInfoPanel injected successfully`);
476
476
  } else {
477
477
  console.warn(`[${pluginId}] Content Manager plugin or APIs not available`);
478
478
  }
@@ -483,7 +483,10 @@ const index = {
483
483
  async registerTrads({ locales }) {
484
484
  const importedTrads = {
485
485
  en: () => Promise.resolve().then(() => require("./en-RqmpDHdS.js")),
486
- de: () => Promise.resolve().then(() => require("./de-BxFx1pwE.js"))
486
+ de: () => Promise.resolve().then(() => require("./de-BxFx1pwE.js")),
487
+ es: () => Promise.resolve().then(() => require("./es-CuLHazN1.js")),
488
+ fr: () => Promise.resolve().then(() => require("./fr-BAJp2yhI.js")),
489
+ pt: () => Promise.resolve().then(() => require("./pt-BAP9cKs3.js"))
487
490
  };
488
491
  const translatedLanguages = Object.keys(importedTrads).filter(
489
492
  (lang) => locales.includes(lang)
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pt = {
4
+ "plugin.name": "Gerenciador de Sessões",
5
+ "plugin.description": "Rastreamento de login/logout e atividade de usuários",
6
+ "settings.section": "Gerenciador de Sessões",
7
+ "settings.sessions": "Sessões Ativas",
8
+ "settings.emailTemplates.title": "Modelos de Email",
9
+ "settings.emailTemplates.description": "Personalizar modelos de notificação por email com variáveis dinâmicas",
10
+ "settings.emailTemplates.validate": "Validar",
11
+ "settings.emailTemplates.loadDefault": "Carregar Modelo Padrão",
12
+ "settings.emailTemplates.subject": "Assunto do Email",
13
+ "settings.emailTemplates.htmlTemplate": "Modelo HTML",
14
+ "settings.emailTemplates.textTemplate": "Modelo de Texto (Reserva)",
15
+ "settings.emailTemplates.variables": "Variáveis Disponíveis (clique para copiar)",
16
+ "settings.emailTemplates.validation.success": "Modelo válido! {count} variáveis encontradas.",
17
+ "settings.emailTemplates.validation.warning": "Nenhuma variável encontrada no modelo. Adicione pelo menos uma variável.",
18
+ "settings.emailTemplates.defaultLoaded": "Modelo padrão carregado!",
19
+ "settings.emailTemplates.suspiciousLogin": "Login Suspeito",
20
+ "settings.emailTemplates.newLocation": "Nova Localização",
21
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
22
+ };
23
+ exports.default = pt;
@@ -0,0 +1,23 @@
1
+ const pt = {
2
+ "plugin.name": "Gerenciador de Sessões",
3
+ "plugin.description": "Rastreamento de login/logout e atividade de usuários",
4
+ "settings.section": "Gerenciador de Sessões",
5
+ "settings.sessions": "Sessões Ativas",
6
+ "settings.emailTemplates.title": "Modelos de Email",
7
+ "settings.emailTemplates.description": "Personalizar modelos de notificação por email com variáveis dinâmicas",
8
+ "settings.emailTemplates.validate": "Validar",
9
+ "settings.emailTemplates.loadDefault": "Carregar Modelo Padrão",
10
+ "settings.emailTemplates.subject": "Assunto do Email",
11
+ "settings.emailTemplates.htmlTemplate": "Modelo HTML",
12
+ "settings.emailTemplates.textTemplate": "Modelo de Texto (Reserva)",
13
+ "settings.emailTemplates.variables": "Variáveis Disponíveis (clique para copiar)",
14
+ "settings.emailTemplates.validation.success": "Modelo válido! {count} variáveis encontradas.",
15
+ "settings.emailTemplates.validation.warning": "Nenhuma variável encontrada no modelo. Adicione pelo menos uma variável.",
16
+ "settings.emailTemplates.defaultLoaded": "Modelo padrão carregado!",
17
+ "settings.emailTemplates.suspiciousLogin": "Login Suspeito",
18
+ "settings.emailTemplates.newLocation": "Nova Localização",
19
+ "settings.emailTemplates.vpnProxy": "VPN/Proxy"
20
+ };
21
+ export {
22
+ pt as default
23
+ };
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect } from "react";
2
2
  import { useFetchClient } from "@strapi/strapi/admin";
3
- import { a as pluginId } from "./index-B-0VPfeF.mjs";
3
+ import { a as pluginId } from "./index-DBRS3kt5.mjs";
4
4
  const useLicense = () => {
5
5
  const { get } = useFetchClient();
6
6
  const [isPremium, setIsPremium] = useState(false);
@@ -43,7 +43,7 @@ const useLicense = () => {
43
43
  if ((newIsPremium !== isPremium || !silent) && !silent) {
44
44
  console.log(`[magic-sessionmanager/useLicense] Premium Status: ${newIsPremium} (valid: ${isValid}, featurePremium: ${hasPremiumFeature})`);
45
45
  if (!newIsPremium && isValid) {
46
- console.warn("[magic-sessionmanager/useLicense] ⚠️ License is valid but Premium feature is not enabled!");
46
+ console.warn("[magic-sessionmanager/useLicense] [WARN] License is valid but Premium feature is not enabled!");
47
47
  }
48
48
  }
49
49
  setIsPremium(newIsPremium);