strapi-plugin-magic-sessionmanager 4.6.3 → 4.7.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 (31) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +20 -12
  3. package/dist/admin/{Analytics-BMkhiuRX.js → Analytics-Cw6R2xZn.js} +5 -1
  4. package/dist/admin/{Analytics-CwNJ3TNI.mjs → Analytics-Dq8PuDhs.mjs} +5 -1
  5. package/dist/admin/{App-Sk0F9UEN.mjs → App-BIFTc3mk.mjs} +36 -6
  6. package/dist/admin/{App-DazHh7Zi.js → App-DLR2M3FT.js} +36 -6
  7. package/dist/admin/{License-BwbmzbP_.js → License-BZtjgFol.js} +1 -1
  8. package/dist/admin/{License-6SIpR7Rk.mjs → License-W_NPUWIn.mjs} +1 -1
  9. package/dist/admin/{OnlineUsersWidget-Qq_uCTi1.mjs → OnlineUsersWidget-BIbmzgLP.mjs} +1 -1
  10. package/dist/admin/{OnlineUsersWidget-BIfnbFcZ.js → OnlineUsersWidget-CAdR0MfU.js} +1 -1
  11. package/dist/admin/{Settings-BA7S_8DF.mjs → Settings-BNu9EAuS.mjs} +10 -10
  12. package/dist/admin/{Settings-CCYScjxv.js → Settings-DWaflQdm.js} +10 -10
  13. package/dist/admin/{de-6rIvkYOp.mjs → de-4pAz-Ihh.mjs} +4 -3
  14. package/dist/admin/{de-DjP2WJ_V.js → de-jU7AaYIc.js} +4 -3
  15. package/dist/admin/{en-8hiv31Dv.mjs → en-BI_aBNXG.mjs} +4 -3
  16. package/dist/admin/{en-0pesBbOT.js → en-Tjp9AEhR.js} +4 -3
  17. package/dist/admin/{es-DdBRpF7F.js → es-BCgwFZPL.js} +4 -3
  18. package/dist/admin/{es-LRQ148f5.mjs → es-Bp4Uzf5h.mjs} +4 -3
  19. package/dist/admin/{fr-CKhx_qil.mjs → fr-B69qIjq2.mjs} +4 -3
  20. package/dist/admin/{fr-DJ6DbeDy.js → fr-Di5zo4wy.js} +4 -3
  21. package/dist/admin/{index-DTskQVDl.js → index-CBS3aqCW.js} +10 -10
  22. package/dist/admin/{index-UTLA1r40.mjs → index-eSND7TDx.mjs} +10 -10
  23. package/dist/admin/index.js +1 -1
  24. package/dist/admin/index.mjs +1 -1
  25. package/dist/admin/{pt-D0SMoAmo.js → pt-DlGYOi6D.js} +4 -3
  26. package/dist/admin/{pt-DXizUvcj.mjs → pt-Drc-di4D.mjs} +4 -3
  27. package/dist/server/index.js +443 -139
  28. package/dist/server/index.mjs +443 -139
  29. package/package.json +7 -7
  30. package/scripts/geoip-updater.cjs +39 -4
  31. package/scripts/update-geoip-db.mjs +1 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # [4.7.0](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.6.4...v4.7.0) (2026-07-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * define analytics float animation ([e248680](https://github.com/Schero94/Magic-Sessionmanager/commit/e248680989e68b4cf082d50b565e978ce50d316d))
