Merge branch 'main' into feat/virtualize-file-list

This commit is contained in:
yiling
2026-06-10 17:11:31 +08:00
30 changed files with 954 additions and 733 deletions
+1
View File
@@ -11,6 +11,7 @@ const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
// Don't redirect if we are already on login page, it's an auth request, or we are on a public share page
if (
!window.location.pathname.includes('/login') &&
!window.location.pathname.includes('/signup') &&
!window.location.pathname.startsWith('/share/') &&
!url.includes('/api/authn')
) {
+74
View File
@@ -0,0 +1,74 @@
import { ShumaiLogo } from '@/ui/components/ui/icons'
import { CheckCircle2 } from 'lucide-react'
import { ReactNode } from 'react'
export function AuthLayout({ children }: { children: ReactNode }) {
return (
<div className="min-h-screen w-full flex items-center justify-center p-4 md:p-8 bg-zinc-100/80 dark:bg-black font-sans overflow-hidden relative">
{/* Drifting Background Mesh Blobs */}
<div className="bg-rose-500/10 dark:bg-rose-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute top-[-10%] left-[-10%] animate-drift-slow" />
<div className="bg-orange-500/10 dark:bg-orange-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute bottom-[-10%] right-[-10%] animate-drift-medium" />
{/* Main Glassmorphic Split-Pane Card */}
<div className="relative max-w-4xl w-full flex flex-col md:flex-row rounded-3xl border border-zinc-200 dark:border-zinc-800 shadow-2xl bg-white dark:bg-zinc-900 overflow-hidden min-h-[580px] z-10 transition-all duration-300 hover:shadow-rose-500/5">
{/* Left Pane (Brand Showcase) */}
<div className="hidden md:flex flex-col w-full md:w-1/2 bg-gradient-to-br from-rose-500/15 via-orange-500/10 to-amber-500/5 dark:from-rose-950/30 dark:via-orange-950/15 dark:to-zinc-900/40 p-8 md:p-12 justify-between border-r border-zinc-200 dark:border-zinc-800 relative overflow-hidden">
{/* Subtle Grid Overlay */}
<div className="absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] pointer-events-none" />
{/* Logo & Brand */}
<div className="relative flex items-center gap-3">
<ShumaiLogo className="h-12 w-12 shadow-lg shadow-rose-500/10 rounded-2xl transition-transform duration-500 hover:scale-105" />
<span className="text-xl font-extrabold tracking-tight bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500 bg-clip-text text-transparent">
Shumai
</span>
</div>
{/* Marketing Copy / Feature Points */}
<div className="relative my-8 md:my-0 space-y-6">
<h2 className="text-3xl font-extrabold tracking-tight leading-tight text-zinc-900 dark:text-zinc-50">
One workspace
<br />
for all your
<br />
<span className="bg-gradient-to-r from-rose-500 to-orange-500 bg-clip-text text-transparent">
creative assets.
</span>
</h2>
<p className="text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed max-w-sm">
Upload and index your files, enrich them with custom metadata schemas, draw
annotations directly on media, and gather instant feedback — all in one modern
workspace built for creators.
</p>
<ul className="space-y-3.5 pt-4">
{[
'Instant asset uploads & high-fidelity media players',
'Custom metadata schemas & drawing canvas reviews',
'Frictionless team workspaces & secure sharing',
].map((text, i) => (
<li
key={i}
className="flex items-center gap-3 text-sm text-zinc-700 dark:text-zinc-300 font-medium"
>
<CheckCircle2 className="w-5 h-5 text-rose-500 flex-shrink-0" />
<span>{text}</span>
</li>
))}
</ul>
</div>
{/* Footer Label */}
<div className="relative pt-4 border-t border-zinc-200/30 dark:border-zinc-800/30">
<p className="text-xs text-zinc-500 dark:text-zinc-400 font-medium">
Join our community of developers and designers.
</p>
</div>
</div>
{/* Right Pane (Form Container) */}
<div className="w-full md:w-1/2 p-8 md:p-12 flex flex-col justify-center">{children}</div>
</div>
</div>
)
}
@@ -530,6 +530,10 @@ export function FileBrowser({
const selectedFiles = Array.from(selectedIds).filter((id) =>
displayedFiles.find((item) => item.id === id),
).length
const selectedSize = Array.from(selectedIds).reduce((acc, id) => {
const item = folders.find((f) => f.id === id) || displayedFiles.find((f) => f.id === id)
return acc + (item?.sizeByte || 0)
}, 0)
const handleUploadFilesClick = () => {
fileInputRef.current?.click()
@@ -876,20 +880,20 @@ export function FileBrowser({
<div className="text-sm text-muted-foreground">
{selectedFolders > 0 && selectedFiles > 0 && (
<span>
{selectedFolders} folder
{selectedFolders !== 1 ? 's' : ''}, {selectedFiles} file
{selectedFiles !== 1 ? 's' : ''} selected
{selectedCount} Item{selectedCount !== 1 ? 's' : ''} selected •{' '}
{formatSize(selectedSize)}
</span>
)}
{selectedFolders > 0 && selectedFiles === 0 && (
<span>
{selectedFolders} folder
{selectedFolders !== 1 ? 's' : ''} selected
{selectedFolders} folder{selectedFolders !== 1 ? 's' : ''} selected •{' '}
{formatSize(selectedSize)}
</span>
)}
{selectedFolders === 0 && selectedFiles > 0 && (
<span>
{selectedFiles} file{selectedFiles !== 1 ? 's' : ''} selected
{selectedFiles} file{selectedFiles !== 1 ? 's' : ''} selected •{' '}
{formatSize(selectedSize)}
</span>
)}
</div>
+1 -1
View File
@@ -531,7 +531,7 @@ export function FolderTree({
{!hideShares && (
<div
className={cn(
'flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4',
'flex flex-col overflow-hidden transition-all duration-300 ease-in-out',
isSharesExpanded ? 'flex-1 min-h-0 h-full' : 'flex-none h-[44px] max-h-[44px]',
)}
>
+14 -1
View File
@@ -28,6 +28,7 @@ export interface Member {
name?: string
role?: string
image?: string
scope?: 'team' | 'project'
}
interface MembersDialogProps {
@@ -154,7 +155,19 @@ export function MembersDialog({
</Avatar>
<div className="flex flex-col">
<span className="text-sm font-medium">{member.name}</span>
<span className="text-xs text-muted-foreground capitalize">{member.role}</span>
<div className="flex items-center gap-2">
<span className="text-xs text-muted-foreground capitalize">
{member.role}
</span>
{member.scope && (
<>
<span className="text-[10px] text-muted-foreground/50">•</span>
<span className="text-[10px] bg-muted px-1.5 py-0.5 rounded-full font-medium text-muted-foreground uppercase tracking-wider">
{member.scope === 'team' ? 'Team Member' : 'Project Member'}
</span>
</>
)}
</div>
</div>
</div>
+11 -15
View File
@@ -5,7 +5,6 @@ import { TopNav } from '@/ui/components/top-nav'
import { HomeIcon, NotificationFillIcon, UploadCloudIcon } from '@/ui/components/ui/icons'
import { Toaster } from '@/ui/components/ui/sonner'
import { UploadTasks } from '@/ui/components/upload-tasks'
import { usePermissions } from '@/ui/hooks/use-permissions'
import { useAuthStore } from '@/ui/stores/auth'
import { useTeamContextStore } from '@/ui/stores/team-context'
import { useUploadStore } from '@/ui/stores/upload'
@@ -21,7 +20,6 @@ import { useEffect } from 'react'
function RootComponent() {
const user = useAuthStore((state) => state.user)
const { uploading } = useUploadStore()
const { canEdit } = usePermissions()
const pathname = useRouterState({ select: (s) => s.location.pathname })
const navigate = useNavigate()
@@ -90,19 +88,17 @@ function RootComponent() {
<DualSidebarItem icon={<NotificationFillIcon />} label="Notifications" badge={badge}>
<NotificationList />
</DualSidebarItem>
{canEdit && (
<DualSidebarItem
icon={
<UploadCloudIcon
uploading={uploading > 0}
className={uploading > 0 ? 'text-blue-500' : ''}
/>
}
label="Uploads"
>
<UploadTasks />
</DualSidebarItem>
)}
<DualSidebarItem
icon={
<UploadCloudIcon
uploading={uploading > 0}
className={uploading > 0 ? 'text-blue-500' : ''}
/>
}
label="Uploads"
>
<UploadTasks />
</DualSidebarItem>
</DualSidebar>
<div className="flex flex-col flex-1 md:pl-16 overflow-hidden relative">
<TopNav />
+95 -159
View File
@@ -10,8 +10,9 @@ import { useEffect, useState } from 'react'
import { useForm } from 'react-hook-form'
import { z } from 'zod'
import { signIn } from '@/ui/lib/auth-client'
import { Loader2, Mail, Lock, ArrowRight, LogIn, CheckCircle2 } from 'lucide-react'
import { Loader2, Mail, Lock, ArrowRight, LogIn } from 'lucide-react'
import { ShumaiLogo } from '@/ui/components/ui/icons'
import { AuthLayout } from '@/ui/components/auth-layout'
const loginSchema = z.object({
email: z.string().email('Invalid email address'),
@@ -77,165 +78,100 @@ function LoginPage() {
}
return (
<div className="min-h-screen w-full flex items-center justify-center p-4 md:p-8 bg-zinc-100/80 dark:bg-black font-sans overflow-hidden relative font-sans">
{/* Drifting Background Mesh Blobs */}
<div className="bg-rose-500/10 dark:bg-rose-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute top-[-10%] left-[-10%] animate-drift-slow" />
<div className="bg-orange-500/10 dark:bg-orange-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute bottom-[-10%] right-[-10%] animate-drift-medium" />
{/* Main Glassmorphic Split-Pane Card */}
<div className="relative max-w-4xl w-full flex flex-col md:flex-row rounded-3xl border border-zinc-200 dark:border-zinc-800 shadow-2xl bg-white dark:bg-zinc-900 overflow-hidden min-h-[580px] z-10 transition-all duration-300 hover:shadow-rose-500/5">
{/* Left Pane (Brand Showcase) */}
<div className="w-full md:w-1/2 bg-gradient-to-br from-rose-500/15 via-orange-500/10 to-amber-500/5 dark:from-rose-950/30 dark:via-orange-950/15 dark:to-zinc-900/40 p-8 md:p-12 flex flex-col justify-between border-b md:border-b-0 md:border-r border-zinc-200 dark:border-zinc-800 relative overflow-hidden">
{/* Subtle Grid Overlay */}
<div className="absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] pointer-events-none" />
{/* Logo & Brand */}
<div className="relative flex items-center gap-3">
<ShumaiLogo className="h-12 w-12 shadow-lg shadow-rose-500/10 rounded-2xl transition-transform duration-500 hover:scale-105" />
<span className="text-xl font-extrabold tracking-tight bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500 bg-clip-text text-transparent">
Shumai
</span>
</div>
{/* Marketing Copy / Feature Points */}
<div className="relative my-8 md:my-0 space-y-6">
<h2 className="text-3xl font-extrabold tracking-tight leading-tight text-zinc-900 dark:text-zinc-50">
One workspace
<br />
for all your
<br />
<span className="bg-gradient-to-r from-rose-500 to-orange-500 bg-clip-text text-transparent">
creative assets.
</span>
</h2>
<p className="text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed max-w-sm">
Upload and index your files, enrich them with custom metadata schemas, draw
annotations directly on media, and gather instant feedback — all in one modern
workspace built for creators.
</p>
<ul className="space-y-3.5 pt-4">
{[
'Instant asset uploads & high-fidelity media players',
'Custom metadata schemas & drawing canvas reviews',
'Frictionless team workspaces & secure sharing',
].map((text, i) => (
<li
key={i}
className="flex items-center gap-3 text-sm text-zinc-700 dark:text-zinc-300 font-medium"
>
<CheckCircle2 className="w-5 h-5 text-rose-500 flex-shrink-0" />
<span>{text}</span>
</li>
))}
</ul>
</div>
{/* Footer Label */}
<div className="relative pt-4 border-t border-zinc-200/30 dark:border-zinc-800/30">
<p className="text-xs text-zinc-500 dark:text-zinc-400 font-medium">
Join our community of developers and designers.
</p>
</div>
</div>
{/* Right Pane (Form Container) */}
<div className="w-full md:w-1/2 p-8 md:p-12 flex flex-col justify-center">
<div className="mb-8">
<h1 className="text-2xl font-bold tracking-tight text-zinc-900 dark:text-zinc-50">
Welcome Back
</h1>
<p className="text-zinc-500 dark:text-zinc-400 text-sm mt-1">
Enter your credentials to access your account.
</p>
</div>
{error && (
<div className="mb-6 p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-xl text-sm text-center font-medium">
{error}
</div>
)}
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-5">
<div className="space-y-2">
<Label
htmlFor="email"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Email Address
</Label>
<div className="relative group">
<Mail className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="email"
{...form.register('email')}
placeholder="you@example.com"
type="email"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.email && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.email.message}
</p>
)}
</div>
<div className="space-y-2">
<Label
htmlFor="password"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Password
</Label>
<div className="relative group">
<Lock className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="password"
type="password"
{...form.register('password')}
placeholder="Your password"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.password && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.password.message}
</p>
)}
</div>
<Button
type="submit"
className="w-full h-11 bg-gradient-to-r from-rose-500 to-orange-500 hover:from-rose-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-md shadow-rose-500/10 hover:shadow-rose-500/20 active:scale-[0.98] transition-all flex items-center justify-center gap-2 border-0"
disabled={loading}
>
{loading ? (
<>
<Loader2 className="h-4 w-4 animate-spin" />
Logging in...
</>
) : (
<>
<LogIn className="w-4 h-4" />
Login
</>
)}
</Button>
</form>
<div className="mt-8 pt-6 border-t border-zinc-200/30 dark:border-zinc-800/30 text-center text-sm">
<span className="text-zinc-500 dark:text-zinc-400">Don't have an account? </span>
<a
href="/signup"
className="font-semibold text-rose-500 hover:text-rose-600 dark:text-rose-400 dark:hover:text-rose-300 transition-colors hover:underline inline-flex items-center gap-0.5"
>
Sign up <ArrowRight className="w-3.5 h-3.5" />
</a>
</div>
</div>
<AuthLayout>
<div className="mb-8">
<h1 className="text-2xl font-bold tracking-tight text-zinc-900 dark:text-zinc-50">
Welcome Back
</h1>
<p className="text-zinc-500 dark:text-zinc-400 text-sm mt-1">
Enter your credentials to access your account.
</p>
</div>
</div>
{error && (
<div className="mb-6 p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-xl text-sm text-center font-medium">
{error}
</div>
)}
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-5">
<div className="space-y-2">
<Label
htmlFor="email"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Email Address
</Label>
<div className="relative group">
<Mail className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="email"
{...form.register('email')}
placeholder="you@example.com"
type="email"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.email && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.email.message}
</p>
)}
</div>
<div className="space-y-2">
<Label
htmlFor="password"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Password
</Label>
<div className="relative group">
<Lock className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="password"
type="password"
{...form.register('password')}
placeholder="Your password"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.password && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.password.message}
</p>
)}
</div>
<Button
type="submit"
className="w-full h-11 bg-gradient-to-r from-rose-500 to-orange-500 hover:from-rose-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-md shadow-rose-500/10 hover:shadow-rose-500/20 active:scale-[0.98] transition-all flex items-center justify-center gap-2 border-0"
disabled={loading}
>
{loading ? (
<>
<Loader2 className="h-4 w-4 animate-spin" />
Logging in...
</>
) : (
<>
<LogIn className="w-4 h-4" />
Login
</>
)}
</Button>
</form>
<div className="mt-8 pt-6 border-t border-zinc-200/30 dark:border-zinc-800/30 text-center text-sm">
<span className="text-zinc-500 dark:text-zinc-400">Don't have an account? </span>
<a
href="/signup"
className="font-semibold text-rose-500 hover:text-rose-600 dark:text-rose-400 dark:hover:text-rose-300 transition-colors hover:underline inline-flex items-center gap-0.5"
>
Sign up <ArrowRight className="w-3.5 h-3.5" />
</a>
</div>
</AuthLayout>
)
}
+110 -174
View File
@@ -4,7 +4,7 @@ import { Button } from '@/ui/components/ui/button'
import { Card, CardDescription, CardFooter, CardHeader, CardTitle } from '@/ui/components/ui/card'
import { Input } from '@/ui/components/ui/input'
import { Label } from '@/ui/components/ui/label'
import { Loader2, Mail, Lock, CheckCircle2, ArrowRight, UserPlus } from 'lucide-react'
import { Loader2, Mail, Lock, ArrowRight, UserPlus } from 'lucide-react'
import { useAuthStore } from '@/ui/stores/auth'
import { zodResolver } from '@hookform/resolvers/zod'
import { createFileRoute, redirect, useNavigate } from '@tanstack/react-router'
@@ -13,6 +13,7 @@ import { z } from 'zod'
import { signUp } from '@/ui/lib/auth-client'
import { useState } from 'react'
import { ShumaiLogo } from '@/ui/components/ui/icons'
import { AuthLayout } from '@/ui/components/auth-layout'
const signupSchema = z.object({
email: z.string().email('Invalid email address'),
@@ -135,183 +136,118 @@ function SignupPage() {
}
return (
<div className="min-h-screen w-full flex items-center justify-center p-4 md:p-8 bg-zinc-100/80 dark:bg-black font-sans overflow-hidden relative">
{/* Drifting Background Mesh Blobs */}
<div className="bg-rose-500/10 dark:bg-rose-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute top-[-10%] left-[-10%] animate-drift-slow" />
<div className="bg-orange-500/10 dark:bg-orange-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute bottom-[-10%] right-[-10%] animate-drift-medium" />
<AuthLayout>
<div className="mb-8">
<h1 className="text-2xl font-bold tracking-tight text-zinc-900 dark:text-zinc-50">
Create Account
</h1>
<p className="text-zinc-500 dark:text-zinc-400 text-sm mt-1 mb-4">
Start building and organizing your space.
</p>
{/* Main Glassmorphic Split-Pane Card */}
<div className="relative max-w-4xl w-full flex flex-col md:flex-row rounded-3xl border border-zinc-200 dark:border-zinc-800 shadow-2xl bg-white dark:bg-zinc-900 overflow-hidden min-h-[580px] z-10 transition-all duration-300 hover:shadow-rose-500/5">
{/* Left Pane (Brand Showcase) */}
<div className="w-full md:w-1/2 bg-gradient-to-br from-rose-500/15 via-orange-500/10 to-amber-500/5 dark:from-rose-950/30 dark:via-orange-950/15 dark:to-zinc-900/40 p-8 md:p-12 flex flex-col justify-between border-b md:border-b-0 md:border-r border-zinc-200 dark:border-zinc-800 relative overflow-hidden">
{/* Subtle Grid Overlay */}
<div className="absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] pointer-events-none" />
{/* Logo & Brand */}
<div className="relative flex items-center gap-3">
<ShumaiLogo className="h-12 w-12 shadow-lg shadow-rose-500/10 rounded-2xl transition-transform duration-500 hover:scale-105" />
<span className="text-xl font-extrabold tracking-tight bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500 bg-clip-text text-transparent">
Shumai
{/* Context Banners (First User / Invite Info) */}
{isFirstUser && (
<div className="flex items-start gap-3 p-3 bg-amber-500/10 border border-amber-500/20 text-amber-800 dark:text-amber-300 rounded-2xl text-xs leading-relaxed font-medium">
<span>🎉</span>
<span>You will be the owner of the default workspace as the first user!</span>
</div>
)}
{inviteInfo && !('error' in inviteInfo) && (
<div className="flex items-start gap-3 p-3 bg-rose-500/10 border border-rose-500/20 text-rose-800 dark:text-rose-300 rounded-2xl text-xs leading-relaxed font-medium mt-3">
<span>👋</span>
<span>
<strong>{inviteInfo.inviterName}</strong> invited you to join{' '}
<strong>{inviteInfo.projectName || inviteInfo.teamName}</strong> as a{' '}
<strong>{inviteInfo.role}</strong>.
</span>
</div>
{/* Marketing Copy / Feature Points */}
<div className="relative my-8 md:my-0 space-y-6">
<h2 className="text-3xl font-extrabold tracking-tight leading-tight text-zinc-900 dark:text-zinc-50">
One workspace
<br />
for all your
<br />
<span className="bg-gradient-to-r from-rose-500 to-orange-500 bg-clip-text text-transparent">
creative assets.
</span>
</h2>
<p className="text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed max-w-sm">
Upload and index your files, enrich them with custom metadata schemas, draw
annotations directly on media, and gather instant feedback — all in one modern
workspace built for creators.
</p>
<ul className="space-y-3.5 pt-4">
{[
'Instant asset uploads & high-fidelity media players',
'Custom metadata schemas & drawing canvas reviews',
'Frictionless team workspaces & secure sharing',
].map((text, i) => (
<li
key={i}
className="flex items-center gap-3 text-sm text-zinc-700 dark:text-zinc-300 font-medium"
>
<CheckCircle2 className="w-5 h-5 text-rose-500 flex-shrink-0" />
<span>{text}</span>
</li>
))}
</ul>
</div>
{/* Context Banners (First User / Invite Info) */}
<div className="relative pt-4 border-t border-zinc-200/30 dark:border-zinc-800/30">
{isFirstUser && (
<div className="flex items-start gap-3 p-3 bg-amber-500/10 border border-amber-500/20 text-amber-800 dark:text-amber-300 rounded-2xl text-xs leading-relaxed font-medium">
<span>🎉</span>
<span>You will be the owner of the default workspace as the first user!</span>
</div>
)}
{inviteInfo && !('error' in inviteInfo) && (
<div className="flex items-start gap-3 p-3 bg-rose-500/10 border border-rose-500/20 text-rose-800 dark:text-rose-300 rounded-2xl text-xs leading-relaxed font-medium">
<span>👋</span>
<span>
<strong>{inviteInfo.inviterName}</strong> invited you to join{' '}
<strong>{inviteInfo.teamName || inviteInfo.projectName}</strong> as a{' '}
<strong>{inviteInfo.role}</strong>.
</span>
</div>
)}
{!isFirstUser && !inviteInfo && (
<p className="text-xs text-zinc-500 dark:text-zinc-400 font-medium">
Join our community of developers and designers.
</p>
)}
</div>
</div>
{/* Right Pane (Form Container) */}
<div className="w-full md:w-1/2 p-8 md:p-12 flex flex-col justify-center">
<div className="mb-8">
<h1 className="text-2xl font-bold tracking-tight text-zinc-900 dark:text-zinc-50">
Create Account
</h1>
<p className="text-zinc-500 dark:text-zinc-400 text-sm mt-1">
Start building and organizing your space.
</p>
</div>
{error && (
<div className="mb-6 p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-xl text-sm text-center font-medium">
{error}
</div>
)}
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-5">
<div className="space-y-2">
<Label
htmlFor="email"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Email Address
</Label>
<div className="relative group">
<Mail className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="email"
{...form.register('email')}
placeholder="you@example.com"
type="email"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.email && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.email.message}
</p>
)}
</div>
<div className="space-y-2">
<Label
htmlFor="password"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Password
</Label>
<div className="relative group">
<Lock className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="password"
type="password"
{...form.register('password')}
placeholder="At least 3 characters"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.password && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.password.message}
</p>
)}
</div>
<Button
type="submit"
className="w-full h-11 bg-gradient-to-r from-rose-500 to-orange-500 hover:from-rose-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-md shadow-rose-500/10 hover:shadow-rose-500/20 active:scale-[0.98] transition-all flex items-center justify-center gap-2 border-0"
disabled={loading}
>
{loading ? (
<>
<Loader2 className="h-4 w-4 animate-spin" />
Creating account...
</>
) : (
<>
<UserPlus className="w-4 h-4" />
Sign Up
</>
)}
</Button>
</form>
<div className="mt-8 pt-6 border-t border-zinc-200/30 dark:border-zinc-800/30 text-center text-sm">
<span className="text-zinc-500 dark:text-zinc-400">Already have an account? </span>
<a
href="/login"
className="font-semibold text-rose-500 hover:text-rose-600 dark:text-rose-400 dark:hover:text-rose-300 transition-colors hover:underline inline-flex items-center gap-0.5"
>
Login <ArrowRight className="w-3.5 h-3.5" />
</a>
</div>
</div>
)}
</div>
</div>
{error && (
<div className="mb-6 p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-xl text-sm text-center font-medium">
{error}
</div>
)}
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-5">
<div className="space-y-2">
<Label
htmlFor="email"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Email Address
</Label>
<div className="relative group">
<Mail className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="email"
{...form.register('email')}
placeholder="you@example.com"
type="email"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.email && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.email.message}
</p>
)}
</div>
<div className="space-y-2">
<Label
htmlFor="password"
className="text-xs font-semibold text-zinc-600 dark:text-zinc-400 tracking-wide uppercase"
>
Password
</Label>
<div className="relative group">
<Lock className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-zinc-400 dark:text-zinc-600 transition-colors group-focus-within:text-rose-500" />
<Input
id="password"
type="password"
{...form.register('password')}
placeholder="At least 3 characters"
className="pl-10.5 h-11 border-zinc-200 dark:border-zinc-800 focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"
/>
</div>
{form.formState.errors.password && (
<p className="text-red-500 text-xs font-medium">
{form.formState.errors.password.message}
</p>
)}
</div>
<Button
type="submit"
className="w-full h-11 bg-gradient-to-r from-rose-500 to-orange-500 hover:from-rose-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-md shadow-rose-500/10 hover:shadow-rose-500/20 active:scale-[0.98] transition-all flex items-center justify-center gap-2 border-0"
disabled={loading}
>
{loading ? (
<>
<Loader2 className="h-4 w-4 animate-spin" />
Creating account...
</>
) : (
<>
<UserPlus className="w-4 h-4" />
Sign Up
</>
)}
</Button>
</form>
<div className="mt-8 pt-6 border-t border-zinc-200/30 dark:border-zinc-800/30 text-center text-sm">
<span className="text-zinc-500 dark:text-zinc-400">Already have an account? </span>
<a
href="/login"
className="font-semibold text-rose-500 hover:text-rose-600 dark:text-rose-400 dark:hover:text-rose-300 transition-colors hover:underline inline-flex items-center gap-0.5"
>
Login <ArrowRight className="w-3.5 h-3.5" />
</a>
</div>
</AuthLayout>
)
}
@@ -233,21 +233,23 @@ function TeamSettingsPage() {
)}
</button>
<button
onClick={() => setActiveTab('transcode')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'transcode'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Film className="w-5 h-5" />
Media Processing
{activeTab === 'transcode' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
{me?.role === 'owner' && (
<button
onClick={() => setActiveTab('transcode')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'transcode'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Film className="w-5 h-5" />
Media Processing
{activeTab === 'transcode' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
)}
<button
onClick={() => setActiveTab('notifications')}
@@ -265,73 +267,77 @@ function TeamSettingsPage() {
)}
</button>
<div className="mt-6 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border">
AI
</div>
{me?.role === 'owner' && (
<>
<div className="mt-6 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border">
AI
</div>
<button
onClick={() => setActiveTab('providers')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'providers'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Cpu className="w-5 h-5" />
Providers
{activeTab === 'providers' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('providers')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'providers'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Cpu className="w-5 h-5" />
Providers
{activeTab === 'providers' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('skills')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'skills'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Puzzle className="w-5 h-5" />
Skills
{activeTab === 'skills' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('skills')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'skills'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Puzzle className="w-5 h-5" />
Skills
{activeTab === 'skills' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('agents')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'agents'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Bot className="w-5 h-5" />
Agents
{activeTab === 'agents' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('agents')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'agents'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Bot className="w-5 h-5" />
Agents
{activeTab === 'agents' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('sandbox')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'sandbox'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Shield className="w-5 h-5" />
Agent Sandbox
{activeTab === 'sandbox' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('sandbox')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'sandbox'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Shield className="w-5 h-5" />
Agent Sandbox
{activeTab === 'sandbox' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
</>
)}
</nav>
</div>