onItemClick(idx, e)}
- onDoubleClick={() => onItemDoubleClick(idx)}
+ onDoubleClick={() => !_uploading && onItemDoubleClick(idx)}
className="fb-row" style={{
display: 'flex', alignItems: 'center', gap: 8, padding: isSearchMode ? '8px 10px' : '5px 10px',
- cursor: 'pointer', fontSize,
+ cursor: _uploading ? 'default' : 'pointer', fontSize,
borderBottomWidth: 1, borderBottomColor: 'rgba(255,255,255,0.06)', borderBottomStyle: 'solid',
background: isSelected ? SELECTED_BG : isFocused ? FOCUS_BG : 'transparent',
borderLeftWidth: 2, borderLeftColor: isSelected ? SELECTED_BORDER : 'transparent',
borderLeftStyle: isSelected ? 'outset' : 'solid',
outline: isFocused ? `2px solid ${FOCUS_BORDER}` : 'none',
outlineOffset: '-2px',
+ opacity: _uploading ? 0.7 : 1,
+ position: 'relative'
}}>
@@ -99,13 +103,27 @@ const FileListView: React.FC
= ({
{node.parent || '/'}
)}
+ {_uploading && (
+
+ )}
+ {_error && (
+ {_error}
+ )}
{node.size !== undefined && (
-
- {formatSize(node.size)}
+
+ {_error ? '✕' : _uploading ? `${Math.round(_progress || 0)}%` : formatSize(node.size)}
)}
- {mode === 'advanced' && node.mtime && (
+ {mode === 'advanced' && node.mtime && !_uploading && (
{formatDate(node.mtime)}
diff --git a/packages/ui/src/pages/Auth.tsx b/packages/ui/src/pages/Auth.tsx
index f8cd91f3..af772e6c 100644
--- a/packages/ui/src/pages/Auth.tsx
+++ b/packages/ui/src/pages/Auth.tsx
@@ -52,39 +52,6 @@ const Auth = () => {
const { data } = await signUp(formData.email, formData.password, formData.username, formData.displayName);
- // If signing up from an organization context, add user to that organization
- if (data?.user && isOrgContext && orgSlug) {
- try {
- // Get organization ID from slug
- const { data: org, error: orgError } = await supabase
- .from('organizations')
- .select('id')
- .eq('slug', orgSlug)
- .single();
-
- if (orgError) throw orgError;
-
- if (org) {
- // Add user to organization
- const { error: memberError } = await supabase
- .from('user_organizations')
- .insert({
- user_id: data.user.id,
- organization_id: org.id,
- role: 'member'
- });
-
- if (memberError) throw memberError;
-
- toast({
- title: translate('Welcome!'),
- description: translate("You've been added to the organization.")
- });
- }
- } catch (error) {
- console.error('Error adding user to organization:', error);
- }
- }
};
const handleSignIn = async (e: React.FormEvent) => {
diff --git a/packages/ui/src/pages/AuthZ.tsx b/packages/ui/src/pages/AuthZ.tsx
new file mode 100644
index 00000000..83176fd3
--- /dev/null
+++ b/packages/ui/src/pages/AuthZ.tsx
@@ -0,0 +1,78 @@
+import { useState, useEffect } from 'react';
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { Shield, ArrowRight } from 'lucide-react';
+import { T, translate } from '@/i18n';
+import { useAuth } from 'react-oidc-context';
+import { useNavigate } from 'react-router-dom';
+
+const AuthZ = () => {
+ const auth = useAuth();
+ const navigate = useNavigate();
+ const [isLoading, setIsLoading] = useState(false);
+
+ // Monitor auth state changes and log them for debugging
+ useEffect(() => {
+ console.log("🛡️ [AuthZ] Auth State Update:", {
+ isAuthenticated: auth.isAuthenticated,
+ isLoading: auth.isLoading,
+ hasError: !!auth.error,
+ errorMsg: auth.error?.message
+ });
+
+ if (auth.user) {
+ console.log("🛡️ [AuthZ] Identity Token Profile:", auth.user.profile);
+ console.log("🛡️ [AuthZ] Access Token:", auth.user.access_token);
+ }
+
+ if (auth.isAuthenticated) {
+ console.log(`🛡️ [AuthZ] Successfully logged in as: ${auth.user?.profile.email || 'Unknown'}. Redirecting to /...`);
+ navigate('/');
+ }
+ }, [auth.isAuthenticated, auth.isLoading, auth.error, auth.user, navigate]);
+
+ const handleZitadelLogin = async () => {
+ try {
+ setIsLoading(true);
+ await auth.signinRedirect();
+ } catch (e) {
+ console.error(e);
+ setIsLoading(false);
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+ Corporate Login
+
+
+ Sign in securely via Zitadel Identity
+
+
+
+
+ You will be redirected to the secure portal to complete your authentication via Google or company credentials.
+
+
+
+
+
+
+
+ );
+};
+
+export default AuthZ;
diff --git a/packages/ui/src/pages/PlaygroundVfs.tsx b/packages/ui/src/pages/PlaygroundVfs.tsx
new file mode 100644
index 00000000..0989ffe6
--- /dev/null
+++ b/packages/ui/src/pages/PlaygroundVfs.tsx
@@ -0,0 +1,17 @@
+import React from 'react';
+import FileBrowser from '@/apps/filebrowser/FileBrowser';
+
+const PlaygroundVfs = () => {
+ return (
+
+
+
+ );
+};
+
+export default PlaygroundVfs;