7
+
8
+
9
+ ### Features
10
+
11
+ * support local GeoLite2 City database ([298d2a0](https://github.com/Schero94/Magic-Sessionmanager/commit/298d2a0948dd1a08f06ee70ada3953ed7d4dd2e6))
12
+
13
+ ## [4.6.4](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.6.3...v4.6.4) (2026-07-09)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * harden geoip and session handling ([22729d4](https://github.com/Schero94/Magic-Sessionmanager/commit/22729d4fde406d62fe6f61e0a048903c7071b062))
19
+
1
20
  ## [4.6.3](https://github.com/Schero94/Magic-Sessionmanager/compare/v4.6.2...v4.6.3) (2026-06-23)
2
21
 
3
22
 
package/README.md CHANGED
@@ -283,17 +283,21 @@ Add to `config/plugins.ts`:
283
283
 
284
284
  ### Local GeoIP Firewall (Recommended)
285
285
 
286
- For login blocking, use a local MaxMind GeoLite2 Country database. This avoids
287
- remote API timeouts and rate limits in the login path.
286
+ For login blocking and city-level session display, use a local MaxMind
287
+ GeoLite2 City database. This avoids remote API timeouts and rate limits in the
288
+ login path while still giving the admin UI city, region, timezone and
289
+ coordinates. Existing GeoLite2 Country databases remain supported as a
290
+ country-only fallback.
288
291
 
289
- 1. Create a free MaxMind account and download `GeoLite2-Country.mmdb`:
292
+ 1. Create a free MaxMind account and download `GeoLite2-City.mmdb`:
290
293
  https://dev.maxmind.com/geoip/geolite2-free-geolocation-data/
291
294
  2. Store the file on your Strapi server, for example:
292
- `/var/lib/strapi/GeoLite2-Country.mmdb`
295
+ `/var/lib/strapi/GeoLite2-City.mmdb`
293
296
  3. Configure the plugin:
294
297
 
295
298
  ```bash
296
- MAGIC_SESSIONMANAGER_GEOIP_DATABASE=/var/lib/strapi/GeoLite2-Country.mmdb
299
+ MAGIC_SESSIONMANAGER_GEOIP_DATABASE=/var/lib/strapi/GeoLite2-City.mmdb
300
+ MAXMIND_EDITION_ID=GeoLite2-City
297
301
  MAXMIND_ACCOUNT_ID=your-account-id
298
302
  MAXMIND_LICENSE_KEY=your-license-key
299
303
  ```
@@ -311,6 +315,7 @@ Strapi plugin store instead):
311
315
  ```bash
312
316
  export MAXMIND_ACCOUNT_ID=your_account_id
313
317
  export MAXMIND_LICENSE_KEY=your_license_key
318
+ export MAXMIND_EDITION_ID=GeoLite2-City
314
319
  npm run geoip:update
315
320
  ```
316
321
 
@@ -352,9 +357,11 @@ Provider options:
352
357
  - `ipapi`: legacy remote provider
353
358
  - `disabled`: no GEOIP lookup
354
359
 
355
- Country firewall rules use the local database. VPN/proxy/threat detection still
356
- requires a provider that supplies those risk signals; a free country database
357
- does not reliably identify VPNs or proxies.
360
+ Local City and Country databases both support country firewall rules. City
361
+ databases additionally populate city, region, timezone, coordinates and postal
362
+ data for the admin UI. VPN/proxy/threat detection still requires a provider
363
+ that supplies those risk signals; free GeoLite databases do not reliably
364
+ identify VPNs or proxies.
358
365
 
359
366
  ### Threat Detection
360
367
 
@@ -491,7 +498,7 @@ Authorization: Bearer <JWT>
491
498
  {
492
499
  "data": [
493
500
  {
494
- "id": 41,
501
+ "id": "abc123xyz",
495
502
  "documentId": "abc123xyz",
496
503
  "sessionId": "sess_m5k2h_8a3b1c2d_f9e8d7c6",
497
504
  "ipAddress": "192.168.1.100",
@@ -510,7 +517,7 @@ Authorization: Bearer <JWT>
510
517
  "minutesSinceActive": 2
511
518
  },
512
519
  {
513
- "id": 40,
520
+ "id": "def456uvw",
514
521
  "documentId": "def456uvw",
515
522
  "sessionId": "sess_m5k1g_7b2a0c1d_e8d7c6b5",
516
523
  "ipAddress": "10.0.0.50",
@@ -549,7 +556,7 @@ Authorization: Bearer <JWT>
549
556
  ```json
550
557
  {
551
558
  "data": {
552
- "id": 41,
559
+ "id": "abc123xyz",
553
560
  "documentId": "abc123xyz",
554
561
  "sessionId": "sess_m5k2h_8a3b1c2d_f9e8d7c6",
555
562
  "ipAddress": "192.168.1.100",
@@ -605,9 +612,10 @@ Authorization: Bearer <JWT>
605
612
  ### Terminate Specific Session
606
613
 
607
614
  Terminates a specific session (not the current one). Useful for "Log out other devices".
615
+ Use the `id` / `documentId` value from the session response. The separate `sessionId` field is a tracking identifier stored on the session record.
608
616
 
609
617
  ```bash
610
- DELETE /api/magic-sessionmanager/my-sessions/:sessionId
618
+ DELETE /api/magic-sessionmanager/my-sessions/:documentId
611
619
  Authorization: Bearer <JWT>
612
620
  ```
613
621
 
@@ -6,7 +6,7 @@ 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-DTskQVDl.js");
9
+ const index = require("./index-CBS3aqCW.js");
10
10
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
11
11
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
12
12
  const theme = {
@@ -39,6 +39,10 @@ const pulse = styled.keyframes`
39
39
  0%, 100% { opacity: 1; }
40
40
  50% { opacity: 0.8; }
41
41
  `;
42
+ const float = styled.keyframes`
43
+ 0%, 100% { transform: translateY(0px); }
44
+ 50% { transform: translateY(-5px); }
45
+ `;
42
46
  const growBar = styled.keyframes`
43
47
  from { width: 0; }
44
48
  to { width: var(--bar-width); }
@@ -4,7 +4,7 @@ import { useFetchClient } from "@strapi/strapi/admin";
4
4
  import styled, { css, keyframes } from "styled-components";
5
5
  import { Loader, Flex, Box, Badge, Typography } from "@strapi/design-system";
6
6
  import { ChartBubble, User, Clock, Monitor } from "@strapi/icons";
7
- import { a as pluginId } from "./index-UTLA1r40.mjs";
7
+ import { a as pluginId } from "./index-eSND7TDx.mjs";
8
8
  const theme = {
9
9
  shadows: {
10
10
  sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
@@ -35,6 +35,10 @@ const pulse = keyframes`
35
35
  0%, 100% { opacity: 1; }
36
36
  50% { opacity: 0.8; }
37
37
  `;
38
+ const float = keyframes`
39
+ 0%, 100% { transform: translateY(0px); }
40
+ 50% { transform: translateY(-5px); }
41
+ `;
38
42
  const growBar = keyframes`
39
43
  from { width: 0; }
40
44
  to { width: var(--bar-width); }
@@ -3,7 +3,7 @@ import { useState, useEffect } from "react";
3
3
  import { useIntl } from "react-intl";
4
4
  import { useFetchClient, useNotification, Page } from "@strapi/strapi/admin";
5
5
  import styled, { css, keyframes } from "styled-components";
6
- import { p as parseUserAgent, a as pluginId$1, g as getTranslation } from "./index-UTLA1r40.mjs";
6
+ import { p as parseUserAgent, a as pluginId$1, g as getTranslation } from "./index-eSND7TDx.mjs";
7
7
  import { Modal, Flex, Box, Typography, Divider, Button, Loader, SingleSelect, SingleSelectOption, Thead, Tr, Th, Tbody, Td, Table } from "@strapi/design-system";
8
8
  import { Check, Information, Monitor, Server, Clock, Cross, Earth, Shield, Phone, Download, User, Eye, Trash, Search } from "@strapi/icons";
9
9
  import { S as ShowHideButton, T as TertiaryButton, D as DangerButton, I as IconButtonPrimary, a as IconButtonWarning, b as IconButtonDanger } from "./StyledButtons-Cz8oYhmc.mjs";
@@ -94,11 +94,33 @@ const StatusDot$1 = styled.span`
94
94
  background: var(--colors-neutral500);
95
95
  `}
96
96
 
97
- @keyframes pulse-green {
98
- 0%, 100% { opacity: 1; transform: scale(1); }
99
- 50% { opacity: 0.7; transform: scale(1.15); }
97
+ @keyframes pulse-green {
98
+ 0%, 100% { opacity: 1; transform: scale(1); }
99
+ 50% { opacity: 0.7; transform: scale(1.15); }
100
+ }
101
+ `;
102
+ const getStoredGeoData = (session) => {
103
+ let geoLocation = session?.geoLocation;
104
+ if (typeof geoLocation === "string") {
105
+ try {
106
+ geoLocation = JSON.parse(geoLocation);
107
+ } catch {
108
+ geoLocation = null;
109
+ }
100
110
  }
101
- `;
111
+ if (!geoLocation || typeof geoLocation !== "object") return null;
112
+ if (!geoLocation.country && !geoLocation.country_code && !geoLocation.city) return null;
113
+ return {
114
+ country_flag: geoLocation.country_flag || "",
115
+ country: geoLocation.country || geoLocation.country_code || "Unknown",
116
+ city: geoLocation.city || "Unknown",
117
+ timezone: geoLocation.timezone || "Unknown",
118
+ securityScore: typeof session.securityScore === "number" ? session.securityScore : 100,
119
+ riskLevel: typeof session.securityScore === "number" && session.securityScore < 50 ? "High" : "Low",
120
+ isVpn: false,
121
+ isProxy: false
122
+ };
123
+ };
102
124
  const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
103
125
  const { formatMessage } = useIntl();
104
126
  const { get, post } = useFetchClient();
@@ -111,6 +133,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
111
133
  useEffect(() => {
112
134
  let cancelled = false;
113
135
  const ipAddress = session?.ipAddress;
136
+ const storedGeoData = getStoredGeoData(session);
114
137
  if (!ipAddress) {
115
138
  setGeoData(null);
116
139
  setGeoLoading(false);
@@ -118,6 +141,13 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
118
141
  cancelled = true;
119
142
  };
120
143
  }
144
+ if (storedGeoData) {
145
+ setGeoData(storedGeoData);
146
+ setGeoLoading(false);
147
+ return () => {
148
+ cancelled = true;
149
+ };
150
+ }
121
151
  const fetchGeolocationData = async () => {
122
152
  setGeoData(null);
123
153
  setGeoLoading(true);
@@ -150,7 +180,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
150
180
  return () => {
151
181
  cancelled = true;
152
182
  };
153
- }, [get, session?.ipAddress]);
183
+ }, [get, session]);
154
184
  if (!session) return null;
155
185
  const deviceInfo = parseUserAgent(session.userAgent);
156
186
  const isOnline = session.isTrulyActive;
@@ -5,7 +5,7 @@ const react = require("react");
5
5
  const reactIntl = require("react-intl");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const styled = require("styled-components");
8
- const index = require("./index-DTskQVDl.js");
8
+ const index = require("./index-CBS3aqCW.js");
9
9
  const designSystem = require("@strapi/design-system");
10
10
  const icons = require("@strapi/icons");
11
11
  const StyledButtons = require("./StyledButtons-DDuxnYz8.js");
@@ -98,11 +98,33 @@ const StatusDot$1 = styled__default.default.span`
98
98
  background: var(--colors-neutral500);
99
99
  `}
100
100
 
101
- @keyframes pulse-green {
102
- 0%, 100% { opacity: 1; transform: scale(1); }
103
- 50% { opacity: 0.7; transform: scale(1.15); }
101
+ @keyframes pulse-green {
102
+ 0%, 100% { opacity: 1; transform: scale(1); }
103
+ 50% { opacity: 0.7; transform: scale(1.15); }
104
+ }
105
+ `;
106
+ const getStoredGeoData = (session) => {
107
+ let geoLocation = session?.geoLocation;
108
+ if (typeof geoLocation === "string") {
109
+ try {
110
+ geoLocation = JSON.parse(geoLocation);
111
+ } catch {
112
+ geoLocation = null;
113
+ }
104
114
  }
105
- `;
115
+ if (!geoLocation || typeof geoLocation !== "object") return null;
116
+ if (!geoLocation.country && !geoLocation.country_code && !geoLocation.city) return null;
117
+ return {
118
+ country_flag: geoLocation.country_flag || "",
119
+ country: geoLocation.country || geoLocation.country_code || "Unknown",
120
+ city: geoLocation.city || "Unknown",
121
+ timezone: geoLocation.timezone || "Unknown",
122
+ securityScore: typeof session.securityScore === "number" ? session.securityScore : 100,
123
+ riskLevel: typeof session.securityScore === "number" && session.securityScore < 50 ? "High" : "Low",
124
+ isVpn: false,
125
+ isProxy: false
126
+ };
127
+ };
106
128
  const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
107
129
  const { formatMessage } = reactIntl.useIntl();
108
130
  const { get, post } = admin.useFetchClient();
@@ -115,6 +137,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
115
137
  react.useEffect(() => {
116
138
  let cancelled = false;
117
139
  const ipAddress = session?.ipAddress;
140
+ const storedGeoData = getStoredGeoData(session);
118
141
  if (!ipAddress) {
119
142
  setGeoData(null);
120
143
  setGeoLoading(false);
@@ -122,6 +145,13 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
122
145
  cancelled = true;
123
146
  };
124
147
  }
148
+ if (storedGeoData) {
149
+ setGeoData(storedGeoData);
150
+ setGeoLoading(false);
151
+ return () => {
152
+ cancelled = true;
153
+ };
154
+ }
125
155
  const fetchGeolocationData = async () => {
126
156
  setGeoData(null);
127
157
  setGeoLoading(true);
@@ -154,7 +184,7 @@ const SessionDetailModal = ({ session, onClose, onSessionTerminated }) => {
154
184
  return () => {
155
185
  cancelled = true;
156
186
  };
157
- }, [get, session?.ipAddress]);
187
+ }, [get, session]);
158
188
  if (!session) return null;
159
189
  const deviceInfo = index.parseUserAgent(session.userAgent);
160
190
  const isOnline = session.isTrulyActive;
@@ -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-DTskQVDl.js");
9
+ const index = require("./index-CBS3aqCW.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,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-UTLA1r40.mjs";
7
+ import { a as pluginId } from "./index-eSND7TDx.mjs";
8
8
  const theme = {
9
9
  borderRadius: { lg: "12px" }
10
10
  };
@@ -4,7 +4,7 @@ import { useIntl } from "react-intl";
4
4
  import { Box, Typography, Flex, Grid } from "@strapi/design-system";
5
5
  import { Check, Cross, Clock, User } from "@strapi/icons";
6
6
  import { useFetchClient } from "@strapi/strapi/admin";
7
- import { g as getTranslation } from "./index-UTLA1r40.mjs";
7
+ import { g as getTranslation } from "./index-eSND7TDx.mjs";
8
8
  function getSessionUserKey(session) {
9
9
  return session?.user?.documentId || session?.user?.id || session?.user?.email || session?.user?.username || null;
10
10
  }
@@ -6,7 +6,7 @@ const reactIntl = require("react-intl");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const icons = require("@strapi/icons");
8
8
  const admin = require("@strapi/strapi/admin");
9
- const index = require("./index-DTskQVDl.js");
9
+ const index = require("./index-CBS3aqCW.js");
10
10
  function getSessionUserKey(session) {
11
11
  return session?.user?.documentId || session?.user?.id || session?.user?.email || session?.user?.username || null;
12
12
  }
@@ -5,7 +5,7 @@ import { Flex, Loader, Typography, Button, Box, Accordion, Grid, SingleSelect, S
5
5
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
6
6
  import { Check, Cog, Trash, Shield, Code, Duplicate, Clock, Mail } from "@strapi/icons";
7
7
  import styled, { css, keyframes } from "styled-components";
8
- import { a as pluginId, g as getTranslation } from "./index-UTLA1r40.mjs";
8
+ import { a as pluginId, g as getTranslation } from "./index-eSND7TDx.mjs";
9
9
  import { D as DangerButton, S as ShowHideButton, G as GradientButton, C as CopyButton, T as TertiaryButton, c as SecondaryButton } from "./StyledButtons-Cz8oYhmc.mjs";
10
10
  const COUNTRIES = [
11
11
  { code: "DE", name: "Germany", flag: "🇩🇪" },
@@ -510,22 +510,27 @@ const GeofencingPanel = ({
510
510
  name: "geoIpDatabasePath",
511
511
  value: settings.geoIpDatabasePath || "",
512
512
  onChange: (e) => handleChange("geoIpDatabasePath", e.target.value),
513
- placeholder: "/var/lib/strapi/GeoLite2-Country.mmdb"
513
+ placeholder: "/var/lib/strapi/GeoLite2-City.mmdb"
514
514
  }
515
515
  )
516
516
  ] }) }),
517
517
  /* @__PURE__ */ jsx(Grid.Item, { col: 12, children: /* @__PURE__ */ jsx(Box, { padding: 3, background: "neutral100", hasRadius: true, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
518
518
  /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "center", gap: 3, children: [
519
519
  /* @__PURE__ */ jsxs(Box, { children: [
520
- /* @__PURE__ */ jsx(Typography, { variant: "delta", style: { display: "block", marginBottom: "4px" }, children: t("settings.geofencing.database.title", "Local GeoIP Database") }),
521
- /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: geoIpStatus?.exists ? t("settings.geofencing.database.exists", "Database is installed locally.") : t("settings.geofencing.database.missing", "No local database installed yet.") })
520
+ /* @__PURE__ */ jsx(Typography, { variant: "delta", style: { display: "block", marginBottom: "4px" }, children: t("settings.geofencing.database.title", "Local GeoIP Database (City recommended)") }),
521
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: geoIpStatus?.exists ? t("settings.geofencing.database.exists", "Database is installed locally. GeoLite2-City enables city-level lookup; Country remains supported.") : t("settings.geofencing.database.missing", "No local database installed yet. GeoLite2-City is recommended for city-level lookup.") })
522
522
  ] }),
523
523
  /* @__PURE__ */ jsx(Badge, { backgroundColor: geoIpStatus?.exists ? "success100" : "warning100", children: geoIpStatus?.exists ? t("settings.geofencing.database.installed", "Installed") : t("settings.geofencing.database.notInstalled", "Missing") })
524
524
  ] }),
525
525
  /* @__PURE__ */ jsxs(Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: [
526
526
  t("settings.geofencing.database.path", "Path"),
527
527
  ": ",
528
- geoIpStatus?.databasePath || settings.geoIpDatabasePath || "data/GeoLite2-Country.mmdb"
528
+ geoIpStatus?.databasePath || settings.geoIpDatabasePath || "data/GeoLite2-City.mmdb"
529
+ ] }),
530
+ /* @__PURE__ */ jsxs(Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: [
531
+ t("settings.geofencing.database.edition", "Edition"),
532
+ ": ",
533
+ geoIpStatus?.editionId || "GeoLite2-City"
529
534
  ] }),
530
535
  geoIpStatus?.metadata?.lastModified && /* @__PURE__ */ jsxs(Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: [
531
536
  t("settings.geofencing.database.lastModified", "Last MaxMind update"),
@@ -813,11 +818,6 @@ const SettingsPage = () => {
813
818
  message: t("notifications.success.saved", "Settings saved successfully to database!")
814
819
  });
815
820
  setHasChanges(false);
816
- try {
817
- localStorage.setItem(`${pluginId}-settings`, JSON.stringify(settings));
818
- } catch (localErr) {
819
- console.warn("[Settings] Could not save to localStorage:", localErr);
820
- }
821
821
  } else {
822
822
  throw new Error("Save failed");
823
823
  }
@@ -7,7 +7,7 @@ const designSystem = require("@strapi/design-system");
7
7
  const admin = require("@strapi/strapi/admin");
8
8
  const icons = require("@strapi/icons");
9
9
  const styled = require("styled-components");
10
- const index = require("./index-DTskQVDl.js");
10
+ const index = require("./index-CBS3aqCW.js");
11
11
  const StyledButtons = require("./StyledButtons-DDuxnYz8.js");
12
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
13
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -514,22 +514,27 @@ const GeofencingPanel = ({
514
514
  name: "geoIpDatabasePath",
515
515
  value: settings.geoIpDatabasePath || "",
516
516
  onChange: (e) => handleChange("geoIpDatabasePath", e.target.value),
517
- placeholder: "/var/lib/strapi/GeoLite2-Country.mmdb"
517
+ placeholder: "/var/lib/strapi/GeoLite2-City.mmdb"
518
518
  }
519
519
  )
520
520
  ] }) }),
521
521
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid.Item, { col: 12, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, background: "neutral100", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, alignItems: "stretch", children: [
522
522
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", gap: 3, children: [
523
523
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
524
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", style: { display: "block", marginBottom: "4px" }, children: t("settings.geofencing.database.title", "Local GeoIP Database") }),
525
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: geoIpStatus?.exists ? t("settings.geofencing.database.exists", "Database is installed locally.") : t("settings.geofencing.database.missing", "No local database installed yet.") })
524
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", style: { display: "block", marginBottom: "4px" }, children: t("settings.geofencing.database.title", "Local GeoIP Database (City recommended)") }),
525
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: geoIpStatus?.exists ? t("settings.geofencing.database.exists", "Database is installed locally. GeoLite2-City enables city-level lookup; Country remains supported.") : t("settings.geofencing.database.missing", "No local database installed yet. GeoLite2-City is recommended for city-level lookup.") })
526
526
  ] }),
527
527
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: geoIpStatus?.exists ? "success100" : "warning100", children: geoIpStatus?.exists ? t("settings.geofencing.database.installed", "Installed") : t("settings.geofencing.database.notInstalled", "Missing") })
528
528
  ] }),
529
529
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: [
530
530
  t("settings.geofencing.database.path", "Path"),
531
531
  ": ",
532
- geoIpStatus?.databasePath || settings.geoIpDatabasePath || "data/GeoLite2-Country.mmdb"
532
+ geoIpStatus?.databasePath || settings.geoIpDatabasePath || "data/GeoLite2-City.mmdb"
533
+ ] }),
534
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: [
535
+ t("settings.geofencing.database.edition", "Edition"),
536
+ ": ",
537
+ geoIpStatus?.editionId || "GeoLite2-City"
533
538
  ] }),
534
539
  geoIpStatus?.metadata?.lastModified && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "neutral600", style: { fontSize: "12px" }, children: [
535
540
  t("settings.geofencing.database.lastModified", "Last MaxMind update"),
@@ -817,11 +822,6 @@ const SettingsPage = () => {
817
822
  message: t("notifications.success.saved", "Settings saved successfully to database!")
818
823
  });
819
824
  setHasChanges(false);
820
- try {
821
- localStorage.setItem(`${index.pluginId}-settings`, JSON.stringify(settings));
822
- } catch (localErr) {
823
- console.warn("[Settings] Could not save to localStorage:", localErr);
824
- }
825
825
  } else {
826
826
  throw new Error("Save failed");
827
827
  }
@@ -205,12 +205,13 @@ const de = {
205
205
  "settings.geofencing.failureMode.allow": "Erlauben",
206
206
  "settings.geofencing.failureMode.block": "Blockieren",
207
207
  "settings.geofencing.databasePath.title": "Lokaler MMDB-Pfad",
208
- "settings.geofencing.database.title": "Lokale GeoIP-Datenbank",
209
- "settings.geofencing.database.exists": "Die Datenbank ist lokal installiert.",
210
- "settings.geofencing.database.missing": "Noch keine lokale Datenbank installiert.",
208
+ "settings.geofencing.database.title": "Lokale GeoIP-Datenbank (City empfohlen)",
209
+ "settings.geofencing.database.exists": "Die Datenbank ist lokal installiert. GeoLite2-City ermöglicht Stadt-Lookups; Country bleibt unterstützt.",
210
+ "settings.geofencing.database.missing": "Noch keine lokale Datenbank installiert. GeoLite2-City wird für Stadt-Lookups empfohlen.",
211
211
  "settings.geofencing.database.installed": "Installiert",
212
212
  "settings.geofencing.database.notInstalled": "Fehlt",
213
213
  "settings.geofencing.database.path": "Pfad",
214
+ "settings.geofencing.database.edition": "Edition",
214
215
  "settings.geofencing.database.lastModified": "Letztes MaxMind-Update",
215
216
  "settings.geofencing.database.updating": "Aktualisiere...",
216
217
  "settings.geofencing.database.update": "DB herunterladen / aktualisieren",
@@ -207,12 +207,13 @@ const de = {
207
207
  "settings.geofencing.failureMode.allow": "Erlauben",
208
208
  "settings.geofencing.failureMode.block": "Blockieren",
209
209
  "settings.geofencing.databasePath.title": "Lokaler MMDB-Pfad",
210
- "settings.geofencing.database.title": "Lokale GeoIP-Datenbank",
211
- "settings.geofencing.database.exists": "Die Datenbank ist lokal installiert.",
212
- "settings.geofencing.database.missing": "Noch keine lokale Datenbank installiert.",
210
+ "settings.geofencing.database.title": "Lokale GeoIP-Datenbank (City empfohlen)",
211
+ "settings.geofencing.database.exists": "Die Datenbank ist lokal installiert. GeoLite2-City ermöglicht Stadt-Lookups; Country bleibt unterstützt.",
212
+ "settings.geofencing.database.missing": "Noch keine lokale Datenbank installiert. GeoLite2-City wird für Stadt-Lookups empfohlen.",
213
213
  "settings.geofencing.database.installed": "Installiert",
214
214
  "settings.geofencing.database.notInstalled": "Fehlt",
215
215
  "settings.geofencing.database.path": "Pfad",
216
+ "settings.geofencing.database.edition": "Edition",
216
217
  "settings.geofencing.database.lastModified": "Letztes MaxMind-Update",
217
218
  "settings.geofencing.database.updating": "Aktualisiere...",
218
219
  "settings.geofencing.database.update": "DB herunterladen / aktualisieren",
@@ -205,12 +205,13 @@ const en = {
205
205
  "settings.geofencing.failureMode.allow": "Allow",
206
206
  "settings.geofencing.failureMode.block": "Block",
207
207
  "settings.geofencing.databasePath.title": "Local MMDB Path",
208
- "settings.geofencing.database.title": "Local GeoIP Database",
209
- "settings.geofencing.database.exists": "Database is installed locally.",
210
- "settings.geofencing.database.missing": "No local database installed yet.",
208
+ "settings.geofencing.database.title": "Local GeoIP Database (City recommended)",
209
+ "settings.geofencing.database.exists": "Database is installed locally. GeoLite2-City enables city-level lookup; Country remains supported.",
210
+ "settings.geofencing.database.missing": "No local database installed yet. GeoLite2-City is recommended for city-level lookup.",
211
211
  "settings.geofencing.database.installed": "Installed",
212
212
  "settings.geofencing.database.notInstalled": "Missing",
213
213
  "settings.geofencing.database.path": "Path",
214
+ "settings.geofencing.database.edition": "Edition",
214
215
  "settings.geofencing.database.lastModified": "Last MaxMind update",
215
216
  "settings.geofencing.database.updating": "Updating...",
216
217
  "settings.geofencing.database.update": "Download / Update DB",
@@ -207,12 +207,13 @@ const en = {
207
207
  "settings.geofencing.failureMode.allow": "Allow",
208
208
  "settings.geofencing.failureMode.block": "Block",
209
209
  "settings.geofencing.databasePath.title": "Local MMDB Path",
210
- "settings.geofencing.database.title": "Local GeoIP Database",
211
- "settings.geofencing.database.exists": "Database is installed locally.",
212
- "settings.geofencing.database.missing": "No local database installed yet.",
210
+ "settings.geofencing.database.title": "Local GeoIP Database (City recommended)",
211
+ "settings.geofencing.database.exists": "Database is installed locally. GeoLite2-City enables city-level lookup; Country remains supported.",
212
+ "settings.geofencing.database.missing": "No local database installed yet. GeoLite2-City is recommended for city-level lookup.",
213
213
  "settings.geofencing.database.installed": "Installed",
214
214
  "settings.geofencing.database.notInstalled": "Missing",
215
215
  "settings.geofencing.database.path": "Path",
216
+ "settings.geofencing.database.edition": "Edition",
216
217
  "settings.geofencing.database.lastModified": "Last MaxMind update",
217
218
  "settings.geofencing.database.updating": "Updating...",
218
219
  "settings.geofencing.database.update": "Download / Update DB",
@@ -194,12 +194,13 @@ const es = {
194
194
  "settings.geofencing.failureMode.allow": "Permitir",
195
195
  "settings.geofencing.failureMode.block": "Bloquear",
196
196
  "settings.geofencing.databasePath.title": "Ruta MMDB local",
197
- "settings.geofencing.database.title": "Base de datos GeoIP local",
198
- "settings.geofencing.database.exists": "La base de datos está instalada localmente.",
199
- "settings.geofencing.database.missing": "Aún no hay una base de datos local instalada.",
197
+ "settings.geofencing.database.title": "Base de datos GeoIP local (City recomendado)",
198
+ "settings.geofencing.database.exists": "La base de datos está instalada localmente. GeoLite2-City permite búsquedas por ciudad; Country sigue siendo compatible.",
199
+ "settings.geofencing.database.missing": "Aún no hay una base de datos local instalada. GeoLite2-City se recomienda para búsquedas por ciudad.",
200
200
  "settings.geofencing.database.installed": "Instalada",
201
201
  "settings.geofencing.database.notInstalled": "Falta",
202
202
  "settings.geofencing.database.path": "Ruta",
203
+ "settings.geofencing.database.edition": "Edición",
203
204
  "settings.geofencing.database.lastModified": "Última actualización de MaxMind",
204
205
  "settings.geofencing.database.updating": "Actualizando...",
205
206
  "settings.geofencing.database.update": "Descargar / actualizar DB",
@@ -192,12 +192,13 @@ const es = {
192
192
  "settings.geofencing.failureMode.allow": "Permitir",
193
193
  "settings.geofencing.failureMode.block": "Bloquear",
194
194
  "settings.geofencing.databasePath.title": "Ruta MMDB local",
195
- "settings.geofencing.database.title": "Base de datos GeoIP local",
196
- "settings.geofencing.database.exists": "La base de datos está instalada localmente.",
197
- "settings.geofencing.database.missing": "Aún no hay una base de datos local instalada.",
195
+ "settings.geofencing.database.title": "Base de datos GeoIP local (City recomendado)",
196
+ "settings.geofencing.database.exists": "La base de datos está instalada localmente. GeoLite2-City permite búsquedas por ciudad; Country sigue siendo compatible.",
197
+ "settings.geofencing.database.missing": "Aún no hay una base de datos local instalada. GeoLite2-City se recomienda para búsquedas por ciudad.",
198
198
  "settings.geofencing.database.installed": "Instalada",
199
199
  "settings.geofencing.database.notInstalled": "Falta",
200
200
  "settings.geofencing.database.path": "Ruta",
201
+ "settings.geofencing.database.edition": "Edición",
201
202
  "settings.geofencing.database.lastModified": "Última actualización de MaxMind",
202
203
  "settings.geofencing.database.updating": "Actualizando...",
203
204
  "settings.geofencing.database.update": "Descargar / actualizar DB",
@@ -192,12 +192,13 @@ const fr = {
192
192
  "settings.geofencing.failureMode.allow": "Autoriser",
193
193
  "settings.geofencing.failureMode.block": "Bloquer",
194
194
  "settings.geofencing.databasePath.title": "Chemin MMDB local",
195
- "settings.geofencing.database.title": "Base GeoIP locale",
196
- "settings.geofencing.database.exists": "La base est installée localement.",
197
- "settings.geofencing.database.missing": "Aucune base locale n'est encore installée.",
195
+ "settings.geofencing.database.title": "Base GeoIP locale (City recommandé)",
196
+ "settings.geofencing.database.exists": "La base est installée localement. GeoLite2-City permet les recherches par ville ; Country reste pris en charge.",
197
+ "settings.geofencing.database.missing": "Aucune base locale n'est encore installée. GeoLite2-City est recommandé pour les recherches par ville.",
198
198
  "settings.geofencing.database.installed": "Installée",
199
199
  "settings.geofencing.database.notInstalled": "Manquante",
200
200
  "settings.geofencing.database.path": "Chemin",
201
+ "settings.geofencing.database.edition": "Édition",
201
202
  "settings.geofencing.database.lastModified": "Dernière mise à jour MaxMind",
202
203
  "settings.geofencing.database.updating": "Mise à jour...",
203
204
  "settings.geofencing.database.update": "Télécharger / mettre à jour la DB",
@@ -194,12 +194,13 @@ const fr = {
194
194
  "settings.geofencing.failureMode.allow": "Autoriser",
195
195
  "settings.geofencing.failureMode.block": "Bloquer",
196
196
  "settings.geofencing.databasePath.title": "Chemin MMDB local",
197
- "settings.geofencing.database.title": "Base GeoIP locale",
198
- "settings.geofencing.database.exists": "La base est installée localement.",
199
- "settings.geofencing.database.missing": "Aucune base locale n'est encore installée.",
197
+ "settings.geofencing.database.title": "Base GeoIP locale (City recommandé)",
198
+ "settings.geofencing.database.exists": "La base est installée localement. GeoLite2-City permet les recherches par ville ; Country reste pris en charge.",
199
+ "settings.geofencing.database.missing": "Aucune base locale n'est encore installée. GeoLite2-City est recommandé pour les recherches par ville.",
200
200
  "settings.geofencing.database.installed": "Installée",
201
201
  "settings.geofencing.database.notInstalled": "Manquante",
202
202
  "settings.geofencing.database.path": "Chemin",
203
+ "settings.geofencing.database.edition": "Édition",
203
204
  "settings.geofencing.database.lastModified": "Dernière mise à jour MaxMind",
204
205
  "settings.geofencing.database.updating": "Mise à jour...",
205
206
  "settings.geofencing.database.update": "Télécharger / mettre à jour la DB",