@lastbrain/module-auth 0.1.23 → 1.0.1
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/api/admin/signup-stats.d.ts +1 -1
- package/dist/api/admin/signup-stats.d.ts.map +1 -1
- package/dist/api/admin/signup-stats.js +1 -1
- package/dist/auth.build.config.js +1 -1
- package/dist/components/AccountButton.d.ts.map +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -17
- package/dist/web/admin/signup-stats.js +1 -1
- package/dist/web/admin/user-detail.d.ts.map +1 -1
- package/dist/web/admin/users/[id].js +1 -1
- package/dist/web/auth/profile.js +18 -18
- package/package.json +1 -1
- package/src/api/admin/signup-stats.ts +1 -1
- package/src/auth.build.config.ts +1 -1
- package/src/components/AccountButton.tsx +0 -1
- package/src/index.ts +17 -17
- package/src/web/admin/signup-stats.tsx +5 -5
- package/src/web/admin/user-detail.tsx +1 -2
- package/src/web/admin/users/[id].tsx +1 -1
- package/src/web/admin/users.tsx +1 -1
- package/src/web/auth/profile.tsx +6 -6
|
@@ -12,7 +12,7 @@ interface SignupStats {
|
|
|
12
12
|
total: number;
|
|
13
13
|
}>;
|
|
14
14
|
}
|
|
15
|
-
export declare function GET(
|
|
15
|
+
export declare function GET(_request: NextRequest): Promise<NextResponse<{
|
|
16
16
|
error: string;
|
|
17
17
|
}> | NextResponse<{
|
|
18
18
|
data: SignupStats;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signup-stats.d.ts","sourceRoot":"","sources":["../../../src/api/admin/signup-stats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ;AAED,wBAAsB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"signup-stats.d.ts","sourceRoot":"","sources":["../../../src/api/admin/signup-stats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ;AAED,wBAAsB,GAAG,CAAC,QAAQ,EAAE,WAAW;;;;IAuC9C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getSupabaseServiceClient } from "@lastbrain/core/server";
|
|
2
2
|
import { NextResponse } from "next/server";
|
|
3
|
-
export async function GET(
|
|
3
|
+
export async function GET(_request) {
|
|
4
4
|
try {
|
|
5
5
|
const supabase = await getSupabaseServiceClient();
|
|
6
6
|
// Get total signups by source
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountButton.d.ts","sourceRoot":"","sources":["../../src/components/AccountButton.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"AccountButton.d.ts","sourceRoot":"","sources":["../../src/components/AccountButton.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,UAAU,kBAAkB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AASD,eAAO,MAAM,aAAa,GAAI,kCAI3B,kBAAkB,4CA8HpB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { SignInPage } from "./web/public/SignInPage
|
|
2
|
-
export { SignUpPage } from "./web/public/SignUpPage
|
|
3
|
-
export { ResetPassword } from "./web/public/ResetPassword
|
|
4
|
-
export { DashboardPage } from "./web/auth/dashboard
|
|
5
|
-
export { FolderPage } from "./web/auth/folder
|
|
6
|
-
export { ProfilePage } from "./web/auth/profile
|
|
7
|
-
export { ReglagePage } from "./web/auth/reglage
|
|
8
|
-
export { AdminUsersPage } from "./web/admin/users
|
|
9
|
-
export { default as UserPage } from "./web/admin/users/[id]
|
|
10
|
-
export { UserDetailPage } from "./web/admin/user-detail
|
|
11
|
-
export { SignupStatsPage } from "./web/admin/signup-stats
|
|
12
|
-
export { AccountButton } from "./components/AccountButton
|
|
13
|
-
export { NotificationButton } from "./components/NotificationButton
|
|
14
|
-
export { ThemeSwitcherButton } from "./components/ThemeSwitcherButton
|
|
15
|
-
export { Doc } from "./components/Doc
|
|
16
|
-
export { Doc as AuthModuleDoc } from "./components/Doc
|
|
17
|
-
export { default as authBuildConfig } from "./auth.build.config
|
|
1
|
+
export { SignInPage } from "./web/public/SignInPage";
|
|
2
|
+
export { SignUpPage } from "./web/public/SignUpPage";
|
|
3
|
+
export { ResetPassword } from "./web/public/ResetPassword";
|
|
4
|
+
export { DashboardPage } from "./web/auth/dashboard";
|
|
5
|
+
export { FolderPage } from "./web/auth/folder";
|
|
6
|
+
export { ProfilePage } from "./web/auth/profile";
|
|
7
|
+
export { ReglagePage } from "./web/auth/reglage";
|
|
8
|
+
export { AdminUsersPage } from "./web/admin/users";
|
|
9
|
+
export { default as UserPage } from "./web/admin/users/[id]";
|
|
10
|
+
export { UserDetailPage } from "./web/admin/user-detail";
|
|
11
|
+
export { SignupStatsPage } from "./web/admin/signup-stats";
|
|
12
|
+
export { AccountButton } from "./components/AccountButton";
|
|
13
|
+
export { NotificationButton } from "./components/NotificationButton";
|
|
14
|
+
export { ThemeSwitcherButton } from "./components/ThemeSwitcherButton";
|
|
15
|
+
export { Doc } from "./components/Doc";
|
|
16
|
+
export { Doc as AuthModuleDoc } from "./components/Doc";
|
|
17
|
+
export { default as authBuildConfig } from "./auth.build.config";
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// Client Components uniquement
|
|
2
|
-
export { SignInPage } from "./web/public/SignInPage
|
|
3
|
-
export { SignUpPage } from "./web/public/SignUpPage
|
|
4
|
-
export { ResetPassword } from "./web/public/ResetPassword
|
|
5
|
-
export { DashboardPage } from "./web/auth/dashboard
|
|
6
|
-
export { FolderPage } from "./web/auth/folder
|
|
7
|
-
export { ProfilePage } from "./web/auth/profile
|
|
8
|
-
export { ReglagePage } from "./web/auth/reglage
|
|
9
|
-
export { AdminUsersPage } from "./web/admin/users
|
|
10
|
-
export { default as UserPage } from "./web/admin/users/[id]
|
|
11
|
-
export { UserDetailPage } from "./web/admin/user-detail
|
|
12
|
-
export { SignupStatsPage } from "./web/admin/signup-stats
|
|
2
|
+
export { SignInPage } from "./web/public/SignInPage";
|
|
3
|
+
export { SignUpPage } from "./web/public/SignUpPage";
|
|
4
|
+
export { ResetPassword } from "./web/public/ResetPassword";
|
|
5
|
+
export { DashboardPage } from "./web/auth/dashboard";
|
|
6
|
+
export { FolderPage } from "./web/auth/folder";
|
|
7
|
+
export { ProfilePage } from "./web/auth/profile";
|
|
8
|
+
export { ReglagePage } from "./web/auth/reglage";
|
|
9
|
+
export { AdminUsersPage } from "./web/admin/users";
|
|
10
|
+
export { default as UserPage } from "./web/admin/users/[id]";
|
|
11
|
+
export { UserDetailPage } from "./web/admin/user-detail";
|
|
12
|
+
export { SignupStatsPage } from "./web/admin/signup-stats";
|
|
13
13
|
// Header Components
|
|
14
|
-
export { AccountButton } from "./components/AccountButton
|
|
15
|
-
export { NotificationButton } from "./components/NotificationButton
|
|
16
|
-
export { ThemeSwitcherButton } from "./components/ThemeSwitcherButton
|
|
14
|
+
export { AccountButton } from "./components/AccountButton";
|
|
15
|
+
export { NotificationButton } from "./components/NotificationButton";
|
|
16
|
+
export { ThemeSwitcherButton } from "./components/ThemeSwitcherButton";
|
|
17
17
|
// Documentation
|
|
18
|
-
export { Doc } from "./components/Doc
|
|
19
|
-
export { Doc as AuthModuleDoc } from "./components/Doc
|
|
18
|
+
export { Doc } from "./components/Doc";
|
|
19
|
+
export { Doc as AuthModuleDoc } from "./components/Doc";
|
|
20
20
|
// Configuration de build (utilisée par les scripts)
|
|
21
|
-
export { default as authBuildConfig } from "./auth.build.config
|
|
21
|
+
export { default as authBuildConfig } from "./auth.build.config";
|
|
@@ -37,7 +37,7 @@ export function SignupStatsPage() {
|
|
|
37
37
|
100).toFixed(1);
|
|
38
38
|
const recipePercentage = ((stats.bySource.recipe / stats.total) *
|
|
39
39
|
100).toFixed(1);
|
|
40
|
-
return (_jsxs("div", { className: "space-y-6 px-2 md:p-6", children: [_jsxs("div", { className: "flex items-center gap-2 mb-8", children: [_jsx(BarChart3, { size: 28, className: "text-primary-600" }), _jsx("h1", { className: "text-3xl font-bold", children: "Statistiques d'inscriptions" })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-12", children: [_jsx(Card, { className: "
|
|
40
|
+
return (_jsxs("div", { className: "space-y-6 px-2 md:p-6", children: [_jsxs("div", { className: "flex items-center gap-2 mb-8", children: [_jsx(BarChart3, { size: 28, className: "text-primary-600" }), _jsx("h1", { className: "text-3xl font-bold", children: "Statistiques d'inscriptions" })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-12", children: [_jsx(Card, { className: " ", children: _jsxs(CardBody, { className: "gap-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium text-primary-600 dark:text-primary-400", children: "Total d'inscriptions" }), _jsx(TrendingUp, { size: 20, className: "text-primary-600" })] }), _jsx("p", { className: "text-4xl font-bold text-primary-700 dark:text-primary-300", children: stats.total })] }) }), _jsx(Card, { className: " ", children: _jsxs(CardBody, { className: "gap-4", children: [_jsx("div", { className: "flex items-center justify-between", children: _jsx("span", { className: "text-sm font-medium text-secondary-600 dark:text-secondary-400", children: "Inscriptions LastBrain" }) }), _jsxs("div", { className: "flex items-end justify-between gap-2", children: [_jsx("p", { className: "text-4xl font-bold text-secondary-700 dark:text-secondary-300", children: stats.bySource.lastbrain }), _jsxs(Chip, { size: "sm", color: "secondary", variant: "flat", children: [lastbrainPercentage, "%"] })] })] }) }), _jsx(Card, { className: " ", children: _jsxs(CardBody, { className: "gap-4", children: [_jsx("div", { className: "flex items-center justify-between", children: _jsx("span", { className: "text-sm font-medium text-success-600 dark:text-success-400", children: "Inscriptions Recipe" }) }), _jsxs("div", { className: "flex items-end justify-between gap-2", children: [_jsx("p", { className: "text-4xl font-bold text-success-700 dark:text-success-300", children: stats.bySource.recipe }), _jsxs(Chip, { size: "sm", color: "success", variant: "flat", children: [recipePercentage, "%"] })] })] }) })] }), _jsxs(Tabs, { "aria-label": "Vues des statistiques", color: "primary", variant: "bordered", children: [_jsx(Tab, { title: "Par Source", children: _jsxs(Card, { className: "mt-6", children: [_jsx(CardHeader, { children: _jsx("h3", { className: "text-lg font-semibold", children: "R\u00E9sum\u00E9 par source" }) }), _jsx(CardBody, { children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "p-4 rounded-lg border border-secondary-800 dark:border-secondary-800", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsx("span", { className: "font-medium text-secondary-700 dark:text-secondary-300", children: "LastBrain" }), _jsxs(Chip, { size: "sm", color: "secondary", variant: "flat", children: [stats.bySource.lastbrain, " inscriptions"] })] }), _jsx("div", { className: "w-full bg-default-200 rounded-full h-2 dark:bg-default-700", children: _jsx("div", { className: "bg-secondary-500 h-2 rounded-full", style: {
|
|
41
41
|
width: `${(stats.bySource.lastbrain / stats.total) * 100}%`,
|
|
42
42
|
} }) }), _jsxs("p", { className: "text-xs text-default-500 mt-2", children: [lastbrainPercentage, "% du total"] })] }), _jsxs("div", { className: "p-4 rounded-lg border border-success-200 dark:border-success-800", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsx("span", { className: "font-medium text-success-700 dark:text-success-300", children: "Recipe" }), _jsxs(Chip, { size: "sm", color: "success", variant: "flat", children: [stats.bySource.recipe, " inscriptions"] })] }), _jsx("div", { className: "w-full bg-default-200 rounded-full h-2 dark:bg-default-700", children: _jsx("div", { className: "bg-success-500 h-2 rounded-full", style: {
|
|
43
43
|
width: `${(stats.bySource.recipe / stats.total) * 100}%`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-detail.d.ts","sourceRoot":"","sources":["../../../src/web/admin/user-detail.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-detail.d.ts","sourceRoot":"","sources":["../../../src/web/admin/user-detail.tsx"],"names":[],"mappings":"AAwBA,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAkCD,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,cAAmB,GACpB,EAAE,mBAAmB,2CAygBrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { UserDetailPage } from "../user-detail
|
|
2
|
+
import { UserDetailPage } from "../user-detail";
|
|
3
3
|
import { moduleUserTabs } from "@lastbrain/core";
|
|
4
4
|
export default async function UserPage({ params }) {
|
|
5
5
|
const { id } = await params;
|
package/dist/web/auth/profile.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { Card, CardBody, CardHeader, Input, Textarea, Button, Spinner, Divider, addToast, AvatarUploader, } from "@lastbrain/ui";
|
|
5
5
|
import { Save, User } from "lucide-react";
|
|
6
|
-
import { uploadFile, deleteFilesWithPrefix } from "../../api/storage
|
|
6
|
+
import { uploadFile, deleteFilesWithPrefix } from "../../api/storage";
|
|
7
7
|
import { supabaseBrowserClient } from "@lastbrain/core";
|
|
8
8
|
export function ProfilePage() {
|
|
9
9
|
const [profile, setProfile] = useState({});
|
|
@@ -174,21 +174,21 @@ export function ProfilePage() {
|
|
|
174
174
|
if (isLoading) {
|
|
175
175
|
return (_jsx("div", { className: "flex justify-center items-center min-h-[400px]", children: _jsx(Spinner, { size: "lg", label: "Loading profile..." }) }));
|
|
176
176
|
}
|
|
177
|
-
return (
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
177
|
+
return (_jsx("div", { className: "pt-12 pb-12 max-w-4xl mx-auto px-4", children: _jsx("form", { onSubmit: handleSubmit, children: _jsxs("div", { className: "space-y-6", children: [_jsx("div", { className: "flex justify-center", children: _jsx(AvatarUploader, { userId: currentUser?.id, bucket: "avatar", shape: "circle", onUpload: handleAvatarUpload, onDelete: handleAvatarDelete, initialAvatarPath: currentUser?.user_metadata?.avatar ||
|
|
178
|
+
profile.avatar_url ||
|
|
179
|
+
null, initialAvatarSizes: (() => {
|
|
180
|
+
const sizes = currentUser?.user_metadata
|
|
181
|
+
?.avatar_sizes;
|
|
182
|
+
if (!sizes)
|
|
183
|
+
return null;
|
|
184
|
+
return {
|
|
185
|
+
small: sizes.small ?? null,
|
|
186
|
+
medium: sizes.medium ?? null,
|
|
187
|
+
large: sizes.large ?? null,
|
|
188
|
+
};
|
|
189
|
+
})(), onUploaded: (urls) => {
|
|
190
|
+
setProfile((prev) => ({ ...prev, avatar_url: urls.large }));
|
|
191
|
+
}, onDeleted: () => {
|
|
192
|
+
setProfile((prev) => ({ ...prev, avatar_url: "" }));
|
|
193
|
+
} }) }), _jsxs("div", { className: "flex items-center gap-2 mb-4", children: [_jsx(User, { className: "w-8 h-8" }), _jsx("h1", { className: "text-3xl font-bold", children: "Edit Profile" })] }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx("h3", { className: "text-lg font-semibold", children: "Personal Information" }) }), _jsx(Divider, {}), _jsx(CardBody, { children: _jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [_jsx(Input, { label: "First Name", placeholder: "Enter your first name", value: profile.first_name || "", onChange: (e) => handleChange("first_name", e.target.value) }), _jsx(Input, { label: "Last Name", placeholder: "Enter your last name", value: profile.last_name || "", onChange: (e) => handleChange("last_name", e.target.value) }), _jsx(Input, { label: "Phone", placeholder: "Enter your phone number", type: "tel", value: profile.phone || "", onChange: (e) => handleChange("phone", e.target.value), className: "md:col-span-2" }), _jsx(Textarea, { label: "Bio", placeholder: "Tell us about yourself", value: profile.bio || "", onChange: (e) => handleChange("bio", e.target.value), minRows: 3, className: "md:col-span-2" })] }) })] }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx("h3", { className: "text-lg font-semibold", children: "Professional Information" }) }), _jsx(Divider, {}), _jsx(CardBody, { children: _jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [_jsx(Input, { label: "Company", placeholder: "Enter your company name", value: profile.company || "", onChange: (e) => handleChange("company", e.target.value) }), _jsx(Input, { label: "Website", placeholder: "https://example.com", type: "url", value: profile.website || "", onChange: (e) => handleChange("website", e.target.value) }), _jsx(Input, { label: "Location", placeholder: "City, Country", value: profile.location || "", onChange: (e) => handleChange("location", e.target.value), className: "md:col-span-2" })] }) })] }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx("h3", { className: "text-lg font-semibold", children: "Preferences" }) }), _jsx(Divider, {}), _jsx(CardBody, { children: _jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [_jsx(Input, { label: "Language", placeholder: "en, fr, es...", value: profile.language || "", onChange: (e) => handleChange("language", e.target.value) }), _jsx(Input, { label: "Timezone", placeholder: "Europe/Paris, America/New_York...", value: profile.timezone || "", onChange: (e) => handleChange("timezone", e.target.value) })] }) })] }), _jsxs("div", { className: "flex justify-end gap-3", children: [_jsx(Button, { type: "button", variant: "flat", onPress: () => fetchProfile(), isDisabled: isSaving, children: "Cancel" }), _jsx(Button, { type: "submit", color: "primary", isLoading: isSaving, startContent: !isSaving && _jsx(Save, { className: "w-4 h-4" }), children: isSaving ? "Saving..." : "Save Changes" })] })] }) }) }));
|
|
194
194
|
}
|
package/package.json
CHANGED
package/src/auth.build.config.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// Client Components uniquement
|
|
2
|
-
export { SignInPage } from "./web/public/SignInPage
|
|
3
|
-
export { SignUpPage } from "./web/public/SignUpPage
|
|
4
|
-
export { ResetPassword } from "./web/public/ResetPassword
|
|
5
|
-
export { DashboardPage } from "./web/auth/dashboard
|
|
6
|
-
export { FolderPage } from "./web/auth/folder
|
|
7
|
-
export { ProfilePage } from "./web/auth/profile
|
|
8
|
-
export { ReglagePage } from "./web/auth/reglage
|
|
9
|
-
export { AdminUsersPage } from "./web/admin/users
|
|
10
|
-
export { default as UserPage } from "./web/admin/users/[id]
|
|
11
|
-
export { UserDetailPage } from "./web/admin/user-detail
|
|
12
|
-
export { SignupStatsPage } from "./web/admin/signup-stats
|
|
2
|
+
export { SignInPage } from "./web/public/SignInPage";
|
|
3
|
+
export { SignUpPage } from "./web/public/SignUpPage";
|
|
4
|
+
export { ResetPassword } from "./web/public/ResetPassword";
|
|
5
|
+
export { DashboardPage } from "./web/auth/dashboard";
|
|
6
|
+
export { FolderPage } from "./web/auth/folder";
|
|
7
|
+
export { ProfilePage } from "./web/auth/profile";
|
|
8
|
+
export { ReglagePage } from "./web/auth/reglage";
|
|
9
|
+
export { AdminUsersPage } from "./web/admin/users";
|
|
10
|
+
export { default as UserPage } from "./web/admin/users/[id]";
|
|
11
|
+
export { UserDetailPage } from "./web/admin/user-detail";
|
|
12
|
+
export { SignupStatsPage } from "./web/admin/signup-stats";
|
|
13
13
|
|
|
14
14
|
// Header Components
|
|
15
|
-
export { AccountButton } from "./components/AccountButton
|
|
16
|
-
export { NotificationButton } from "./components/NotificationButton
|
|
17
|
-
export { ThemeSwitcherButton } from "./components/ThemeSwitcherButton
|
|
15
|
+
export { AccountButton } from "./components/AccountButton";
|
|
16
|
+
export { NotificationButton } from "./components/NotificationButton";
|
|
17
|
+
export { ThemeSwitcherButton } from "./components/ThemeSwitcherButton";
|
|
18
18
|
|
|
19
19
|
// Documentation
|
|
20
|
-
export { Doc } from "./components/Doc
|
|
21
|
-
export { Doc as AuthModuleDoc } from "./components/Doc
|
|
20
|
+
export { Doc } from "./components/Doc";
|
|
21
|
+
export { Doc as AuthModuleDoc } from "./components/Doc";
|
|
22
22
|
// Configuration de build (utilisée par les scripts)
|
|
23
|
-
export { default as authBuildConfig } from "./auth.build.config
|
|
23
|
+
export { default as authBuildConfig } from "./auth.build.config";
|
|
@@ -101,7 +101,7 @@ export function SignupStatsPage() {
|
|
|
101
101
|
{/* Key Metrics Cards */}
|
|
102
102
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-12">
|
|
103
103
|
{/* Total Signups */}
|
|
104
|
-
<Card className="
|
|
104
|
+
<Card className=" ">
|
|
105
105
|
<CardBody className="gap-4">
|
|
106
106
|
<div className="flex items-center justify-between">
|
|
107
107
|
<span className="text-sm font-medium text-primary-600 dark:text-primary-400">
|
|
@@ -116,14 +116,14 @@ export function SignupStatsPage() {
|
|
|
116
116
|
</Card>
|
|
117
117
|
|
|
118
118
|
{/* LastBrain Signups */}
|
|
119
|
-
<Card className="
|
|
119
|
+
<Card className=" ">
|
|
120
120
|
<CardBody className="gap-4">
|
|
121
121
|
<div className="flex items-center justify-between">
|
|
122
122
|
<span className="text-sm font-medium text-secondary-600 dark:text-secondary-400">
|
|
123
123
|
Inscriptions LastBrain
|
|
124
124
|
</span>
|
|
125
125
|
</div>
|
|
126
|
-
<div className="flex items-end gap-2">
|
|
126
|
+
<div className="flex items-end justify-between gap-2">
|
|
127
127
|
<p className="text-4xl font-bold text-secondary-700 dark:text-secondary-300">
|
|
128
128
|
{stats.bySource.lastbrain}
|
|
129
129
|
</p>
|
|
@@ -135,14 +135,14 @@ export function SignupStatsPage() {
|
|
|
135
135
|
</Card>
|
|
136
136
|
|
|
137
137
|
{/* Recipe Signups */}
|
|
138
|
-
<Card className="
|
|
138
|
+
<Card className=" ">
|
|
139
139
|
<CardBody className="gap-4">
|
|
140
140
|
<div className="flex items-center justify-between">
|
|
141
141
|
<span className="text-sm font-medium text-success-600 dark:text-success-400">
|
|
142
142
|
Inscriptions Recipe
|
|
143
143
|
</span>
|
|
144
144
|
</div>
|
|
145
|
-
<div className="flex items-end gap-2">
|
|
145
|
+
<div className="flex items-end justify-between gap-2">
|
|
146
146
|
<p className="text-4xl font-bold text-success-700 dark:text-success-300">
|
|
147
147
|
{stats.bySource.recipe}
|
|
148
148
|
</p>
|
|
@@ -14,12 +14,11 @@ import {
|
|
|
14
14
|
Textarea,
|
|
15
15
|
Select,
|
|
16
16
|
SelectItem,
|
|
17
|
-
Spacer,
|
|
18
17
|
Spinner,
|
|
19
18
|
addToast,
|
|
20
19
|
Snippet,
|
|
21
20
|
} from "@lastbrain/ui";
|
|
22
|
-
import { User, Bell, Settings
|
|
21
|
+
import { User, Bell, Settings } from "lucide-react";
|
|
23
22
|
import { useAuth } from "@lastbrain/core";
|
|
24
23
|
import * as LucideIcons from "lucide-react";
|
|
25
24
|
|
package/src/web/admin/users.tsx
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
Pagination,
|
|
19
19
|
Avatar,
|
|
20
20
|
} from "@lastbrain/ui";
|
|
21
|
-
import {
|
|
21
|
+
import { Search, RefreshCw, Eye, Users2 } from "lucide-react";
|
|
22
22
|
import { useRouter } from "next/navigation";
|
|
23
23
|
|
|
24
24
|
interface User {
|
package/src/web/auth/profile.tsx
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
AvatarUploader,
|
|
15
15
|
} from "@lastbrain/ui";
|
|
16
16
|
import { Save, User } from "lucide-react";
|
|
17
|
-
import { uploadFile, deleteFilesWithPrefix } from "../../api/storage
|
|
17
|
+
import { uploadFile, deleteFilesWithPrefix } from "../../api/storage";
|
|
18
18
|
import { supabaseBrowserClient } from "@lastbrain/core";
|
|
19
19
|
|
|
20
20
|
interface ProfileData {
|
|
@@ -252,11 +252,6 @@ export function ProfilePage() {
|
|
|
252
252
|
|
|
253
253
|
return (
|
|
254
254
|
<div className="pt-12 pb-12 max-w-4xl mx-auto px-4">
|
|
255
|
-
<div className="flex items-center gap-2 mb-8">
|
|
256
|
-
<User className="w-8 h-8" />
|
|
257
|
-
<h1 className="text-3xl font-bold">Edit Profile</h1>
|
|
258
|
-
</div>
|
|
259
|
-
|
|
260
255
|
<form onSubmit={handleSubmit}>
|
|
261
256
|
<div className="space-y-6">
|
|
262
257
|
{/* Avatar Section */}
|
|
@@ -296,6 +291,11 @@ export function ProfilePage() {
|
|
|
296
291
|
}}
|
|
297
292
|
/>
|
|
298
293
|
</div>
|
|
294
|
+
<div className="flex items-center gap-2 mb-4">
|
|
295
|
+
<User className="w-8 h-8" />
|
|
296
|
+
<h1 className="text-3xl font-bold">Edit Profile</h1>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
299
|
{/* </CardBody>
|
|
300
300
|
</Card> */}
|
|
301
301
|
|