refactor: migrate admin pages and components to new design system

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-15 21:18:59 -05:00
parent 4ad202c92d
commit 176fa51b57
20 changed files with 341 additions and 340 deletions

View File

@@ -53,8 +53,8 @@ export function ActionMenu({ items }: ActionMenuProps) {
ref={buttonRef} ref={buttonRef}
onClick={() => setOpen(!open)} onClick={() => setOpen(!open)}
className={cn( className={cn(
'rounded-md p-1.5 text-white/50 transition-colors', 'rounded-md p-1.5 text-muted-foreground transition-colors',
'hover:bg-white/10 hover:text-white' 'hover:bg-accent hover:text-foreground'
)} )}
> >
<MoreHorizontal className="h-4 w-4" /> <MoreHorizontal className="h-4 w-4" />
@@ -63,8 +63,8 @@ export function ActionMenu({ items }: ActionMenuProps) {
<div <div
ref={menuRef} ref={menuRef}
className={cn( className={cn(
'fixed z-50 min-w-[160px] rounded-md border border-white/10', 'fixed z-50 min-w-[160px] rounded-md border border-border',
'bg-black py-1 shadow-lg animate-scale-in' 'bg-card py-1 shadow-lg animate-scale-in'
)} )}
style={{ style={{
top: `${menuPosition.top}px`, top: `${menuPosition.top}px`,
@@ -81,7 +81,7 @@ export function ActionMenu({ items }: ActionMenuProps) {
'disabled:opacity-50 disabled:pointer-events-none', 'disabled:opacity-50 disabled:pointer-events-none',
item.destructive item.destructive
? 'text-red-400 hover:bg-red-400/10' ? 'text-red-400 hover:bg-red-400/10'
: 'text-white/70 hover:bg-white/[0.06]' : 'text-muted-foreground hover:bg-accent'
)} )}
> >
{item.icon} {item.icon}

View File

@@ -36,7 +36,7 @@ export function AdminLayout() {
return ( return (
<div className="flex h-full"> <div className="flex h-full">
{/* Desktop sidebar */} {/* Desktop sidebar */}
<div className="hidden w-60 flex-shrink-0 border-r border-white/[0.06] bg-black md:block"> <div className="hidden w-60 flex-shrink-0 border-r border-border bg-card md:block">
<AdminSidebar /> <AdminSidebar />
</div> </div>
@@ -44,14 +44,14 @@ export function AdminLayout() {
{mobileOpen && ( {mobileOpen && (
<div className="fixed inset-0 z-40 md:hidden"> <div className="fixed inset-0 z-40 md:hidden">
<div <div
className="absolute inset-0 bg-black/80 backdrop-blur-sm" className="absolute inset-0 bg-card/80 backdrop-blur-sm"
onClick={() => setMobileOpen(false)} onClick={() => setMobileOpen(false)}
/> />
<div className="absolute inset-y-0 left-0 w-60 border-r border-white/[0.06] bg-black shadow-xl"> <div className="absolute inset-y-0 left-0 w-60 border-r border-border bg-card shadow-xl">
<div className="flex h-12 items-center justify-end px-3"> <div className="flex h-12 items-center justify-end px-3">
<button <button
onClick={() => setMobileOpen(false)} onClick={() => setMobileOpen(false)}
className="rounded-md p-1.5 text-white/50 hover:bg-white/[0.06]" className="rounded-md p-1.5 text-muted-foreground hover:bg-accent"
> >
<X className="h-4 w-4" /> <X className="h-4 w-4" />
</button> </button>
@@ -67,7 +67,7 @@ export function AdminLayout() {
{/* Mobile menu button */} {/* Mobile menu button */}
<button <button
onClick={() => setMobileOpen(true)} onClick={() => setMobileOpen(true)}
className="mb-4 rounded-md p-2 text-white/50 hover:bg-white/[0.06] md:hidden" className="mb-4 rounded-md p-2 text-muted-foreground hover:bg-accent md:hidden"
> >
<Menu className="h-5 w-5" /> <Menu className="h-5 w-5" />
</button> </button>

View File

@@ -39,7 +39,7 @@ export function AdminSidebar({ className, onNavigate }: AdminSidebarProps) {
return ( return (
<aside className={cn('flex h-full flex-col', className)}> <aside className={cn('flex h-full flex-col', className)}>
<div className="p-4"> <div className="p-4">
<h2 className="text-lg font-bold text-white">Admin Panel</h2> <h2 className="text-lg font-bold text-foreground">Admin Panel</h2>
</div> </div>
<nav className="flex-1 space-y-1 px-3"> <nav className="flex-1 space-y-1 px-3">
{navItems.map((item) => ( {navItems.map((item) => (
@@ -50,8 +50,8 @@ export function AdminSidebar({ className, onNavigate }: AdminSidebarProps) {
className={cn( className={cn(
'flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors', 'flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors',
isActive(item.path, item.end) isActive(item.path, item.end)
? 'bg-white/10 text-white' ? 'bg-accent text-foreground'
: 'text-white/50 hover:bg-white/[0.06] hover:text-white' : 'text-muted-foreground hover:bg-accent hover:text-foreground'
)} )}
> >
<item.icon className="h-4 w-4" /> <item.icon className="h-4 w-4" />
@@ -59,13 +59,13 @@ export function AdminSidebar({ className, onNavigate }: AdminSidebarProps) {
</Link> </Link>
))} ))}
</nav> </nav>
<div className="border-t border-white/[0.06] p-3"> <div className="border-t border-border p-3">
<Link <Link
to="/trees" to="/trees"
onClick={onNavigate} onClick={onNavigate}
className={cn( className={cn(
'flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium', 'flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium',
'text-white/50 hover:bg-white/[0.06] hover:text-white' 'text-muted-foreground hover:bg-accent hover:text-foreground'
)} )}
> >
<ArrowLeft className="h-4 w-4" /> <ArrowLeft className="h-4 w-4" />

View File

@@ -38,7 +38,7 @@ export function CategoryRow({
ref={setNodeRef} ref={setNodeRef}
style={style} style={style}
className={cn( className={cn(
'flex items-center gap-3 glass-card rounded-2xl p-4', 'flex items-center gap-3 bg-card border border-border rounded-xl p-4',
isDragging && 'opacity-50' isDragging && 'opacity-50'
)} )}
> >
@@ -47,7 +47,7 @@ export function CategoryRow({
type="button" type="button"
{...attributes} {...attributes}
{...listeners} {...listeners}
className="cursor-grab touch-none text-white/50 hover:text-white active:cursor-grabbing" className="cursor-grab touch-none text-muted-foreground hover:text-foreground active:cursor-grabbing"
aria-label="Drag to reorder" aria-label="Drag to reorder"
> >
<GripVertical className="h-5 w-5" /> <GripVertical className="h-5 w-5" />
@@ -56,17 +56,17 @@ export function CategoryRow({
{/* Category Info */} {/* Category Info */}
<div className="flex-1"> <div className="flex-1">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<h3 className="font-medium text-white">{category.name}</h3> <h3 className="font-medium text-foreground">{category.name}</h3>
{!category.is_active && ( {!category.is_active && (
<span className="rounded-full bg-white/10 px-2 py-0.5 text-xs font-medium text-white/70"> <span className="rounded-full bg-accent px-2 py-0.5 text-xs font-medium text-muted-foreground">
Archived Archived
</span> </span>
)} )}
</div> </div>
{category.description && ( {category.description && (
<p className="mt-1 text-sm text-white/40">{category.description}</p> <p className="mt-1 text-sm text-muted-foreground">{category.description}</p>
)} )}
<p className="mt-1 text-xs text-white/40"> <p className="mt-1 text-xs text-muted-foreground">
{stepCount} step{stepCount !== 1 ? 's' : ''} {stepCount} step{stepCount !== 1 ? 's' : ''}
</p> </p>
</div> </div>
@@ -77,8 +77,8 @@ export function CategoryRow({
type="button" type="button"
onClick={() => onEdit(category)} onClick={() => onEdit(category)}
className={cn( className={cn(
'rounded-md border border-white/10 bg-black/50 p-2 text-white/50', 'rounded-md border border-border bg-card p-2 text-muted-foreground',
'hover:bg-white/10 hover:text-white' 'hover:bg-accent hover:text-foreground'
)} )}
title="Edit category" title="Edit category"
aria-label="Edit category" aria-label="Edit category"

View File

@@ -59,14 +59,14 @@ export function CreateCategoryModal({
return ( return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm"> <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm">
<div className="w-full max-w-md glass-card rounded-2xl p-6 shadow-lg"> <div className="w-full max-w-md bg-card border border-border rounded-xl p-6 shadow-lg">
{/* Header */} {/* Header */}
<div className="mb-4 flex items-center justify-between"> <div className="mb-4 flex items-center justify-between">
<h2 className="text-lg font-semibold text-white">Create Category</h2> <h2 className="text-lg font-semibold text-foreground">Create Category</h2>
<button <button
onClick={handleClose} onClick={handleClose}
disabled={isSaving} disabled={isSaving}
className="rounded-full p-1 text-white/50 hover:bg-white/10 hover:text-white disabled:opacity-50" className="rounded-full p-1 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-50"
> >
<X className="h-5 w-5" /> <X className="h-5 w-5" />
</button> </button>
@@ -83,7 +83,7 @@ export function CreateCategoryModal({
{/* Name Field */} {/* Name Field */}
<div> <div>
<label htmlFor="name" className="mb-1 block text-sm font-medium text-white"> <label htmlFor="name" className="mb-1 block text-sm font-medium text-foreground">
Category Name <span className="text-red-400">*</span> Category Name <span className="text-red-400">*</span>
</label> </label>
<input <input
@@ -96,21 +96,21 @@ export function CreateCategoryModal({
placeholder="e.g., Network Troubleshooting" placeholder="e.g., Network Troubleshooting"
required required
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40', 'placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20', 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20',
'disabled:opacity-50' 'disabled:opacity-50'
)} )}
/> />
<p className="mt-1 text-xs text-white/40"> <p className="mt-1 text-xs text-muted-foreground">
{name.length}/100 characters {name.length}/100 characters
</p> </p>
</div> </div>
{/* Description Field */} {/* Description Field */}
<div> <div>
<label htmlFor="description" className="mb-1 block text-sm font-medium text-white"> <label htmlFor="description" className="mb-1 block text-sm font-medium text-foreground">
Description <span className="text-white/40">(optional)</span> Description <span className="text-muted-foreground">(optional)</span>
</label> </label>
<textarea <textarea
id="description" id="description"
@@ -120,9 +120,9 @@ export function CreateCategoryModal({
rows={3} rows={3}
placeholder="Brief description of this category..." placeholder="Brief description of this category..."
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40', 'placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20', 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20',
'disabled:opacity-50' 'disabled:opacity-50'
)} )}
/> />
@@ -135,8 +135,8 @@ export function CreateCategoryModal({
onClick={handleClose} onClick={handleClose}
disabled={isSaving} disabled={isSaving}
className={cn( className={cn(
'rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60', 'rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground',
'hover:bg-white/10 hover:text-white disabled:opacity-50' 'hover:bg-accent hover:text-foreground disabled:opacity-50'
)} )}
> >
Cancel Cancel
@@ -145,8 +145,8 @@ export function CreateCategoryModal({
type="submit" type="submit"
disabled={isSaving || !name.trim()} disabled={isSaving || !name.trim()}
className={cn( className={cn(
'rounded-md bg-white px-4 py-2 text-sm font-medium text-black', 'rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium',
'hover:bg-white/90 disabled:opacity-50' 'hover:opacity-90 disabled:opacity-50'
)} )}
> >
{isSaving ? 'Creating...' : 'Create Category'} {isSaving ? 'Creating...' : 'Create Category'}

View File

@@ -50,16 +50,16 @@ export function DataTable<T>({
} }
return ( return (
<div className="overflow-x-auto rounded-lg border border-white/[0.06]"> <div className="overflow-x-auto rounded-lg border border-border">
<table className="w-full text-sm"> <table className="w-full text-sm">
<thead> <thead>
<tr className="border-b border-white/[0.06] bg-white/[0.02]"> <tr className="border-b border-border bg-accent">
{columns.map((col) => ( {columns.map((col) => (
<th <th
key={col.key} key={col.key}
className={cn( className={cn(
'px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-white/50', 'px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground',
col.sortable && 'cursor-pointer select-none hover:text-white', col.sortable && 'cursor-pointer select-none hover:text-foreground',
col.className col.className
)} )}
onClick={col.sortable ? () => handleSort(col.key) : undefined} onClick={col.sortable ? () => handleSort(col.key) : undefined}
@@ -87,10 +87,10 @@ export function DataTable<T>({
<tbody> <tbody>
{isLoading ? ( {isLoading ? (
Array.from({ length: skeletonRows }).map((_, i) => ( Array.from({ length: skeletonRows }).map((_, i) => (
<tr key={i} className="border-b border-white/[0.06] last:border-0"> <tr key={i} className="border-b border-border last:border-0">
{columns.map((col) => ( {columns.map((col) => (
<td key={col.key} className="px-4 py-3"> <td key={col.key} className="px-4 py-3">
<div className="h-4 w-3/4 animate-pulse rounded bg-white/10" /> <div className="h-4 w-3/4 animate-pulse rounded bg-accent" />
</td> </td>
))} ))}
</tr> </tr>
@@ -99,7 +99,7 @@ export function DataTable<T>({
<tr> <tr>
<td colSpan={columns.length} className="px-4 py-12 text-center"> <td colSpan={columns.length} className="px-4 py-12 text-center">
{emptyState || ( {emptyState || (
<span className="text-white/40">No data found</span> <span className="text-muted-foreground">No data found</span>
)} )}
</td> </td>
</tr> </tr>
@@ -107,7 +107,7 @@ export function DataTable<T>({
data.map((item) => ( data.map((item) => (
<tr <tr
key={keyExtractor(item)} key={keyExtractor(item)}
className="border-b border-white/[0.06] last:border-0 hover:bg-white/[0.04] transition-colors" className="border-b border-border last:border-0 hover:bg-accent transition-colors"
> >
{columns.map((col) => ( {columns.map((col) => (
<td key={col.key} className={cn('px-4 py-3', col.className)}> <td key={col.key} className={cn('px-4 py-3', col.className)}>

View File

@@ -68,14 +68,14 @@ export function EditCategoryModal({
return ( return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm"> <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm">
<div className="w-full max-w-md glass-card rounded-2xl p-6 shadow-lg"> <div className="w-full max-w-md bg-card border border-border rounded-xl p-6 shadow-lg">
{/* Header */} {/* Header */}
<div className="mb-4 flex items-center justify-between"> <div className="mb-4 flex items-center justify-between">
<h2 className="text-lg font-semibold text-white">Edit Category</h2> <h2 className="text-lg font-semibold text-foreground">Edit Category</h2>
<button <button
onClick={handleClose} onClick={handleClose}
disabled={isSaving} disabled={isSaving}
className="rounded-full p-1 text-white/50 hover:bg-white/10 hover:text-white disabled:opacity-50" className="rounded-full p-1 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-50"
> >
<X className="h-5 w-5" /> <X className="h-5 w-5" />
</button> </button>
@@ -92,7 +92,7 @@ export function EditCategoryModal({
{/* Name Field */} {/* Name Field */}
<div> <div>
<label htmlFor="edit-name" className="mb-1 block text-sm font-medium text-white"> <label htmlFor="edit-name" className="mb-1 block text-sm font-medium text-foreground">
Category Name <span className="text-red-400">*</span> Category Name <span className="text-red-400">*</span>
</label> </label>
<input <input
@@ -105,21 +105,21 @@ export function EditCategoryModal({
placeholder="e.g., Network Troubleshooting" placeholder="e.g., Network Troubleshooting"
required required
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40', 'placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20', 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20',
'disabled:opacity-50' 'disabled:opacity-50'
)} )}
/> />
<p className="mt-1 text-xs text-white/40"> <p className="mt-1 text-xs text-muted-foreground">
{name.length}/100 characters {name.length}/100 characters
</p> </p>
</div> </div>
{/* Description Field */} {/* Description Field */}
<div> <div>
<label htmlFor="edit-description" className="mb-1 block text-sm font-medium text-white"> <label htmlFor="edit-description" className="mb-1 block text-sm font-medium text-foreground">
Description <span className="text-white/40">(optional)</span> Description <span className="text-muted-foreground">(optional)</span>
</label> </label>
<textarea <textarea
id="edit-description" id="edit-description"
@@ -129,9 +129,9 @@ export function EditCategoryModal({
rows={3} rows={3}
placeholder="Brief description of this category..." placeholder="Brief description of this category..."
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40', 'placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20', 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20',
'disabled:opacity-50' 'disabled:opacity-50'
)} )}
/> />
@@ -144,8 +144,8 @@ export function EditCategoryModal({
onClick={handleClose} onClick={handleClose}
disabled={isSaving} disabled={isSaving}
className={cn( className={cn(
'rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60', 'rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground',
'hover:bg-white/10 hover:text-white disabled:opacity-50' 'hover:bg-accent hover:text-foreground disabled:opacity-50'
)} )}
> >
Cancel Cancel
@@ -154,8 +154,8 @@ export function EditCategoryModal({
type="submit" type="submit"
disabled={isSaving || !name.trim()} disabled={isSaving || !name.trim()}
className={cn( className={cn(
'rounded-md bg-white px-4 py-2 text-sm font-medium text-black', 'rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium',
'hover:bg-white/90 disabled:opacity-50' 'hover:opacity-90 disabled:opacity-50'
)} )}
> >
{isSaving ? 'Saving...' : 'Save Changes'} {isSaving ? 'Saving...' : 'Save Changes'}

View File

@@ -12,10 +12,10 @@ interface EmptyStateProps {
export function EmptyState({ icon, title, description, action, className }: EmptyStateProps) { export function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {
return ( return (
<div className={cn('flex flex-col items-center justify-center py-12 text-center', className)}> <div className={cn('flex flex-col items-center justify-center py-12 text-center', className)}>
{icon && <div className="mb-4 text-white/50">{icon}</div>} {icon && <div className="mb-4 text-muted-foreground">{icon}</div>}
<h3 className="text-lg font-semibold text-white">{title}</h3> <h3 className="text-lg font-semibold text-foreground">{title}</h3>
{description && ( {description && (
<p className="mt-1 max-w-sm text-sm text-white/40">{description}</p> <p className="mt-1 max-w-sm text-sm text-muted-foreground">{description}</p>
)} )}
{action && <div className="mt-4">{action}</div>} {action && <div className="mt-4">{action}</div>}
</div> </div>

View File

@@ -36,20 +36,20 @@ export function Pagination({ page, totalPages, total, pageSize, onPageChange }:
return ( return (
<div className="flex items-center justify-between gap-4 pt-4"> <div className="flex items-center justify-between gap-4 pt-4">
<span className="text-sm text-white/40"> <span className="text-sm text-muted-foreground">
Showing {start}-{end} of {total} Showing {start}-{end} of {total}
</span> </span>
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<button <button
onClick={() => onPageChange(page - 1)} onClick={() => onPageChange(page - 1)}
disabled={page <= 1} disabled={page <= 1}
className={cn(btnBase, 'px-2 text-white/50 hover:bg-white/[0.06] hover:text-white')} className={cn(btnBase, 'px-2 text-muted-foreground hover:bg-accent hover:text-foreground')}
> >
<ChevronLeft className="h-4 w-4" /> <ChevronLeft className="h-4 w-4" />
</button> </button>
{getPageNumbers().map((p, i) => {getPageNumbers().map((p, i) =>
p === 'ellipsis' ? ( p === 'ellipsis' ? (
<span key={`e${i}`} className="px-1 text-white/40">...</span> <span key={`e${i}`} className="px-1 text-muted-foreground">...</span>
) : ( ) : (
<button <button
key={p} key={p}
@@ -58,8 +58,8 @@ export function Pagination({ page, totalPages, total, pageSize, onPageChange }:
btnBase, btnBase,
'px-2', 'px-2',
p === page p === page
? 'bg-white text-black' ? 'bg-gradient-brand text-white shadow-lg shadow-primary/20'
: 'text-white/50 hover:bg-white/[0.06] hover:text-white' : 'text-muted-foreground hover:bg-accent hover:text-foreground'
)} )}
> >
{p} {p}
@@ -69,7 +69,7 @@ export function Pagination({ page, totalPages, total, pageSize, onPageChange }:
<button <button
onClick={() => onPageChange(page + 1)} onClick={() => onPageChange(page + 1)}
disabled={page >= totalPages} disabled={page >= totalPages}
className={cn(btnBase, 'px-2 text-white/50 hover:bg-white/[0.06] hover:text-white')} className={cn(btnBase, 'px-2 text-muted-foreground hover:bg-accent hover:text-foreground')}
> >
<ChevronRight className="h-4 w-4" /> <ChevronRight className="h-4 w-4" />
</button> </button>

View File

@@ -40,21 +40,21 @@ export function SearchInput({ value = '', onSearch, placeholder = 'Search...', c
return ( return (
<div className={cn('relative', className)}> <div className={cn('relative', className)}>
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/50" /> <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
<input <input
type="text" type="text"
value={localValue} value={localValue}
onChange={handleChange} onChange={handleChange}
placeholder={placeholder} placeholder={placeholder}
className={cn( className={cn(
'h-9 w-full rounded-md border border-white/10 bg-black/50 pl-9 pr-8 text-sm text-white', 'h-9 w-full rounded-md border border-border bg-card pl-9 pr-8 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
{localValue && ( {localValue && (
<button <button
onClick={handleClear} onClick={handleClear}
className="absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-white/50 hover:text-white" className="absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground hover:text-foreground"
> >
<X className="h-3.5 w-3.5" /> <X className="h-3.5 w-3.5" />
</button> </button>

View File

@@ -12,7 +12,7 @@ const variantClasses: Record<BadgeVariant, string> = {
success: 'bg-emerald-400/10 text-emerald-400', success: 'bg-emerald-400/10 text-emerald-400',
destructive: 'bg-red-400/10 text-red-400', destructive: 'bg-red-400/10 text-red-400',
warning: 'bg-yellow-400/10 text-yellow-400', warning: 'bg-yellow-400/10 text-yellow-400',
default: 'bg-white/10 text-white/70', default: 'bg-accent text-muted-foreground',
} }
export function StatusBadge({ variant = 'default', children, className }: StatusBadgeProps) { export function StatusBadge({ variant = 'default', children, className }: StatusBadgeProps) {

View File

@@ -64,7 +64,7 @@ export function AuditLogsPage() {
render: (log) => ( render: (log) => (
<button <button
onClick={() => setExpandedId(expandedId === log.id ? null : log.id)} onClick={() => setExpandedId(expandedId === log.id ? null : log.id)}
className="p-1 text-white/50 hover:text-white" className="p-1 text-muted-foreground hover:text-foreground"
> >
{expandedId === log.id ? ( {expandedId === log.id ? (
<ChevronDown className="h-4 w-4" /> <ChevronDown className="h-4 w-4" />
@@ -78,14 +78,14 @@ export function AuditLogsPage() {
key: 'action', key: 'action',
header: 'Action', header: 'Action',
render: (log) => ( render: (log) => (
<span className="text-sm font-medium text-white">{log.action}</span> <span className="text-sm font-medium text-foreground">{log.action}</span>
), ),
}, },
{ {
key: 'resource', key: 'resource',
header: 'Resource', header: 'Resource',
render: (log) => ( render: (log) => (
<span className="text-sm text-white/40"> <span className="text-sm text-muted-foreground">
{log.resource_type}{log.resource_id ? ` (${log.resource_id.slice(0, 8)}...)` : ''} {log.resource_type}{log.resource_id ? ` (${log.resource_id.slice(0, 8)}...)` : ''}
</span> </span>
), ),
@@ -94,14 +94,14 @@ export function AuditLogsPage() {
key: 'user', key: 'user',
header: 'User', header: 'User',
render: (log) => ( render: (log) => (
<span className="text-sm text-white/40">{log.user_email || 'System'}</span> <span className="text-sm text-muted-foreground">{log.user_email || 'System'}</span>
), ),
}, },
{ {
key: 'created_at', key: 'created_at',
header: 'Time', header: 'Time',
render: (log) => ( render: (log) => (
<span className="text-sm text-white/40"> <span className="text-sm text-muted-foreground">
{new Date(log.created_at).toLocaleString()} {new Date(log.created_at).toLocaleString()}
</span> </span>
), ),
@@ -117,8 +117,8 @@ export function AuditLogsPage() {
<button <button
onClick={handleExport} onClick={handleExport}
className={cn( className={cn(
'flex items-center gap-2 rounded-md border border-white/10 px-4 py-2 text-sm font-medium', 'flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium',
'text-white/60 hover:bg-white/10 hover:text-white' 'text-muted-foreground hover:bg-accent hover:text-foreground'
)} )}
> >
<Download className="h-4 w-4" /> <Download className="h-4 w-4" />
@@ -134,8 +134,8 @@ export function AuditLogsPage() {
onChange={(e) => { setActionFilter(e.target.value); setPage(1) }} onChange={(e) => { setActionFilter(e.target.value); setPage(1) }}
placeholder="Filter by action..." placeholder="Filter by action..."
className={cn( className={cn(
'h-9 rounded-md border border-white/10 bg-black/50 px-3 text-sm text-white', 'h-9 rounded-md border border-border bg-card px-3 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
<input <input
@@ -144,8 +144,8 @@ export function AuditLogsPage() {
onChange={(e) => { setResourceFilter(e.target.value); setPage(1) }} onChange={(e) => { setResourceFilter(e.target.value); setPage(1) }}
placeholder="Filter by resource type..." placeholder="Filter by resource type..."
className={cn( className={cn(
'h-9 rounded-md border border-white/10 bg-black/50 px-3 text-sm text-white', 'h-9 rounded-md border border-border bg-card px-3 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
@@ -166,9 +166,9 @@ export function AuditLogsPage() {
{/* Expanded details row */} {/* Expanded details row */}
{expandedId && logs.find(l => l.id === expandedId)?.details && ( {expandedId && logs.find(l => l.id === expandedId)?.details && (
<div className="rounded-md border border-white/[0.06] bg-white/[0.02] p-4"> <div className="rounded-md border border-border bg-accent p-4">
<h4 className="mb-2 text-sm font-medium text-white">Details</h4> <h4 className="mb-2 text-sm font-medium text-foreground">Details</h4>
<pre className="overflow-x-auto rounded bg-black/50 p-3 text-xs text-white/40"> <pre className="overflow-x-auto rounded bg-card p-3 text-xs text-muted-foreground">
{JSON.stringify(logs.find(l => l.id === expandedId)?.details, null, 2)} {JSON.stringify(logs.find(l => l.id === expandedId)?.details, null, 2)}
</pre> </pre>
</div> </div>

View File

@@ -14,13 +14,13 @@ interface MetricCardProps {
function MetricCard({ label, value, icon }: MetricCardProps) { function MetricCard({ label, value, icon }: MetricCardProps) {
return ( return (
<div className="glass-card rounded-2xl p-6"> <div className="bg-card border border-border rounded-xl p-6">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
<p className="text-sm text-white/40">{label}</p> <p className="text-sm text-muted-foreground">{label}</p>
<p className="mt-1 text-3xl font-bold text-white">{value}</p> <p className="mt-1 text-3xl font-bold text-foreground">{value}</p>
</div> </div>
<div className="rounded-lg bg-white/[0.06] p-3 text-white/50">{icon}</div> <div className="rounded-lg bg-accent p-3 text-muted-foreground">{icon}</div>
</div> </div>
</div> </div>
) )
@@ -56,7 +56,7 @@ export function DashboardPage() {
{loading ? ( {loading ? (
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4"> <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
{Array.from({ length: 4 }).map((_, i) => ( {Array.from({ length: 4 }).map((_, i) => (
<div key={i} className="h-32 animate-pulse rounded-lg bg-white/10" /> <div key={i} className="h-32 animate-pulse rounded-lg bg-accent" />
))} ))}
</div> </div>
) : metrics && ( ) : metrics && (
@@ -71,18 +71,18 @@ export function DashboardPage() {
{/* Recent Activity */} {/* Recent Activity */}
{activity.length > 0 && ( {activity.length > 0 && (
<div> <div>
<h2 className="text-lg font-semibold text-white">Recent Activity</h2> <h2 className="text-lg font-semibold text-foreground">Recent Activity</h2>
<div className="mt-3 space-y-2"> <div className="mt-3 space-y-2">
{activity.slice(0, 10).map((entry) => ( {activity.slice(0, 10).map((entry) => (
<div key={entry.id} className="flex items-center justify-between rounded-md border border-white/[0.06] px-4 py-3 text-sm"> <div key={entry.id} className="flex items-center justify-between rounded-md border border-border px-4 py-3 text-sm">
<div> <div>
<span className="font-medium text-white">{entry.action}</span> <span className="font-medium text-foreground">{entry.action}</span>
<span className="ml-2 text-white/40">{entry.resource_type}</span> <span className="ml-2 text-muted-foreground">{entry.resource_type}</span>
{entry.user_email && ( {entry.user_email && (
<span className="ml-2 text-white/40">by {entry.user_email}</span> <span className="ml-2 text-muted-foreground">by {entry.user_email}</span>
)} )}
</div> </div>
<span className="text-xs text-white/40"> <span className="text-xs text-muted-foreground">
{new Date(entry.created_at).toLocaleString()} {new Date(entry.created_at).toLocaleString()}
</span> </span>
</div> </div>
@@ -93,18 +93,18 @@ export function DashboardPage() {
{/* Quick Links */} {/* Quick Links */}
<div> <div>
<h2 className="text-lg font-semibold text-white">Quick Links</h2> <h2 className="text-lg font-semibold text-foreground">Quick Links</h2>
<div className="mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4"> <div className="mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4">
{quickLinks.map((link) => ( {quickLinks.map((link) => (
<Link <Link
key={link.to} key={link.to}
to={link.to} to={link.to}
className={cn( className={cn(
'flex items-center gap-3 glass-card rounded-2xl p-4', 'flex items-center gap-3 bg-card border border-border rounded-xl p-4',
'text-sm font-medium text-white transition-colors hover:bg-white/[0.06]' 'text-sm font-medium text-foreground transition-colors hover:bg-accent'
)} )}
> >
<link.icon className="h-5 w-5 text-white/50" /> <link.icon className="h-5 w-5 text-muted-foreground" />
{link.label} {link.label}
</Link> </Link>
))} ))}

View File

@@ -93,11 +93,11 @@ export function FeatureFlagsPage() {
const flagColumns: Column<FeatureFlagResponse>[] = [ const flagColumns: Column<FeatureFlagResponse>[] = [
{ key: 'name', header: 'Name', render: (f) => ( { key: 'name', header: 'Name', render: (f) => (
<div> <div>
<div className="font-medium text-white">{f.display_name}</div> <div className="font-medium text-foreground">{f.display_name}</div>
<div className="text-xs text-white/40">{f.flag_key}</div> <div className="text-xs text-muted-foreground">{f.flag_key}</div>
</div> </div>
)}, )},
{ key: 'description', header: 'Description', render: (f) => <span className="text-sm text-white/40">{f.description || '-'}</span> }, { key: 'description', header: 'Description', render: (f) => <span className="text-sm text-muted-foreground">{f.description || '-'}</span> },
...PLANS.map(plan => ({ ...PLANS.map(plan => ({
key: plan, key: plan,
header: plan.charAt(0).toUpperCase() + plan.slice(1), header: plan.charAt(0).toUpperCase() + plan.slice(1),
@@ -109,7 +109,7 @@ export function FeatureFlagsPage() {
onClick={() => handleTogglePlan(f.id, plan, enabled)} onClick={() => handleTogglePlan(f.id, plan, enabled)}
className={cn( className={cn(
'h-6 w-10 rounded-full transition-colors', 'h-6 w-10 rounded-full transition-colors',
enabled ? 'bg-emerald-400' : 'bg-white/10' enabled ? 'bg-emerald-400' : 'bg-accent'
)} )}
> >
<div className={cn( <div className={cn(
@@ -131,10 +131,10 @@ export function FeatureFlagsPage() {
] ]
const overrideColumns: Column<AccountFeatureOverrideResponse>[] = [ const overrideColumns: Column<AccountFeatureOverrideResponse>[] = [
{ key: 'account', header: 'Account', render: (o) => <span className="text-sm font-medium text-white">{o.account_display_code || o.account_id.slice(0, 8)}</span> }, { key: 'account', header: 'Account', render: (o) => <span className="text-sm font-medium text-foreground">{o.account_display_code || o.account_id.slice(0, 8)}</span> },
{ key: 'flag', header: 'Flag', render: (o) => <span className="text-sm text-white/40">{o.flag_display_name || o.flag_key || o.flag_id.slice(0, 8)}</span> }, { key: 'flag', header: 'Flag', render: (o) => <span className="text-sm text-muted-foreground">{o.flag_display_name || o.flag_key || o.flag_id.slice(0, 8)}</span> },
{ key: 'enabled', header: 'Enabled', render: (o) => <StatusBadge variant={o.enabled ? 'success' : 'destructive'}>{o.enabled ? 'Yes' : 'No'}</StatusBadge> }, { key: 'enabled', header: 'Enabled', render: (o) => <StatusBadge variant={o.enabled ? 'success' : 'destructive'}>{o.enabled ? 'Yes' : 'No'}</StatusBadge> },
{ key: 'note', header: 'Note', render: (o) => <span className="text-sm text-white/40">{o.note || '-'}</span> }, { key: 'note', header: 'Note', render: (o) => <span className="text-sm text-muted-foreground">{o.note || '-'}</span> },
{ {
key: 'actions', header: '', className: 'w-12', key: 'actions', header: '', className: 'w-12',
render: (o) => ( render: (o) => (
@@ -145,7 +145,7 @@ export function FeatureFlagsPage() {
}, },
] ]
const inputCn = cn('w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20') const inputCn = cn('w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground', 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20')
return ( return (
<div className="space-y-8"> <div className="space-y-8">
@@ -153,7 +153,7 @@ export function FeatureFlagsPage() {
title="Feature Flags" title="Feature Flags"
description="Manage feature availability per plan and account" description="Manage feature availability per plan and account"
action={ action={
<button onClick={() => setCreateOpen(true)} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-white text-black hover:bg-white/90')}> <button onClick={() => setCreateOpen(true)} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90')}>
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
Create Flag Create Flag
</button> </button>
@@ -161,7 +161,7 @@ export function FeatureFlagsPage() {
/> />
<div> <div>
<h2 className="text-lg font-semibold text-white">Feature Matrix</h2> <h2 className="text-lg font-semibold text-foreground">Feature Matrix</h2>
<div className="mt-3"> <div className="mt-3">
<DataTable columns={flagColumns} data={flags} keyExtractor={(f) => f.id} isLoading={loading} <DataTable columns={flagColumns} data={flags} keyExtractor={(f) => f.id} isLoading={loading}
emptyState={<EmptyState icon={<ToggleLeft className="h-12 w-12" />} title="No feature flags" description="Create feature flags to control availability per plan." />} emptyState={<EmptyState icon={<ToggleLeft className="h-12 w-12" />} title="No feature flags" description="Create feature flags to control availability per plan." />}
@@ -171,8 +171,8 @@ export function FeatureFlagsPage() {
<div> <div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h2 className="text-lg font-semibold text-white">Account Overrides</h2> <h2 className="text-lg font-semibold text-foreground">Account Overrides</h2>
<button onClick={() => setOverrideOpen(true)} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-white text-black hover:bg-white/90')}> <button onClick={() => setOverrideOpen(true)} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90')}>
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
Add Override Add Override
</button> </button>
@@ -188,22 +188,22 @@ export function FeatureFlagsPage() {
<Modal isOpen={createOpen} onClose={() => setCreateOpen(false)} title="Create Feature Flag" size="sm" <Modal isOpen={createOpen} onClose={() => setCreateOpen(false)} title="Create Feature Flag" size="sm"
footer={ footer={
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button onClick={() => setCreateOpen(false)} className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white">Cancel</button> <button onClick={() => setCreateOpen(false)} className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground">Cancel</button>
<button onClick={handleCreate} disabled={!createForm.flag_key || !createForm.display_name} className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50">Create</button> <button onClick={handleCreate} disabled={!createForm.flag_key || !createForm.display_name} className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50">Create</button>
</div> </div>
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Flag Key</label> <label className="mb-1 block text-sm font-medium text-foreground">Flag Key</label>
<input type="text" value={createForm.flag_key} onChange={(e) => setCreateForm({ ...createForm, flag_key: e.target.value })} placeholder="e.g. custom_branding" className={inputCn} /> <input type="text" value={createForm.flag_key} onChange={(e) => setCreateForm({ ...createForm, flag_key: e.target.value })} placeholder="e.g. custom_branding" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Display Name</label> <label className="mb-1 block text-sm font-medium text-foreground">Display Name</label>
<input type="text" value={createForm.display_name} onChange={(e) => setCreateForm({ ...createForm, display_name: e.target.value })} placeholder="e.g. Custom Branding" className={inputCn} /> <input type="text" value={createForm.display_name} onChange={(e) => setCreateForm({ ...createForm, display_name: e.target.value })} placeholder="e.g. Custom Branding" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Description</label> <label className="mb-1 block text-sm font-medium text-foreground">Description</label>
<input type="text" value={createForm.description ?? ''} onChange={(e) => setCreateForm({ ...createForm, description: e.target.value || null })} placeholder="Optional description" className={inputCn} /> <input type="text" value={createForm.description ?? ''} onChange={(e) => setCreateForm({ ...createForm, description: e.target.value || null })} placeholder="Optional description" className={inputCn} />
</div> </div>
</div> </div>
@@ -213,29 +213,29 @@ export function FeatureFlagsPage() {
<Modal isOpen={overrideOpen} onClose={() => setOverrideOpen(false)} title="Add Account Override" size="sm" <Modal isOpen={overrideOpen} onClose={() => setOverrideOpen(false)} title="Add Account Override" size="sm"
footer={ footer={
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button onClick={() => setOverrideOpen(false)} className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white">Cancel</button> <button onClick={() => setOverrideOpen(false)} className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground">Cancel</button>
<button onClick={handleCreateOverride} disabled={!overrideForm.account_display_code || !overrideForm.flag_id} className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50">Create</button> <button onClick={handleCreateOverride} disabled={!overrideForm.account_display_code || !overrideForm.flag_id} className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50">Create</button>
</div> </div>
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Display Code</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Display Code</label>
<input type="text" value={overrideForm.account_display_code} onChange={(e) => setOverrideForm({ ...overrideForm, account_display_code: e.target.value })} placeholder="e.g. ABC-1234" className={inputCn} /> <input type="text" value={overrideForm.account_display_code} onChange={(e) => setOverrideForm({ ...overrideForm, account_display_code: e.target.value })} placeholder="e.g. ABC-1234" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Feature Flag</label> <label className="mb-1 block text-sm font-medium text-foreground">Feature Flag</label>
<select value={overrideForm.flag_id} onChange={(e) => setOverrideForm({ ...overrideForm, flag_id: e.target.value })} className={inputCn}> <select value={overrideForm.flag_id} onChange={(e) => setOverrideForm({ ...overrideForm, flag_id: e.target.value })} className={inputCn}>
<option value="">Select a flag...</option> <option value="">Select a flag...</option>
{flags.map(f => <option key={f.id} value={f.id}>{f.display_name}</option>)} {flags.map(f => <option key={f.id} value={f.id}>{f.display_name}</option>)}
</select> </select>
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<input type="checkbox" id="override-enabled" checked={overrideForm.enabled} onChange={(e) => setOverrideForm({ ...overrideForm, enabled: e.target.checked })} className="h-4 w-4 rounded border-white/10" /> <input type="checkbox" id="override-enabled" checked={overrideForm.enabled} onChange={(e) => setOverrideForm({ ...overrideForm, enabled: e.target.checked })} className="h-4 w-4 rounded border-border" />
<label htmlFor="override-enabled" className="text-sm font-medium text-white">Enabled</label> <label htmlFor="override-enabled" className="text-sm font-medium text-foreground">Enabled</label>
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Note</label> <label className="mb-1 block text-sm font-medium text-foreground">Note</label>
<input type="text" value={overrideForm.note ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, note: e.target.value || null })} placeholder="Reason" className={inputCn} /> <input type="text" value={overrideForm.note ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, note: e.target.value || null })} placeholder="Reason" className={inputCn} />
</div> </div>
</div> </div>

View File

@@ -72,10 +72,10 @@ export function GlobalCategoriesPage() {
} }
const columns: Column<AdminCategory>[] = [ const columns: Column<AdminCategory>[] = [
{ key: 'name', header: 'Name', render: (c) => <span className="font-medium text-white">{c.name}</span> }, { key: 'name', header: 'Name', render: (c) => <span className="font-medium text-foreground">{c.name}</span> },
{ key: 'slug', header: 'Slug', render: (c) => <span className="text-sm text-white/40">{c.slug}</span> }, { key: 'slug', header: 'Slug', render: (c) => <span className="text-sm text-muted-foreground">{c.slug}</span> },
{ key: 'description', header: 'Description', render: (c) => <span className="text-sm text-white/40">{c.description || '-'}</span> }, { key: 'description', header: 'Description', render: (c) => <span className="text-sm text-muted-foreground">{c.description || '-'}</span> },
{ key: 'tree_count', header: 'Trees', render: (c) => <span className="text-sm text-white/40">{c.tree_count}</span> }, { key: 'tree_count', header: 'Trees', render: (c) => <span className="text-sm text-muted-foreground">{c.tree_count}</span> },
{ {
key: 'actions', header: '', className: 'w-12', key: 'actions', header: '', className: 'w-12',
render: (c) => ( render: (c) => (
@@ -87,7 +87,7 @@ export function GlobalCategoriesPage() {
}, },
] ]
const inputCn = cn('w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20') const inputCn = cn('w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground', 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20')
return ( return (
<div className="space-y-6"> <div className="space-y-6">
@@ -95,7 +95,7 @@ export function GlobalCategoriesPage() {
title="Global Categories" title="Global Categories"
description="Manage tree categories available to all accounts" description="Manage tree categories available to all accounts"
action={ action={
<button onClick={() => setCreateOpen(true)} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-white text-black hover:bg-white/90')}> <button onClick={() => setCreateOpen(true)} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90')}>
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
Create Category Create Category
</button> </button>
@@ -118,22 +118,22 @@ export function GlobalCategoriesPage() {
size="sm" size="sm"
footer={ footer={
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button onClick={() => setCreateOpen(false)} className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white">Cancel</button> <button onClick={() => setCreateOpen(false)} className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground">Cancel</button>
<button onClick={handleCreate} disabled={!form.name || !form.slug} className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50">Create</button> <button onClick={handleCreate} disabled={!form.name || !form.slug} className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50">Create</button>
</div> </div>
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Name</label> <label className="mb-1 block text-sm font-medium text-foreground">Name</label>
<input type="text" value={form.name} onChange={(e) => { const name = e.target.value; setForm(f => ({ ...f, name, slug: generateSlug(name) })) }} placeholder="e.g. Networking" className={inputCn} /> <input type="text" value={form.name} onChange={(e) => { const name = e.target.value; setForm(f => ({ ...f, name, slug: generateSlug(name) })) }} placeholder="e.g. Networking" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Slug</label> <label className="mb-1 block text-sm font-medium text-foreground">Slug</label>
<input type="text" value={form.slug} onChange={(e) => setForm({ ...form, slug: e.target.value })} placeholder="e.g. networking" className={inputCn} /> <input type="text" value={form.slug} onChange={(e) => setForm({ ...form, slug: e.target.value })} placeholder="e.g. networking" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Description</label> <label className="mb-1 block text-sm font-medium text-foreground">Description</label>
<input type="text" value={form.description ?? ''} onChange={(e) => setForm({ ...form, description: e.target.value || null })} placeholder="Optional description" className={inputCn} /> <input type="text" value={form.description ?? ''} onChange={(e) => setForm({ ...form, description: e.target.value || null })} placeholder="Optional description" className={inputCn} />
</div> </div>
</div> </div>
@@ -147,22 +147,22 @@ export function GlobalCategoriesPage() {
size="sm" size="sm"
footer={ footer={
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button onClick={() => setEditCategory(null)} className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white">Cancel</button> <button onClick={() => setEditCategory(null)} className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground">Cancel</button>
<button onClick={handleUpdate} disabled={!form.name || !form.slug} className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50">Save</button> <button onClick={handleUpdate} disabled={!form.name || !form.slug} className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50">Save</button>
</div> </div>
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Name</label> <label className="mb-1 block text-sm font-medium text-foreground">Name</label>
<input type="text" value={form.name} onChange={(e) => setForm({ ...form, name: e.target.value })} placeholder="e.g. Networking" className={inputCn} /> <input type="text" value={form.name} onChange={(e) => setForm({ ...form, name: e.target.value })} placeholder="e.g. Networking" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Slug</label> <label className="mb-1 block text-sm font-medium text-foreground">Slug</label>
<input type="text" value={form.slug} onChange={(e) => setForm({ ...form, slug: e.target.value })} placeholder="e.g. networking" className={inputCn} /> <input type="text" value={form.slug} onChange={(e) => setForm({ ...form, slug: e.target.value })} placeholder="e.g. networking" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Description</label> <label className="mb-1 block text-sm font-medium text-foreground">Description</label>
<input type="text" value={form.description ?? ''} onChange={(e) => setForm({ ...form, description: e.target.value || null })} placeholder="Optional description" className={inputCn} /> <input type="text" value={form.description ?? ''} onChange={(e) => setForm({ ...form, description: e.target.value || null })} placeholder="Optional description" className={inputCn} />
</div> </div>
</div> </div>

View File

@@ -108,8 +108,8 @@ export function InviteCodesPage() {
} }
const inputClass = cn( const inputClass = cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
) )
const columns: Column<InviteCodeResponse>[] = [ const columns: Column<InviteCodeResponse>[] = [
@@ -117,7 +117,7 @@ export function InviteCodesPage() {
key: 'code', key: 'code',
header: 'Code', header: 'Code',
render: (c) => ( render: (c) => (
<code className="rounded bg-white/10 px-2 py-1 text-sm font-mono text-white/70">{c.code}</code> <code className="rounded bg-accent px-2 py-1 text-sm font-mono text-muted-foreground">{c.code}</code>
), ),
}, },
{ {
@@ -128,12 +128,12 @@ export function InviteCodesPage() {
{c.email_sent ? ( {c.email_sent ? (
<MailCheck className="h-3.5 w-3.5 text-emerald-400" /> <MailCheck className="h-3.5 w-3.5 text-emerald-400" />
) : ( ) : (
<Mail className="h-3.5 w-3.5 text-white/30" /> <Mail className="h-3.5 w-3.5 text-muted-foreground" />
)} )}
<span className="text-sm text-white/60">{c.email}</span> <span className="text-sm text-muted-foreground">{c.email}</span>
</div> </div>
) : ( ) : (
<span className="text-sm text-white/30">&mdash;</span> <span className="text-sm text-muted-foreground">&mdash;</span>
), ),
}, },
{ {
@@ -149,9 +149,9 @@ export function InviteCodesPage() {
key: 'trial', key: 'trial',
header: 'Trial', header: 'Trial',
render: (c) => c.has_trial ? ( render: (c) => c.has_trial ? (
<span className="text-sm text-white/60">{c.trial_duration_days}d</span> <span className="text-sm text-muted-foreground">{c.trial_duration_days}d</span>
) : ( ) : (
<span className="text-sm text-white/30">&mdash;</span> <span className="text-sm text-muted-foreground">&mdash;</span>
), ),
}, },
{ {
@@ -168,7 +168,7 @@ export function InviteCodesPage() {
key: 'expires_at', key: 'expires_at',
header: 'Expires', header: 'Expires',
render: (c) => ( render: (c) => (
<span className="text-sm text-white/40"> <span className="text-sm text-muted-foreground">
{c.expires_at ? new Date(c.expires_at).toLocaleDateString() : 'Never'} {c.expires_at ? new Date(c.expires_at).toLocaleDateString() : 'Never'}
</span> </span>
), ),
@@ -177,7 +177,7 @@ export function InviteCodesPage() {
key: 'created_at', key: 'created_at',
header: 'Created', header: 'Created',
render: (c) => ( render: (c) => (
<span className="text-sm text-white/40"> <span className="text-sm text-muted-foreground">
{new Date(c.created_at).toLocaleDateString()} {new Date(c.created_at).toLocaleDateString()}
</span> </span>
), ),
@@ -219,7 +219,7 @@ export function InviteCodesPage() {
onClick={() => setCreateOpen(true)} onClick={() => setCreateOpen(true)}
className={cn( className={cn(
'flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium',
'bg-white text-black hover:bg-white/90' 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90'
)} )}
> >
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
@@ -251,14 +251,14 @@ export function InviteCodesPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => { setCreateOpen(false); resetForm() }} onClick={() => { setCreateOpen(false); resetForm() }}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleCreate} onClick={handleCreate}
disabled={creating} disabled={creating}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50"
> >
{creating ? 'Creating...' : 'Create'} {creating ? 'Creating...' : 'Create'}
</button> </button>
@@ -267,7 +267,7 @@ export function InviteCodesPage() {
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Recipient Email</label> <label className="mb-1 block text-sm font-medium text-foreground">Recipient Email</label>
<input <input
type="email" type="email"
value={email} value={email}
@@ -278,7 +278,7 @@ export function InviteCodesPage() {
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Plan</label> <label className="mb-1 block text-sm font-medium text-foreground">Plan</label>
<select <select
aria-label="Plan" aria-label="Plan"
value={assignedPlan} value={assignedPlan}
@@ -297,7 +297,7 @@ export function InviteCodesPage() {
{assignedPlan !== 'free' && ( {assignedPlan !== 'free' && (
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Trial Duration (days)</label> <label className="mb-1 block text-sm font-medium text-foreground">Trial Duration (days)</label>
<input <input
type="number" type="number"
value={trialDays} value={trialDays}
@@ -307,12 +307,12 @@ export function InviteCodesPage() {
max={90} max={90}
className={inputClass} className={inputClass}
/> />
<p className="mt-1 text-xs text-white/40">Leave empty for no trial account gets full plan immediately.</p> <p className="mt-1 text-xs text-muted-foreground">Leave empty for no trial account gets full plan immediately.</p>
</div> </div>
)} )}
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Expires in (days)</label> <label className="mb-1 block text-sm font-medium text-foreground">Expires in (days)</label>
<input <input
type="number" type="number"
value={expiresInDays} value={expiresInDays}
@@ -323,7 +323,7 @@ export function InviteCodesPage() {
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Note</label> <label className="mb-1 block text-sm font-medium text-foreground">Note</label>
<input <input
type="text" type="text"
value={note} value={note}

View File

@@ -75,16 +75,16 @@ export function PlanLimitsPage() {
} }
const planColumns: Column<PlanLimitConfig>[] = [ const planColumns: Column<PlanLimitConfig>[] = [
{ key: 'plan', header: 'Plan', render: (p) => <span className="font-medium text-white capitalize">{p.plan}</span> }, { key: 'plan', header: 'Plan', render: (p) => <span className="font-medium text-foreground capitalize">{p.plan}</span> },
{ key: 'max_trees', header: 'Max Trees', render: (p) => <span className="text-sm text-white/40">{p.max_trees ?? 'Unlimited'}</span> }, { key: 'max_trees', header: 'Max Trees', render: (p) => <span className="text-sm text-muted-foreground">{p.max_trees ?? 'Unlimited'}</span> },
{ key: 'max_sessions', header: 'Sessions/Month', render: (p) => <span className="text-sm text-white/40">{p.max_sessions_per_month ?? 'Unlimited'}</span> }, { key: 'max_sessions', header: 'Sessions/Month', render: (p) => <span className="text-sm text-muted-foreground">{p.max_sessions_per_month ?? 'Unlimited'}</span> },
{ key: 'max_users', header: 'Max Users', render: (p) => <span className="text-sm text-white/40">{p.max_users ?? 'Unlimited'}</span> }, { key: 'max_users', header: 'Max Users', render: (p) => <span className="text-sm text-muted-foreground">{p.max_users ?? 'Unlimited'}</span> },
{ {
key: 'actions', header: '', className: 'w-12', key: 'actions', header: '', className: 'w-12',
render: (p) => ( render: (p) => (
<button <button
onClick={() => setEditPlan({ ...p })} onClick={() => setEditPlan({ ...p })}
className="rounded-md px-3 py-1 text-sm text-white/50 hover:bg-white/[0.06] hover:text-white" className="rounded-md px-3 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
> >
Edit Edit
</button> </button>
@@ -93,11 +93,11 @@ export function PlanLimitsPage() {
] ]
const overrideColumns: Column<AccountOverrideResponse>[] = [ const overrideColumns: Column<AccountOverrideResponse>[] = [
{ key: 'account', header: 'Account', render: (o) => <span className="text-sm font-medium text-white">{o.account_display_code || o.account_id.slice(0, 8)}</span> }, { key: 'account', header: 'Account', render: (o) => <span className="text-sm font-medium text-foreground">{o.account_display_code || o.account_id.slice(0, 8)}</span> },
{ key: 'max_trees', header: 'Max Trees', render: (o) => <span className="text-sm text-white/40">{o.override_max_trees ?? '-'}</span> }, { key: 'max_trees', header: 'Max Trees', render: (o) => <span className="text-sm text-muted-foreground">{o.override_max_trees ?? '-'}</span> },
{ key: 'max_sessions', header: 'Sessions/Month', render: (o) => <span className="text-sm text-white/40">{o.override_max_sessions_per_month ?? '-'}</span> }, { key: 'max_sessions', header: 'Sessions/Month', render: (o) => <span className="text-sm text-muted-foreground">{o.override_max_sessions_per_month ?? '-'}</span> },
{ key: 'max_users', header: 'Max Users', render: (o) => <span className="text-sm text-white/40">{o.override_max_users ?? '-'}</span> }, { key: 'max_users', header: 'Max Users', render: (o) => <span className="text-sm text-muted-foreground">{o.override_max_users ?? '-'}</span> },
{ key: 'note', header: 'Note', render: (o) => <span className="text-sm text-white/40">{o.note || '-'}</span> }, { key: 'note', header: 'Note', render: (o) => <span className="text-sm text-muted-foreground">{o.note || '-'}</span> },
{ {
key: 'actions', header: '', className: 'w-12', key: 'actions', header: '', className: 'w-12',
render: (o) => ( render: (o) => (
@@ -109,8 +109,8 @@ export function PlanLimitsPage() {
] ]
const inputCn = cn( const inputCn = cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
) )
return ( return (
@@ -118,7 +118,7 @@ export function PlanLimitsPage() {
<PageHeader title="Plan Limits" description="Configure plan tier limits and account-specific overrides" /> <PageHeader title="Plan Limits" description="Configure plan tier limits and account-specific overrides" />
<div> <div>
<h2 className="text-lg font-semibold text-white">Plan Defaults</h2> <h2 className="text-lg font-semibold text-foreground">Plan Defaults</h2>
<div className="mt-3"> <div className="mt-3">
<DataTable columns={planColumns} data={plans} keyExtractor={(p) => p.plan} isLoading={loading} /> <DataTable columns={planColumns} data={plans} keyExtractor={(p) => p.plan} isLoading={loading} />
</div> </div>
@@ -126,10 +126,10 @@ export function PlanLimitsPage() {
<div> <div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h2 className="text-lg font-semibold text-white">Account Overrides</h2> <h2 className="text-lg font-semibold text-foreground">Account Overrides</h2>
<button <button
onClick={() => setCreateOverride(true)} onClick={() => setCreateOverride(true)}
className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-white text-black hover:bg-white/90')} className={cn('flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium', 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90')}
> >
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
Add Override Add Override
@@ -154,23 +154,23 @@ export function PlanLimitsPage() {
size="sm" size="sm"
footer={ footer={
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button onClick={() => setEditPlan(null)} className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white">Cancel</button> <button onClick={() => setEditPlan(null)} className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground">Cancel</button>
<button onClick={handleSavePlan} className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90">Save</button> <button onClick={handleSavePlan} className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90">Save</button>
</div> </div>
} }
> >
{editPlan && ( {editPlan && (
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Max Trees (empty = unlimited)</label> <label className="mb-1 block text-sm font-medium text-foreground">Max Trees (empty = unlimited)</label>
<input type="number" value={editPlan.max_trees ?? ''} onChange={(e) => setEditPlan({ ...editPlan, max_trees: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} /> <input type="number" value={editPlan.max_trees ?? ''} onChange={(e) => setEditPlan({ ...editPlan, max_trees: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Max Sessions/Month (empty = unlimited)</label> <label className="mb-1 block text-sm font-medium text-foreground">Max Sessions/Month (empty = unlimited)</label>
<input type="number" value={editPlan.max_sessions_per_month ?? ''} onChange={(e) => setEditPlan({ ...editPlan, max_sessions_per_month: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} /> <input type="number" value={editPlan.max_sessions_per_month ?? ''} onChange={(e) => setEditPlan({ ...editPlan, max_sessions_per_month: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Max Users (empty = unlimited)</label> <label className="mb-1 block text-sm font-medium text-foreground">Max Users (empty = unlimited)</label>
<input type="number" value={editPlan.max_users ?? ''} onChange={(e) => setEditPlan({ ...editPlan, max_users: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} /> <input type="number" value={editPlan.max_users ?? ''} onChange={(e) => setEditPlan({ ...editPlan, max_users: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} />
</div> </div>
</div> </div>
@@ -185,30 +185,30 @@ export function PlanLimitsPage() {
size="sm" size="sm"
footer={ footer={
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button onClick={() => setCreateOverride(false)} className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white">Cancel</button> <button onClick={() => setCreateOverride(false)} className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground">Cancel</button>
<button onClick={handleCreateOverride} disabled={!overrideForm.account_display_code} className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50">Create</button> <button onClick={handleCreateOverride} disabled={!overrideForm.account_display_code} className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50">Create</button>
</div> </div>
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Display Code</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Display Code</label>
<input type="text" value={overrideForm.account_display_code} onChange={(e) => setOverrideForm({ ...overrideForm, account_display_code: e.target.value })} placeholder="e.g. ABC-1234" className={inputCn} /> <input type="text" value={overrideForm.account_display_code} onChange={(e) => setOverrideForm({ ...overrideForm, account_display_code: e.target.value })} placeholder="e.g. ABC-1234" className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Max Trees Override</label> <label className="mb-1 block text-sm font-medium text-foreground">Max Trees Override</label>
<input type="number" value={overrideForm.override_max_trees ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, override_max_trees: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} /> <input type="number" value={overrideForm.override_max_trees ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, override_max_trees: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Max Sessions/Month Override</label> <label className="mb-1 block text-sm font-medium text-foreground">Max Sessions/Month Override</label>
<input type="number" value={overrideForm.override_max_sessions_per_month ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, override_max_sessions_per_month: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} /> <input type="number" value={overrideForm.override_max_sessions_per_month ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, override_max_sessions_per_month: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Max Users Override</label> <label className="mb-1 block text-sm font-medium text-foreground">Max Users Override</label>
<input type="number" value={overrideForm.override_max_users ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, override_max_users: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} /> <input type="number" value={overrideForm.override_max_users ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, override_max_users: e.target.value ? parseInt(e.target.value) : null })} className={inputCn} />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Note</label> <label className="mb-1 block text-sm font-medium text-foreground">Note</label>
<input type="text" value={overrideForm.note ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, note: e.target.value || null })} placeholder="Reason for override" className={inputCn} /> <input type="text" value={overrideForm.note ?? ''} onChange={(e) => setOverrideForm({ ...overrideForm, note: e.target.value || null })} placeholder="Reason for override" className={inputCn} />
</div> </div>
</div> </div>

View File

@@ -36,7 +36,7 @@ export function SettingsPage() {
return ( return (
<div className="space-y-6"> <div className="space-y-6">
<PageHeader title="Platform Settings" description="Global platform configuration" /> <PageHeader title="Platform Settings" description="Global platform configuration" />
<div className="h-40 animate-pulse rounded-lg bg-white/10" /> <div className="h-40 animate-pulse rounded-lg bg-accent" />
</div> </div>
) )
} }
@@ -45,11 +45,11 @@ export function SettingsPage() {
<div className="space-y-6"> <div className="space-y-6">
<PageHeader title="Platform Settings" description="Global platform configuration" /> <PageHeader title="Platform Settings" description="Global platform configuration" />
<div className="max-w-xl space-y-6 glass-card rounded-2xl p-6"> <div className="max-w-xl space-y-6 bg-card border border-border rounded-xl p-6">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
<h3 className="font-medium text-white">Maintenance Mode</h3> <h3 className="font-medium text-foreground">Maintenance Mode</h3>
<p className="text-sm text-white/40"> <p className="text-sm text-muted-foreground">
When enabled, users will see a maintenance message instead of the app. When enabled, users will see a maintenance message instead of the app.
</p> </p>
</div> </div>
@@ -57,39 +57,40 @@ export function SettingsPage() {
onClick={() => setSettings({ ...settings, maintenance_mode: !maintenanceMode })} onClick={() => setSettings({ ...settings, maintenance_mode: !maintenanceMode })}
className={cn( className={cn(
'h-6 w-10 rounded-full transition-colors', 'h-6 w-10 rounded-full transition-colors',
maintenanceMode ? 'bg-red-400' : 'bg-white/10' maintenanceMode ? 'bg-red-400' : 'bg-accent'
)} )}
> >
<div className={cn( <div className={cn(
'h-4 w-4 rounded-full bg-white transition-transform', 'h-4 w-4 rounded-full bg-white transition-transform',
maintenanceMode ? 'translate-x-5' : 'translate-x-1' maintenanceMode ? 'translate-x-5' : 'translate-x-1'
)} /> )} />
</button> </button>
</div> </div>
{maintenanceMode && ( {maintenanceMode && (
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Maintenance Message</label> <label className="mb-1 block text-sm font-medium text-foreground">Maintenance Message</label>
<textarea <textarea
value={maintenanceMessage} value={maintenanceMessage}
onChange={(e) => setSettings({ ...settings, maintenance_message: e.target.value })} onChange={(e) => setSettings({ ...settings, maintenance_message: e.target.value })}
rows={3} rows={3}
placeholder="We're performing scheduled maintenance. Please check back later." placeholder="We're performing scheduled maintenance. Please check back later."
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
)} )}
<div className="border-t border-white/[0.06] pt-4"> <div className="border-t border-border pt-4">
<button <button
onClick={handleSave} onClick={handleSave}
disabled={saving} disabled={saving}
className={cn( className={cn(
'rounded-md px-4 py-2 text-sm font-medium', 'rounded-md px-4 py-2 text-sm font-medium',
'bg-white text-black hover:bg-white/90', 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90',
'disabled:opacity-50' 'disabled:opacity-50'
)} )}
> >

View File

@@ -170,21 +170,21 @@ export function UserDetailPage() {
} }
const inputClass = cn( const inputClass = cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
) )
if (loading) { if (loading) {
return ( return (
<div className="flex items-center justify-center py-20"> <div className="flex items-center justify-center py-20">
<div className="h-8 w-8 animate-spin rounded-full border-2 border-white/20 border-t-white" /> <div className="h-8 w-8 animate-spin rounded-full border-2 border-border border-t-foreground" />
</div> </div>
) )
} }
if (!user) { if (!user) {
return ( return (
<div className="py-20 text-center text-white/40">User not found</div> <div className="py-20 text-center text-muted-foreground">User not found</div>
) )
} }
@@ -197,15 +197,15 @@ export function UserDetailPage() {
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<button <button
onClick={() => navigate('/admin/users')} onClick={() => navigate('/admin/users')}
className="rounded-md border border-white/10 p-2 text-white/60 hover:bg-white/10 hover:text-white" className="rounded-md border border-border p-2 text-muted-foreground hover:bg-accent hover:text-foreground"
> >
<ArrowLeft className="h-4 w-4" /> <ArrowLeft className="h-4 w-4" />
</button> </button>
<div className="flex-1"> <div className="flex-1">
<h1 className="text-xl font-semibold text-white"> <h1 className="text-xl font-semibold text-foreground">
{user.full_name || user.email} {user.full_name || user.email}
</h1> </h1>
<p className="text-sm text-white/40">{user.email}</p> <p className="text-sm text-muted-foreground">{user.email}</p>
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{user.is_super_admin && ( {user.is_super_admin && (
@@ -225,21 +225,21 @@ export function UserDetailPage() {
{/* Account & Subscription */} {/* Account & Subscription */}
<div className="grid grid-cols-1 gap-6 md:grid-cols-2"> <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
<div className="glass-card rounded-2xl p-6"> <div className="bg-card border border-border rounded-xl p-6">
<h2 className="mb-4 text-sm font-semibold uppercase tracking-wider text-white/40"> <h2 className="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">
Account & Subscription Account & Subscription
</h2> </h2>
<dl className="space-y-3"> <dl className="space-y-3">
{user.account && ( {user.account && (
<> <>
<div className="flex justify-between"> <div className="flex justify-between">
<dt className="text-sm text-white/60">Account</dt> <dt className="text-sm text-muted-foreground">Account</dt>
<dd className="text-sm text-white">{user.account.name}</dd> <dd className="text-sm text-foreground">{user.account.name}</dd>
</div> </div>
{user.account.display_code && ( {user.account.display_code && (
<div className="flex justify-between"> <div className="flex justify-between">
<dt className="text-sm text-white/60">Display Code</dt> <dt className="text-sm text-muted-foreground">Display Code</dt>
<dd className="text-sm font-mono text-white/70">{user.account.display_code}</dd> <dd className="text-sm font-mono text-muted-foreground">{user.account.display_code}</dd>
</div> </div>
)} )}
</> </>
@@ -247,13 +247,13 @@ export function UserDetailPage() {
{user.subscription ? ( {user.subscription ? (
<> <>
<div className="flex justify-between"> <div className="flex justify-between">
<dt className="text-sm text-white/60">Plan</dt> <dt className="text-sm text-muted-foreground">Plan</dt>
<dd className="text-sm font-semibold text-white"> <dd className="text-sm font-semibold text-foreground">
{user.subscription.plan.charAt(0).toUpperCase() + user.subscription.plan.slice(1)} {user.subscription.plan.charAt(0).toUpperCase() + user.subscription.plan.slice(1)}
</dd> </dd>
</div> </div>
<div className="flex justify-between"> <div className="flex justify-between">
<dt className="text-sm text-white/60">Status</dt> <dt className="text-sm text-muted-foreground">Status</dt>
<dd> <dd>
<StatusBadge variant={user.subscription.status === 'trialing' ? 'warning' : 'success'}> <StatusBadge variant={user.subscription.status === 'trialing' ? 'warning' : 'success'}>
{user.subscription.status} {user.subscription.status}
@@ -262,24 +262,24 @@ export function UserDetailPage() {
</div> </div>
{user.subscription.current_period_end && ( {user.subscription.current_period_end && (
<div className="flex justify-between"> <div className="flex justify-between">
<dt className="text-sm text-white/60">Period End</dt> <dt className="text-sm text-muted-foreground">Period End</dt>
<dd className="text-sm text-white/70">{fmt(user.subscription.current_period_end)}</dd> <dd className="text-sm text-muted-foreground">{fmt(user.subscription.current_period_end)}</dd>
</div> </div>
)} )}
</> </>
) : ( ) : (
<div className="text-sm text-white/40">No subscription</div> <div className="text-sm text-muted-foreground">No subscription</div>
)} )}
<div className="flex justify-between"> <div className="flex justify-between">
<dt className="text-sm text-white/60">Joined</dt> <dt className="text-sm text-muted-foreground">Joined</dt>
<dd className="text-sm text-white/70">{fmt(user.created_at)}</dd> <dd className="text-sm text-muted-foreground">{fmt(user.created_at)}</dd>
</div> </div>
</dl> </dl>
</div> </div>
{/* Admin Actions */} {/* Admin Actions */}
<div className="glass-card rounded-2xl p-6"> <div className="bg-card border border-border rounded-xl p-6">
<h2 className="mb-4 text-sm font-semibold uppercase tracking-wider text-white/40"> <h2 className="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">
Admin Actions Admin Actions
</h2> </h2>
<div className="space-y-3"> <div className="space-y-3">
@@ -290,16 +290,16 @@ export function UserDetailPage() {
setSelectedPlan(user.subscription?.plan || 'free') setSelectedPlan(user.subscription?.plan || 'free')
setPlanModalOpen(true) setPlanModalOpen(true)
}} }}
className="flex w-full items-center gap-3 rounded-lg border border-white/10 px-4 py-3 text-left text-sm text-white/70 hover:bg-white/5 hover:text-white" className="flex w-full items-center gap-3 rounded-lg border border-border px-4 py-3 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
> >
<Shield className="h-4 w-4 text-white/40" /> <Shield className="h-4 w-4 text-muted-foreground" />
Change Plan Change Plan
</button> </button>
<button <button
onClick={() => setTrialModalOpen(true)} onClick={() => setTrialModalOpen(true)}
className="flex w-full items-center gap-3 rounded-lg border border-white/10 px-4 py-3 text-left text-sm text-white/70 hover:bg-white/5 hover:text-white" className="flex w-full items-center gap-3 rounded-lg border border-border px-4 py-3 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
> >
<Clock className="h-4 w-4 text-white/40" /> <Clock className="h-4 w-4 text-muted-foreground" />
{user.subscription?.status === 'trialing' ? 'Extend Trial' : 'Start Trial'} {user.subscription?.status === 'trialing' ? 'Extend Trial' : 'Start Trial'}
</button> </button>
</> </>
@@ -310,9 +310,9 @@ export function UserDetailPage() {
setResetTempPassword(null) setResetTempPassword(null)
setResetModalOpen(true) setResetModalOpen(true)
}} }}
className="flex w-full items-center gap-3 rounded-lg border border-white/10 px-4 py-3 text-left text-sm text-white/70 hover:bg-white/5 hover:text-white" className="flex w-full items-center gap-3 rounded-lg border border-border px-4 py-3 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
> >
<KeyRound className="h-4 w-4 text-white/40" /> <KeyRound className="h-4 w-4 text-muted-foreground" />
Reset Password Reset Password
</button> </button>
<button <button
@@ -363,42 +363,42 @@ export function UserDetailPage() {
{/* Invite Code Used */} {/* Invite Code Used */}
{user.invite_code_used && ( {user.invite_code_used && (
<div className="glass-card rounded-2xl p-6"> <div className="bg-card border border-border rounded-xl p-6">
<h2 className="mb-4 text-sm font-semibold uppercase tracking-wider text-white/40"> <h2 className="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">
<Ticket className="mr-2 inline h-4 w-4" /> <Ticket className="mr-2 inline h-4 w-4" />
Invite Code Used Invite Code Used
</h2> </h2>
<dl className="grid grid-cols-2 gap-4 md:grid-cols-4"> <dl className="grid grid-cols-2 gap-4 md:grid-cols-4">
<div> <div>
<dt className="text-xs text-white/40">Code</dt> <dt className="text-xs text-muted-foreground">Code</dt>
<dd className="mt-1 font-mono text-sm text-white/70">{user.invite_code_used.code}</dd> <dd className="mt-1 font-mono text-sm text-muted-foreground">{user.invite_code_used.code}</dd>
</div> </div>
<div> <div>
<dt className="text-xs text-white/40">Plan Assigned</dt> <dt className="text-xs text-muted-foreground">Plan Assigned</dt>
<dd className="mt-1 text-sm text-white/70"> <dd className="mt-1 text-sm text-muted-foreground">
{user.invite_code_used.assigned_plan.charAt(0).toUpperCase() + user.invite_code_used.assigned_plan.slice(1)} {user.invite_code_used.assigned_plan.charAt(0).toUpperCase() + user.invite_code_used.assigned_plan.slice(1)}
</dd> </dd>
</div> </div>
<div> <div>
<dt className="text-xs text-white/40">Trial Days</dt> <dt className="text-xs text-muted-foreground">Trial Days</dt>
<dd className="mt-1 text-sm text-white/70">{user.invite_code_used.trial_duration_days ?? '—'}</dd> <dd className="mt-1 text-sm text-muted-foreground">{user.invite_code_used.trial_duration_days ?? '—'}</dd>
</div> </div>
<div> <div>
<dt className="text-xs text-white/40">Created By</dt> <dt className="text-xs text-muted-foreground">Created By</dt>
<dd className="mt-1 text-sm text-white/70">{user.invite_code_used.created_by_email ?? '—'}</dd> <dd className="mt-1 text-sm text-muted-foreground">{user.invite_code_used.created_by_email ?? '—'}</dd>
</div> </div>
</dl> </dl>
</div> </div>
)} )}
{/* Tabs: Sessions / Audit Logs */} {/* Tabs: Sessions / Audit Logs */}
<div className="glass-card rounded-2xl"> <div className="bg-card border border-border rounded-xl">
<div className="flex border-b border-white/[0.06]"> <div className="flex border-b border-border">
<button <button
onClick={() => setActiveTab('sessions')} onClick={() => setActiveTab('sessions')}
className={cn( className={cn(
'px-6 py-3 text-sm font-medium', 'px-6 py-3 text-sm font-medium',
activeTab === 'sessions' ? 'border-b-2 border-white text-white' : 'text-white/40 hover:text-white/60' activeTab === 'sessions' ? 'border-b-2 border-foreground text-foreground' : 'text-muted-foreground hover:text-foreground'
)} )}
> >
Sessions ({user.total_sessions}) Sessions ({user.total_sessions})
@@ -407,7 +407,7 @@ export function UserDetailPage() {
onClick={() => setActiveTab('audit')} onClick={() => setActiveTab('audit')}
className={cn( className={cn(
'px-6 py-3 text-sm font-medium', 'px-6 py-3 text-sm font-medium',
activeTab === 'audit' ? 'border-b-2 border-white text-white' : 'text-white/40 hover:text-white/60' activeTab === 'audit' ? 'border-b-2 border-foreground text-foreground' : 'text-muted-foreground hover:text-foreground'
)} )}
> >
Audit Logs ({user.total_audit_logs}) Audit Logs ({user.total_audit_logs})
@@ -419,7 +419,7 @@ export function UserDetailPage() {
user.recent_sessions.length > 0 ? ( user.recent_sessions.length > 0 ? (
<table className="w-full"> <table className="w-full">
<thead> <thead>
<tr className="border-b border-white/[0.06] text-left text-xs text-white/40"> <tr className="border-b border-border text-left text-xs text-muted-foreground">
<th className="pb-2 font-medium">Tree</th> <th className="pb-2 font-medium">Tree</th>
<th className="pb-2 font-medium">Started</th> <th className="pb-2 font-medium">Started</th>
<th className="pb-2 font-medium">Completed</th> <th className="pb-2 font-medium">Completed</th>
@@ -428,17 +428,17 @@ export function UserDetailPage() {
</thead> </thead>
<tbody> <tbody>
{user.recent_sessions.map(s => ( {user.recent_sessions.map(s => (
<tr key={s.id} className="border-b border-white/[0.03]"> <tr key={s.id} className="border-b border-border">
<td className="py-3 text-sm text-white/70">{s.tree_name ?? '—'}</td> <td className="py-3 text-sm text-muted-foreground">{s.tree_name ?? '—'}</td>
<td className="py-3 text-sm text-white/40">{fmtFull(s.started_at)}</td> <td className="py-3 text-sm text-muted-foreground">{fmtFull(s.started_at)}</td>
<td className="py-3 text-sm text-white/40">{fmtFull(s.completed_at)}</td> <td className="py-3 text-sm text-muted-foreground">{fmtFull(s.completed_at)}</td>
<td className="py-3"> <td className="py-3">
{s.outcome ? ( {s.outcome ? (
<StatusBadge variant={s.outcome === 'resolved' ? 'success' : 'default'}> <StatusBadge variant={s.outcome === 'resolved' ? 'success' : 'default'}>
{s.outcome} {s.outcome}
</StatusBadge> </StatusBadge>
) : ( ) : (
<span className="text-sm text-white/30"></span> <span className="text-sm text-muted-foreground"></span>
)} )}
</td> </td>
</tr> </tr>
@@ -446,7 +446,7 @@ export function UserDetailPage() {
</tbody> </tbody>
</table> </table>
) : ( ) : (
<div className="py-8 text-center text-sm text-white/40">No sessions yet</div> <div className="py-8 text-center text-sm text-muted-foreground">No sessions yet</div>
) )
)} )}
@@ -454,7 +454,7 @@ export function UserDetailPage() {
user.recent_audit_logs.length > 0 ? ( user.recent_audit_logs.length > 0 ? (
<table className="w-full"> <table className="w-full">
<thead> <thead>
<tr className="border-b border-white/[0.06] text-left text-xs text-white/40"> <tr className="border-b border-border text-left text-xs text-muted-foreground">
<th className="pb-2 font-medium">Action</th> <th className="pb-2 font-medium">Action</th>
<th className="pb-2 font-medium">Resource</th> <th className="pb-2 font-medium">Resource</th>
<th className="pb-2 font-medium">Time</th> <th className="pb-2 font-medium">Time</th>
@@ -462,16 +462,16 @@ export function UserDetailPage() {
</thead> </thead>
<tbody> <tbody>
{user.recent_audit_logs.map(a => ( {user.recent_audit_logs.map(a => (
<tr key={a.id} className="border-b border-white/[0.03]"> <tr key={a.id} className="border-b border-border">
<td className="py-3 text-sm text-white/70">{a.action}</td> <td className="py-3 text-sm text-muted-foreground">{a.action}</td>
<td className="py-3 text-sm text-white/40">{a.resource_type ?? '—'}</td> <td className="py-3 text-sm text-muted-foreground">{a.resource_type ?? '—'}</td>
<td className="py-3 text-sm text-white/40">{fmtFull(a.created_at)}</td> <td className="py-3 text-sm text-muted-foreground">{fmtFull(a.created_at)}</td>
</tr> </tr>
))} ))}
</tbody> </tbody>
</table> </table>
) : ( ) : (
<div className="py-8 text-center text-sm text-white/40">No audit logs yet</div> <div className="py-8 text-center text-sm text-muted-foreground">No audit logs yet</div>
) )
)} )}
</div> </div>
@@ -487,13 +487,13 @@ export function UserDetailPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setPlanModalOpen(false)} onClick={() => setPlanModalOpen(false)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleChangePlan} onClick={handleChangePlan}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90"
> >
Update Plan Update Plan
</button> </button>
@@ -501,7 +501,7 @@ export function UserDetailPage() {
} }
> >
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Plan</label> <label className="mb-1 block text-sm font-medium text-foreground">Plan</label>
<select <select
aria-label="Subscription plan" aria-label="Subscription plan"
value={selectedPlan} value={selectedPlan}
@@ -525,14 +525,14 @@ export function UserDetailPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setResetModalOpen(false)} onClick={() => setResetModalOpen(false)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleResetPassword} onClick={handleResetPassword}
disabled={resetLoading} disabled={resetLoading}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50"
> >
{resetLoading ? 'Resetting...' : 'Reset Password'} {resetLoading ? 'Resetting...' : 'Reset Password'}
</button> </button>
@@ -540,11 +540,11 @@ export function UserDetailPage() {
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<p className="text-sm text-white/70"> <p className="text-sm text-muted-foreground">
Choose how to reset the password for <span className="font-medium text-white">{user.full_name || user.email}</span>. Choose how to reset the password for <span className="font-medium text-foreground">{user.full_name || user.email}</span>.
</p> </p>
<div className="space-y-2"> <div className="space-y-2">
<label className="flex items-start gap-3 rounded-lg border border-white/10 p-3 cursor-pointer hover:bg-white/5"> <label className="flex items-start gap-3 rounded-lg border border-border p-3 cursor-pointer hover:bg-accent">
<input <input
type="radio" type="radio"
name="reset-mode" name="reset-mode"
@@ -554,11 +554,11 @@ export function UserDetailPage() {
className="mt-0.5" className="mt-0.5"
/> />
<div> <div>
<div className="text-sm font-medium text-white">Send Reset Email</div> <div className="text-sm font-medium text-foreground">Send Reset Email</div>
<div className="text-xs text-white/40">User receives an email with a reset link (30 min expiry)</div> <div className="text-xs text-muted-foreground">User receives an email with a reset link (30 min expiry)</div>
</div> </div>
</label> </label>
<label className="flex items-start gap-3 rounded-lg border border-white/10 p-3 cursor-pointer hover:bg-white/5"> <label className="flex items-start gap-3 rounded-lg border border-border p-3 cursor-pointer hover:bg-accent">
<input <input
type="radio" type="radio"
name="reset-mode" name="reset-mode"
@@ -568,8 +568,8 @@ export function UserDetailPage() {
className="mt-0.5" className="mt-0.5"
/> />
<div> <div>
<div className="text-sm font-medium text-white">Generate Temp Password</div> <div className="text-sm font-medium text-foreground">Generate Temp Password</div>
<div className="text-xs text-white/40">A temporary password is generated. You share it manually.</div> <div className="text-xs text-muted-foreground">A temporary password is generated. You share it manually.</div>
</div> </div>
</label> </label>
</div> </div>
@@ -586,7 +586,7 @@ export function UserDetailPage() {
<div className="flex justify-end"> <div className="flex justify-end">
<button <button
onClick={() => { setResetTempPassword(null); setResetModalOpen(false) }} onClick={() => { setResetTempPassword(null); setResetModalOpen(false) }}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90"
> >
Done Done
</button> </button>
@@ -598,18 +598,18 @@ export function UserDetailPage() {
This password will not be shown again. Copy it now. This password will not be shown again. Copy it now.
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<code className="flex-1 rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white font-mono"> <code className="flex-1 rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground font-mono">
{resetTempPassword} {resetTempPassword}
</code> </code>
<button <button
onClick={handleCopyResetPassword} onClick={handleCopyResetPassword}
className="rounded-md border border-white/10 p-2 text-white/60 hover:bg-white/10 hover:text-white transition-colors" className="rounded-md border border-border p-2 text-muted-foreground hover:bg-accent hover:text-foreground transition-colors"
title="Copy password" title="Copy password"
> >
{resetCopied ? <Check className="h-4 w-4 text-green-400" /> : <Copy className="h-4 w-4" />} {resetCopied ? <Check className="h-4 w-4 text-green-400" /> : <Copy className="h-4 w-4" />}
</button> </button>
</div> </div>
<p className="text-xs text-white/40"> <p className="text-xs text-muted-foreground">
The user will be required to change this password on next login. The user will be required to change this password on next login.
</p> </p>
</div> </div>
@@ -625,13 +625,13 @@ export function UserDetailPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setTrialModalOpen(false)} onClick={() => setTrialModalOpen(false)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleExtendTrial} onClick={handleExtendTrial}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90"
> >
{user.subscription?.status === 'trialing' ? 'Extend' : 'Start Trial'} {user.subscription?.status === 'trialing' ? 'Extend' : 'Start Trial'}
</button> </button>
@@ -639,7 +639,7 @@ export function UserDetailPage() {
} }
> >
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Days to add</label> <label className="mb-1 block text-sm font-medium text-foreground">Days to add</label>
<input <input
type="number" type="number"
value={trialDays} value={trialDays}
@@ -648,7 +648,7 @@ export function UserDetailPage() {
max={90} max={90}
className={inputClass} className={inputClass}
/> />
<p className="mt-1 text-xs text-white/40">1-90 days. Will convert to trialing status if not already.</p> <p className="mt-1 text-xs text-muted-foreground">1-90 days. Will convert to trialing status if not already.</p>
</div> </div>
</Modal> </Modal>
@@ -662,14 +662,14 @@ export function UserDetailPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setHardDeleteModalOpen(false)} onClick={() => setHardDeleteModalOpen(false)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent"
> >
Cancel Cancel
</button> </button>
{hardDeleteBlockers && Object.keys(hardDeleteBlockers).length === 0 && ( {hardDeleteBlockers && Object.keys(hardDeleteBlockers).length === 0 && (
<button <button
onClick={handleHardDelete} onClick={handleHardDelete}
className="rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700" className="rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-foreground hover:bg-red-700"
> >
Delete Permanently Delete Permanently
</button> </button>
@@ -683,11 +683,11 @@ export function UserDetailPage() {
<div className="rounded-xl border border-red-400/20 bg-red-400/10 p-3 text-sm text-red-400"> <div className="rounded-xl border border-red-400/20 bg-red-400/10 p-3 text-sm text-red-400">
This user cannot be deleted because they have dependencies: This user cannot be deleted because they have dependencies:
</div> </div>
<ul className="space-y-1 text-sm text-white/70"> <ul className="space-y-1 text-sm text-muted-foreground">
{Object.entries(hardDeleteBlockers).map(([key, count]) => ( {Object.entries(hardDeleteBlockers).map(([key, count]) => (
<li key={key} className="flex justify-between"> <li key={key} className="flex justify-between">
<span>{key.replace(/_/g, ' ')}</span> <span>{key.replace(/_/g, ' ')}</span>
<span className="font-mono text-white/40">{count}</span> <span className="font-mono text-muted-foreground">{count}</span>
</li> </li>
))} ))}
</ul> </ul>

View File

@@ -188,8 +188,8 @@ export function UsersPage() {
sortable: true, sortable: true,
render: (u) => ( render: (u) => (
<div> <div>
<div className="font-medium text-white">{u.name}</div> <div className="font-medium text-foreground">{u.name}</div>
<div className="text-xs text-white/40">{u.email}</div> <div className="text-xs text-muted-foreground">{u.email}</div>
</div> </div>
), ),
}, },
@@ -224,7 +224,7 @@ export function UsersPage() {
header: 'Joined', header: 'Joined',
sortable: true, sortable: true,
render: (u) => ( render: (u) => (
<span className="text-sm text-white/40"> <span className="text-sm text-muted-foreground">
{new Date(u.created_at).toLocaleDateString()} {new Date(u.created_at).toLocaleDateString()}
</span> </span>
), ),
@@ -268,14 +268,14 @@ export function UsersPage() {
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<button <button
onClick={() => setShowInviteModal(true)} onClick={() => setShowInviteModal(true)}
className="flex items-center gap-2 rounded-lg border border-white/10 px-4 py-2 text-sm font-medium text-white hover:bg-white/10 transition-colors" className="flex items-center gap-2 rounded-lg border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors"
> >
<Mail className="h-4 w-4" /> <Mail className="h-4 w-4" />
Invite User Invite User
</button> </button>
<button <button
onClick={() => setShowCreateModal(true)} onClick={() => setShowCreateModal(true)}
className="flex items-center gap-2 rounded-lg bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 transition-colors" className="flex items-center gap-2 rounded-lg bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 transition-colors"
> >
<UserPlus className="h-4 w-4" /> <UserPlus className="h-4 w-4" />
Create User Create User
@@ -290,12 +290,12 @@ export function UsersPage() {
placeholder="Search by name or email..." placeholder="Search by name or email..."
className="max-w-sm" className="max-w-sm"
/> />
<label className="flex items-center gap-2 text-sm text-white/60"> <label className="flex items-center gap-2 text-sm text-muted-foreground">
<input <input
type="checkbox" type="checkbox"
checked={showArchived} checked={showArchived}
onChange={(e) => { setShowArchived(e.target.checked); setPage(1) }} onChange={(e) => { setShowArchived(e.target.checked); setPage(1) }}
className="rounded border-white/20 bg-black/50" className="rounded border-border bg-card"
/> />
Show archived Show archived
</label> </label>
@@ -326,13 +326,13 @@ export function UsersPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setRoleModalUser(null)} onClick={() => setRoleModalUser(null)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground/60 hover:bg-accent hover:text-foreground"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleRoleChange} onClick={handleRoleChange}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90"
> >
Save Save
</button> </button>
@@ -340,15 +340,15 @@ export function UsersPage() {
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<p className="text-sm text-white/70"> <p className="text-sm text-muted-foreground">
Changing role for <span className="font-medium text-white">{roleModalUser?.name}</span> Changing role for <span className="font-medium text-foreground">{roleModalUser?.name}</span>
</p> </p>
<select <select
value={newRole} value={newRole}
onChange={(e) => setNewRole(e.target.value)} onChange={(e) => setNewRole(e.target.value)}
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
> >
<option value="engineer">Engineer</option> <option value="engineer">Engineer</option>
@@ -367,14 +367,14 @@ export function UsersPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setMoveModalUser(null)} onClick={() => setMoveModalUser(null)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground/60 hover:bg-accent hover:text-foreground"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleMoveAccount} onClick={handleMoveAccount}
disabled={!displayCode} disabled={!displayCode}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50"
> >
Move Move
</button> </button>
@@ -382,19 +382,19 @@ export function UsersPage() {
} }
> >
<div className="space-y-4"> <div className="space-y-4">
<p className="text-sm text-white/70"> <p className="text-sm text-muted-foreground">
Moving <span className="font-medium text-white">{moveModalUser?.name}</span> to a new account. Moving <span className="font-medium text-foreground">{moveModalUser?.name}</span> to a new account.
</p> </p>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Display Code</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Display Code</label>
<input <input
type="text" type="text"
value={displayCode} value={displayCode}
onChange={(e) => setDisplayCode(e.target.value)} onChange={(e) => setDisplayCode(e.target.value)}
placeholder="e.g. ABC-1234" placeholder="e.g. ABC-1234"
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
@@ -411,14 +411,14 @@ export function UsersPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setShowCreateModal(false)} onClick={() => setShowCreateModal(false)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground/60 hover:bg-accent hover:text-foreground"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleCreateUser} onClick={handleCreateUser}
disabled={createLoading || !createForm.email || !createForm.name} disabled={createLoading || !createForm.email || !createForm.name}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50"
> >
{createLoading ? 'Creating...' : 'Create User'} {createLoading ? 'Creating...' : 'Create User'}
</button> </button>
@@ -427,39 +427,39 @@ export function UsersPage() {
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Name</label> <label className="mb-1 block text-sm font-medium text-foreground">Name</label>
<input <input
type="text" type="text"
value={createForm.name} value={createForm.name}
onChange={(e) => setCreateForm(f => ({ ...f, name: e.target.value }))} onChange={(e) => setCreateForm(f => ({ ...f, name: e.target.value }))}
placeholder="Full name" placeholder="Full name"
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Email</label> <label className="mb-1 block text-sm font-medium text-foreground">Email</label>
<input <input
type="email" type="email"
value={createForm.email} value={createForm.email}
onChange={(e) => setCreateForm(f => ({ ...f, email: e.target.value }))} onChange={(e) => setCreateForm(f => ({ ...f, email: e.target.value }))}
placeholder="user@example.com" placeholder="user@example.com"
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Mode</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Mode</label>
<select <select
value={createForm.account_mode} value={createForm.account_mode}
onChange={(e) => setCreateForm(f => ({ ...f, account_mode: e.target.value as 'existing' | 'personal' }))} onChange={(e) => setCreateForm(f => ({ ...f, account_mode: e.target.value as 'existing' | 'personal' }))}
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
> >
<option value="personal">Personal (new account)</option> <option value="personal">Personal (new account)</option>
@@ -469,26 +469,26 @@ export function UsersPage() {
{createForm.account_mode === 'existing' && ( {createForm.account_mode === 'existing' && (
<> <>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Display Code</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Display Code</label>
<input <input
type="text" type="text"
value={createForm.account_display_code} value={createForm.account_display_code}
onChange={(e) => setCreateForm(f => ({ ...f, account_display_code: e.target.value }))} onChange={(e) => setCreateForm(f => ({ ...f, account_display_code: e.target.value }))}
placeholder="e.g. ABC12345" placeholder="e.g. ABC12345"
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Role</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Role</label>
<select <select
value={createForm.account_role} value={createForm.account_role}
onChange={(e) => setCreateForm(f => ({ ...f, account_role: e.target.value as 'engineer' | 'viewer' }))} onChange={(e) => setCreateForm(f => ({ ...f, account_role: e.target.value as 'engineer' | 'viewer' }))}
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
> >
<option value="engineer">Engineer</option> <option value="engineer">Engineer</option>
@@ -503,9 +503,9 @@ export function UsersPage() {
id="send-email" id="send-email"
checked={createForm.send_email} checked={createForm.send_email}
onChange={(e) => setCreateForm(f => ({ ...f, send_email: e.target.checked }))} onChange={(e) => setCreateForm(f => ({ ...f, send_email: e.target.checked }))}
className="rounded border-white/20 bg-black/50" className="rounded border-border bg-card"
/> />
<label htmlFor="send-email" className="text-sm text-white/70"> <label htmlFor="send-email" className="text-sm text-muted-foreground">
Send welcome email with temporary password Send welcome email with temporary password
</label> </label>
</div> </div>
@@ -522,7 +522,7 @@ export function UsersPage() {
<div className="flex justify-end"> <div className="flex justify-end">
<button <button
onClick={() => setTempPassword(null)} onClick={() => setTempPassword(null)}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90"
> >
Done Done
</button> </button>
@@ -534,21 +534,21 @@ export function UsersPage() {
This password will not be shown again. Copy it now. This password will not be shown again. Copy it now.
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Temporary Password</label> <label className="mb-1 block text-sm font-medium text-foreground">Temporary Password</label>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<code className="flex-1 rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white font-mono"> <code className="flex-1 rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground font-mono">
{tempPassword} {tempPassword}
</code> </code>
<button <button
onClick={handleCopyPassword} onClick={handleCopyPassword}
className="rounded-md border border-white/10 p-2 text-white/60 hover:bg-white/10 hover:text-white transition-colors" className="rounded-md border border-border p-2 text-muted-foreground hover:bg-accent hover:text-foreground transition-colors"
title="Copy password" title="Copy password"
> >
{copied ? <Check className="h-4 w-4 text-green-400" /> : <Copy className="h-4 w-4" />} {copied ? <Check className="h-4 w-4 text-green-400" /> : <Copy className="h-4 w-4" />}
</button> </button>
</div> </div>
</div> </div>
<p className="text-xs text-white/40"> <p className="text-xs text-muted-foreground">
The user will be required to change this password on first login. The user will be required to change this password on first login.
</p> </p>
</div> </div>
@@ -564,14 +564,14 @@ export function UsersPage() {
<div className="flex justify-end gap-3"> <div className="flex justify-end gap-3">
<button <button
onClick={() => setShowInviteModal(false)} onClick={() => setShowInviteModal(false)}
className="rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60 hover:bg-white/10 hover:text-white" className="rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground/60 hover:bg-accent hover:text-foreground"
> >
Cancel Cancel
</button> </button>
<button <button
onClick={handleInviteUser} onClick={handleInviteUser}
disabled={inviteLoading || !inviteForm.email || !inviteForm.account_display_code} disabled={inviteLoading || !inviteForm.email || !inviteForm.account_display_code}
className="rounded-md bg-white px-4 py-2 text-sm font-medium text-black hover:bg-white/90 disabled:opacity-50" className="rounded-md bg-gradient-brand text-white shadow-lg shadow-primary/20 px-4 py-2 text-sm font-medium hover:opacity-90 disabled:opacity-50"
> >
{inviteLoading ? 'Sending...' : 'Send Invite'} {inviteLoading ? 'Sending...' : 'Send Invite'}
</button> </button>
@@ -580,39 +580,39 @@ export function UsersPage() {
> >
<div className="space-y-4"> <div className="space-y-4">
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Email</label> <label className="mb-1 block text-sm font-medium text-foreground">Email</label>
<input <input
type="email" type="email"
value={inviteForm.email} value={inviteForm.email}
onChange={(e) => setInviteForm(f => ({ ...f, email: e.target.value }))} onChange={(e) => setInviteForm(f => ({ ...f, email: e.target.value }))}
placeholder="user@example.com" placeholder="user@example.com"
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Account Display Code</label> <label className="mb-1 block text-sm font-medium text-foreground">Account Display Code</label>
<input <input
type="text" type="text"
value={inviteForm.account_display_code} value={inviteForm.account_display_code}
onChange={(e) => setInviteForm(f => ({ ...f, account_display_code: e.target.value }))} onChange={(e) => setInviteForm(f => ({ ...f, account_display_code: e.target.value }))}
placeholder="e.g. ABC12345" placeholder="e.g. ABC12345"
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'placeholder:text-white/40 focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'placeholder:text-muted-foreground focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
/> />
</div> </div>
<div> <div>
<label className="mb-1 block text-sm font-medium text-white">Role</label> <label className="mb-1 block text-sm font-medium text-foreground">Role</label>
<select <select
value={inviteForm.role} value={inviteForm.role}
onChange={(e) => setInviteForm(f => ({ ...f, role: e.target.value as 'engineer' | 'viewer' }))} onChange={(e) => setInviteForm(f => ({ ...f, role: e.target.value as 'engineer' | 'viewer' }))}
className={cn( className={cn(
'w-full rounded-md border border-white/10 bg-black/50 px-3 py-2 text-sm text-white', 'w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground',
'focus:outline-none focus:border-white/30 focus:ring-2 focus:ring-white/20' 'focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20'
)} )}
> >
<option value="engineer">Engineer</option> <option value="engineer">Engineer</option>