@lastbrain/module-auth 1.0.1 → 2.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.
|
@@ -97,7 +97,7 @@ export function UserDetailPage({ userId, moduleUserTabs = [], }) {
|
|
|
97
97
|
}
|
|
98
98
|
const isAdmin = Array.isArray(userProfile.raw_app_meta_data?.roles) &&
|
|
99
99
|
userProfile.raw_app_meta_data.roles.includes("admin");
|
|
100
|
-
return (_jsxs("div", { className: "max-w-[calc(100vw-
|
|
100
|
+
return (_jsxs("div", { className: "max-w-[calc(100vw-8rem)] mx-auto mt-4 space-y-6", children: [_jsx(Card, { children: _jsxs(CardHeader, { className: "flex flex-col md:flex-row gap-4", children: [_jsx(Avatar, { isBordered: true, src: userProfile.avatar_sizes?.large || userProfile.avatar_url
|
|
101
101
|
? `/api/storage/${userProfile.avatar_sizes?.large || userProfile.avatar_url}`
|
|
102
102
|
: undefined, name: userProfile.full_name || userProfile.email, size: "lg" }), _jsxs("div", { className: "w-full flex flex-col gap-1", children: [_jsxs("div", { className: "w-full flex flex-col md:flex-row justify-between", children: [_jsx("h1", { className: "text-xl font-bold", children: userProfile.full_name || userProfile.email }), _jsxs("p", { className: "text-sm text-default-500 ", children: [_jsx("span", { className: "", children: "Derni\u00E8re connexion:" }), " ", userProfile.last_sign_in_at
|
|
103
103
|
? new Date(userProfile.last_sign_in_at).toLocaleDateString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../../src/web/auth/folder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../../src/web/auth/folder.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,UAAU,mDAoEzB"}
|
package/dist/web/auth/folder.js
CHANGED
|
@@ -3,7 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { Card, CardBody, Spinner } from "@lastbrain/ui";
|
|
5
5
|
import { FileManager } from "@lastbrain/ui";
|
|
6
|
-
import { ImageGenerative } from "@lastbrain/module-ai";
|
|
7
6
|
export function FolderPage() {
|
|
8
7
|
const [userData, setUserData] = useState(null);
|
|
9
8
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -37,5 +36,5 @@ export function FolderPage() {
|
|
|
37
36
|
if (!userData) {
|
|
38
37
|
return null;
|
|
39
38
|
}
|
|
40
|
-
return (_jsxs("div", { className: "pt-4 pb-12 max-w-8xl mx-auto px-4", children: [_jsx("h1", { className: "text-3xl font-bold mb-8", children: "Dossier" }), _jsx(FileManager, { bucket: "app", basePath: userData.id, allowUpload: true, allowCreateFolder: true, allowAIImageGeneration:
|
|
39
|
+
return (_jsxs("div", { className: "pt-4 pb-12 max-w-8xl mx-auto px-4", children: [_jsx("h1", { className: "text-3xl font-bold mb-8", children: "Dossier" }), _jsx(FileManager, { bucket: "app", basePath: userData.id, allowUpload: true, allowCreateFolder: true, allowAIImageGeneration: false, className: "min-h-[80vh]" })] }));
|
|
41
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lastbrain/module-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Module d'authentification complet pour LastBrain avec Supabase",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -32,9 +32,8 @@
|
|
|
32
32
|
"supabase"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lastbrain/core": "^
|
|
36
|
-
"@lastbrain/ui": "^
|
|
37
|
-
"@lastbrain/module-ai": "^0.1.0",
|
|
35
|
+
"@lastbrain/core": "^1.0.0",
|
|
36
|
+
"@lastbrain/ui": "^1.0.0",
|
|
38
37
|
"@supabase/supabase-js": "^2.86.0",
|
|
39
38
|
"lucide-react": "^0.554.0",
|
|
40
39
|
"react": "^19.2.1",
|
|
@@ -184,7 +184,7 @@ export function UserDetailPage({
|
|
|
184
184
|
userProfile.raw_app_meta_data.roles.includes("admin");
|
|
185
185
|
|
|
186
186
|
return (
|
|
187
|
-
<div className="max-w-[calc(100vw-
|
|
187
|
+
<div className="max-w-[calc(100vw-8rem)] mx-auto mt-4 space-y-6">
|
|
188
188
|
{/* Header utilisateur */}
|
|
189
189
|
<Card>
|
|
190
190
|
<CardHeader className="flex flex-col md:flex-row gap-4">
|
package/src/web/auth/folder.tsx
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { Card, CardBody, Spinner } from "@lastbrain/ui";
|
|
5
5
|
import { FileManager } from "@lastbrain/ui";
|
|
6
|
-
import { ImageGenerative } from "@lastbrain/module-ai";
|
|
7
6
|
|
|
8
7
|
interface UserData {
|
|
9
8
|
id: string;
|
|
@@ -82,8 +81,7 @@ export function FolderPage() {
|
|
|
82
81
|
basePath={userData.id}
|
|
83
82
|
allowUpload={true}
|
|
84
83
|
allowCreateFolder={true}
|
|
85
|
-
allowAIImageGeneration={
|
|
86
|
-
renderImageGenerator={(props) => <ImageGenerative {...props} />}
|
|
84
|
+
allowAIImageGeneration={false}
|
|
87
85
|
className="min-h-[80vh]"
|
|
88
86
|
/>
|
|
89
87
|
</div>
|