@strapi-community/plugin-better-auth-dashboard 1.0.0-alpha.4 → 1.0.0-alpha.5
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/dist/admin/{Root-7EredGQZ.js → Root-CFxaaNC8.js} +8 -7
- package/dist/admin/{Root-B1LuKMEv.mjs → Root-CJNOLkgF.mjs} +8 -7
- package/dist/admin/{index-CIxfFlzU.js → index-C4--Z2Qg.js} +1 -1
- package/dist/admin/{index-QVlTR8eL.mjs → index-QYGGdXAd.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ const client$2 = require("@better-auth/infra/client");
|
|
|
9
9
|
const client$1 = require("better-auth/client");
|
|
10
10
|
const icons = require("@strapi/icons");
|
|
11
11
|
const admin = require("@strapi/strapi/admin");
|
|
12
|
-
const index = require("./index-
|
|
12
|
+
const index = require("./index-C4--Z2Qg.js");
|
|
13
13
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
14
14
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
15
15
|
const dashPathMethods = () => ({
|
|
@@ -1119,7 +1119,7 @@ function OrganizationDetail({
|
|
|
1119
1119
|
};
|
|
1120
1120
|
const org = orgQuery.data;
|
|
1121
1121
|
const extraData = {
|
|
1122
|
-
...
|
|
1122
|
+
...strapiOrgQuery.data ?? {},
|
|
1123
1123
|
...editExtra
|
|
1124
1124
|
};
|
|
1125
1125
|
const updateOrgMutation = reactQuery.useMutation({
|
|
@@ -3286,7 +3286,7 @@ function OverviewPage() {
|
|
|
3286
3286
|
queryKey: ["dash-recent-sessions"],
|
|
3287
3287
|
queryFn: async () => {
|
|
3288
3288
|
const { data } = await get(
|
|
3289
|
-
"/better-auth-dashboard/db?uid=plugin::better-auth.session&pagination[pageSize]=12&sort[0]=
|
|
3289
|
+
"/better-auth-dashboard/db?uid=plugin::better-auth.session&pagination[pageSize]=12&sort[0]=updatedAt:desc"
|
|
3290
3290
|
);
|
|
3291
3291
|
return data.results ?? [];
|
|
3292
3292
|
},
|
|
@@ -3306,9 +3306,10 @@ function OverviewPage() {
|
|
|
3306
3306
|
const activeUserIds = [];
|
|
3307
3307
|
const lastActiveByUserId = /* @__PURE__ */ new Map();
|
|
3308
3308
|
for (const s of sessionsRaw) {
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3309
|
+
const uid = String(s.userId);
|
|
3310
|
+
if (!lastActiveByUserId.has(uid)) {
|
|
3311
|
+
lastActiveByUserId.set(uid, s.updatedAt ?? s.createdAt);
|
|
3312
|
+
activeUserIds.push(uid);
|
|
3312
3313
|
}
|
|
3313
3314
|
}
|
|
3314
3315
|
const activeUsersQuery = reactQuery.useQuery({
|
|
@@ -4098,7 +4099,7 @@ function UserDetailDrawer({
|
|
|
4098
4099
|
mutationFn: async (sessionId) => {
|
|
4099
4100
|
const result = await client.dash.sessions.revoke(
|
|
4100
4101
|
{},
|
|
4101
|
-
withContext({ sessionId })
|
|
4102
|
+
withContext({ sessionId, userId })
|
|
4102
4103
|
);
|
|
4103
4104
|
if (result.error)
|
|
4104
4105
|
throw new Error(result.error.message ?? "Revoke failed");
|
|
@@ -7,7 +7,7 @@ import { dashClient } from "@better-auth/infra/client";
|
|
|
7
7
|
import { createAuthClient, InferPlugin } from "better-auth/client";
|
|
8
8
|
import { Cross, Images, Trash, Plus, Pencil } from "@strapi/icons";
|
|
9
9
|
import { useNotification, useFetchClient } from "@strapi/strapi/admin";
|
|
10
|
-
import { g as getMediaLibraryComponent, P as PluginIcon } from "./index-
|
|
10
|
+
import { g as getMediaLibraryComponent, P as PluginIcon } from "./index-QYGGdXAd.mjs";
|
|
11
11
|
const dashPathMethods = () => ({
|
|
12
12
|
id: "dash-path-methods",
|
|
13
13
|
pathMethods: {
|
|
@@ -1115,7 +1115,7 @@ function OrganizationDetail({
|
|
|
1115
1115
|
};
|
|
1116
1116
|
const org = orgQuery.data;
|
|
1117
1117
|
const extraData = {
|
|
1118
|
-
...
|
|
1118
|
+
...strapiOrgQuery.data ?? {},
|
|
1119
1119
|
...editExtra
|
|
1120
1120
|
};
|
|
1121
1121
|
const updateOrgMutation = useMutation({
|
|
@@ -3282,7 +3282,7 @@ function OverviewPage() {
|
|
|
3282
3282
|
queryKey: ["dash-recent-sessions"],
|
|
3283
3283
|
queryFn: async () => {
|
|
3284
3284
|
const { data } = await get(
|
|
3285
|
-
"/better-auth-dashboard/db?uid=plugin::better-auth.session&pagination[pageSize]=12&sort[0]=
|
|
3285
|
+
"/better-auth-dashboard/db?uid=plugin::better-auth.session&pagination[pageSize]=12&sort[0]=updatedAt:desc"
|
|
3286
3286
|
);
|
|
3287
3287
|
return data.results ?? [];
|
|
3288
3288
|
},
|
|
@@ -3302,9 +3302,10 @@ function OverviewPage() {
|
|
|
3302
3302
|
const activeUserIds = [];
|
|
3303
3303
|
const lastActiveByUserId = /* @__PURE__ */ new Map();
|
|
3304
3304
|
for (const s of sessionsRaw) {
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3305
|
+
const uid = String(s.userId);
|
|
3306
|
+
if (!lastActiveByUserId.has(uid)) {
|
|
3307
|
+
lastActiveByUserId.set(uid, s.updatedAt ?? s.createdAt);
|
|
3308
|
+
activeUserIds.push(uid);
|
|
3308
3309
|
}
|
|
3309
3310
|
}
|
|
3310
3311
|
const activeUsersQuery = useQuery({
|
|
@@ -4094,7 +4095,7 @@ function UserDetailDrawer({
|
|
|
4094
4095
|
mutationFn: async (sessionId) => {
|
|
4095
4096
|
const result = await client.dash.sessions.revoke(
|
|
4096
4097
|
{},
|
|
4097
|
-
withContext({ sessionId })
|
|
4098
|
+
withContext({ sessionId, userId })
|
|
4098
4099
|
);
|
|
4099
4100
|
if (result.error)
|
|
4100
4101
|
throw new Error(result.error.message ?? "Revoke failed");
|
|
@@ -55,7 +55,7 @@ const index = {
|
|
|
55
55
|
id: `${PLUGIN_ID}.plugin.name`,
|
|
56
56
|
defaultMessage: "Auth Dashboard"
|
|
57
57
|
},
|
|
58
|
-
Component: async () => Promise.resolve().then(() => require("./Root-
|
|
58
|
+
Component: async () => Promise.resolve().then(() => require("./Root-CFxaaNC8.js"))
|
|
59
59
|
});
|
|
60
60
|
},
|
|
61
61
|
bootstrap() {
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED