Build [v1.14.28]

This commit is contained in:
2026-04-25 12:43:41 +03:00
parent 5393b237de
commit 8dc8b7da9f
15 changed files with 227 additions and 213 deletions

View File

@@ -18,7 +18,7 @@ export default function AdminPage() {
return (
<PageShell>
<div className="flex items-center justify-center min-h-[60vh]">
<div className="w-12 h-12 border-4 border-indigo-500/20 border-t-indigo-500 rounded-full animate-spin" />
<div className="w-12 h-12 border-4 border-primary/20 border-t-primary rounded-none animate-spin" />
</div>
</PageShell>
);
@@ -26,18 +26,18 @@ export default function AdminPage() {
return (
<PageShell>
<main data-testid="admin-page" className="p-3 md:p-8 max-w-7xl mx-auto space-y-3 md:space-y-6 mb-20">
<main data-testid="admin-page" className="p-3 md:p-8 max-w-7xl mx-auto space-y-3 md:space-y-6 mb-20 font-sans">
<header className="flex items-center gap-4 mb-4 md:mb-6">
<div className="p-3 md:p-4 bg-indigo-500/10 rounded-2xl text-indigo-400 border border-indigo-500/20 shadow-xl shadow-indigo-500/5">
<div className="p-3 md:p-4 bg-primary/10 rounded-none text-primary border border-primary/20 shadow-none">
<Shield size={28} className="md:w-8 md:h-8" />
</div>
<div>
<h1 className="text-2xl md:text-3xl font-normal tracking-tight text-white leading-tight">Admin Control</h1>
<p className="text-[10px] md:text-xs text-muted font-normal tracking-tight mt-0.5">System Configuration & Security</p>
<p className="text-[10px] md:text-xs text-[#888888] font-normal tracking-tight mt-0.5">System Configuration & Security</p>
</div>
<button
onClick={admin.handleLogout}
className="ml-auto p-3 lg:p-4 xl:p-5 lg:p-6 xl:p-8 bg-surface border border-slate-800 text-muted hover:text-rose-500 rounded-2xl transition-all active:scale-95 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:ring-rose-500 focus-visible:outline-none"
className="ml-auto p-3 bg-[#1A1A1A] border border-[#222222] text-[#888888] hover:text-rose-500 rounded-none transition-all active:scale-95 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:ring-rose-500 focus-visible:outline-none"
title="Secure Logout"
aria-label="Logout from admin panel"
>

View File

@@ -39,9 +39,23 @@
h1, h2, h3, h4, h5, h6 {
@apply tracking-tighter;
}
input, textarea, select {
@apply bg-black border border-[#222222] text-white px-3 py-2 focus:border-primary focus:outline-none transition-colors;
border-radius: 0 !important;
}
}
@layer components {
/* Button Styles */
.btn-primary {
@apply bg-primary text-black px-4 py-2 hover:bg-[#d47214] transition-colors inline-flex items-center justify-center gap-2;
}
.btn-secondary {
@apply bg-transparent border border-[#888888] text-[#888888] px-4 py-2 hover:border-white hover:text-white transition-colors inline-flex items-center justify-center gap-2;
}
/* Level 1 (Cards/Panels): #121212 with a 1px solid border of #222222 */
.level-1 {
@apply bg-[#121212] border border-[#222222];

View File

@@ -266,7 +266,7 @@ export default function InventoryPage() {
return (
<PageShell>
<div className="p-3 md:p-8 max-w-7xl mx-auto space-y-3 md:space-y-4">
<div className="p-3 md:p-8 max-w-7xl mx-auto space-y-3 md:space-y-4 font-sans">
<datalist id="existing-types">
{existingTypes.map(t => <option key={t} value={t} />)}
</datalist>
@@ -275,23 +275,23 @@ export default function InventoryPage() {
</datalist>
<header className="flex items-center gap-4 mb-4 md:mb-6">
<div className="p-3 md:p-4 bg-primary/10 text-primary border border-primary/20">
<div className="p-3 md:p-4 bg-primary/10 text-primary border border-primary/20 rounded-none">
<Package size={28} className="md:w-8 md:h-8" />
</div>
<div>
<h1 className="text-2xl md:text-3xl font-normal tracking-tight text-white leading-tight">Inventory Catalog</h1>
<p className="text-xs md:text-sm text-secondary font-normal mt-1 tracking-widest">Enterprise Stock Overview</p>
<p className="text-xs md:text-sm text-[#888888] font-normal mt-1 tracking-widest">Enterprise Stock Overview</p>
</div>
<button
onClick={() => setShowSearchModal(true)}
className="ml-auto p-3 bg-surface border border-border text-secondary hover:text-primary transition-all active:scale-95"
className="ml-auto p-3 bg-[#1A1A1A] border border-[#222222] text-[#888888] hover:text-primary transition-all active:scale-95 rounded-none"
title="Search Inventory"
>
<Search size={20} />
</button>
<button
onClick={() => setShowBoxManager(true)}
className="p-3 bg-surface border border-border text-secondary hover:text-primary transition-all active:scale-95"
className="p-3 bg-[#1A1A1A] border border-[#222222] text-[#888888] hover:text-primary transition-all active:scale-95 rounded-none"
title="Manage Boxes"
>
<Layout size={20} />
@@ -347,12 +347,12 @@ export default function InventoryPage() {
{/* Stock Adjustment / Edit Item Overlay */}
{selectedItem && (
<div className="fixed inset-0 z-50 flex items-end sm:items-center justify-center p-0 sm:p-4 bg-background/80 animate-in fade-in duration-200">
<div className="w-full max-w-lg bg-surface border-x border-t sm:border border-border p-5 sm:p-8 overflow-hidden animate-in slide-in-from-bottom-10 duration-300">
<div className="w-full max-w-lg bg-[#0A0A0A] border-x border-t sm:border border-[#222222] p-5 sm:p-8 overflow-hidden animate-in slide-in-from-bottom-10 duration-300 rounded-none">
<div className="flex justify-between items-center mb-3 md:mb-4">
<h3 className="text-xl font-normal tracking-tight flex items-center gap-2">
{isEditing ? "Edit Item" : selectedItem.name}
{!isEditing && (
<span className="text-xs bg-black text-secondary px-3 py-1 border border-border font-normal tracking-tight">
<span className="text-xs bg-black text-[#888888] px-3 py-1 border border-[#222222] font-normal tracking-tight">
In Stock: {selectedItem.quantity}
</span>
)}
@@ -364,7 +364,7 @@ export default function InventoryPage() {
setEditedItem(selectedItem);
setIsEditing(true);
}}
className="p-2 hover:bg-black border border-transparent hover:border-border text-secondary"
className="p-2 hover:bg-black border border-transparent hover:border-[#222222] text-[#888888] rounded-none"
>
<Edit2 size={20} />
</button>
@@ -372,7 +372,7 @@ export default function InventoryPage() {
{isEditing && (
<button
onClick={handleDeleteItem}
className="p-2 hover:bg-red-500/20 border border-transparent hover:border-red-500/50 text-red-500"
className="p-2 hover:bg-red-500/20 border border-transparent hover:border-red-500/50 text-red-500 rounded-none"
>
<Trash2 size={20} />
</button>
@@ -383,7 +383,7 @@ export default function InventoryPage() {
setIsEditing(false);
setAdjustQty(1);
}}
className="p-2 hover:bg-black border border-transparent hover:border-border"
className="p-2 hover:bg-black border border-transparent hover:border-[#222222] rounded-none"
>
<X size={20} />
</button>
@@ -393,32 +393,32 @@ export default function InventoryPage() {
{isEditing ? (
<div className="max-h-[60vh] overflow-y-auto pr-2 space-y-2 md:space-y-3 mb-4 md:mb-6 scrollbar-hide">
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Name</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Item Name</label>
<input
type="text"
value={editedItem.name || ''}
onChange={e => setEditedItem({...editedItem, name: e.target.value})}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Part Number</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Part Number</label>
<input
type="text"
value={editedItem.part_number || ''}
onChange={e => setEditedItem({...editedItem, part_number: e.target.value})}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
<div className="grid grid-cols-2 gap-2 md:gap-3">
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Category</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Category</label>
<input
type="text"
list="existing-categories"
value={editedItem.category || ''}
onChange={e => setEditedItem({ ...editedItem, category: e.target.value })}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
placeholder="e.g. Storage"
/>
<datalist id="existing-categories">
@@ -428,54 +428,54 @@ export default function InventoryPage() {
</datalist>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Type</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Item Type</label>
<input
type="text"
list="existing-types"
value={editedItem.type || ''}
onChange={e => setEditedItem({...editedItem, type: e.target.value})}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Connector</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Connector</label>
<input
type="text"
value={editedItem.connector || ''}
onChange={e => setEditedItem({...editedItem, connector: e.target.value})}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
placeholder="e.g. LC/UPC"
/>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Size / Length / Speed</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Size / Length / Speed</label>
<input
type="text"
value={editedItem.size || ''}
onChange={e => setEditedItem({...editedItem, size: e.target.value})}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
placeholder="e.g. 1.6TB"
/>
</div>
<div className="col-span-2">
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Item Color</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Item Color</label>
<input
type="text"
value={editedItem.color || ''}
onChange={e => setEditedItem({...editedItem, color: e.target.value})}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
placeholder="e.g. Blue"
/>
</div>
<div className="col-span-2">
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Box / Container Label</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Box / Container Label</label>
<div className="relative flex items-center">
<input
type="text"
list="existing-boxes"
value={editedItem.box_label || ''}
onChange={e => setEditedItem({...editedItem, box_label: e.target.value})}
className="w-full pr-12"
className="w-full pr-12 bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
placeholder="e.g. Box 5"
/>
<button
@@ -486,8 +486,8 @@ export default function InventoryPage() {
toast.success("Ready to scan Box label...");
}}
className={cn(
"absolute right-2 p-2 transition-all",
fieldScanning?.active ? "bg-primary text-black animate-pulse" : "text-muted hover:bg-black"
"absolute right-2 p-2 transition-all rounded-none",
fieldScanning?.active ? "bg-primary text-black animate-pulse" : "text-[#888888] hover:bg-black"
)}
>
<Camera size={18} />
@@ -496,25 +496,25 @@ export default function InventoryPage() {
</div>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Specs / Comments</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Specs / Comments</label>
<textarea
value={editedItem.specs || ''}
onChange={e => setEditedItem({...editedItem, specs: e.target.value})}
className="w-full h-20 resize-none"
className="w-full h-20 resize-none bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">OCR Matching Key</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">OCR Matching Key</label>
<textarea
value={editedItem.ocr_text || ''}
onChange={e => setEditedItem({...editedItem, ocr_text: e.target.value})}
className="w-full text-primary h-16 resize-none"
className="w-full text-primary h-16 resize-none bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
</div>
) : (
<>
<div className="flex p-1 bg-black border border-border mb-4 md:mb-6">
<div className="flex p-1 bg-black border border-[#222222] mb-4 md:mb-6 rounded-none">
{[
{ id: 'ADD', label: 'Buy More', icon: Plus, color: 'text-primary' },
{ id: 'REMOVE', label: 'Subtract', icon: Minus, color: 'text-amber-500' },
@@ -524,8 +524,8 @@ export default function InventoryPage() {
key={t.id}
onClick={() => setAdjustType(t.id as any)}
className={cn(
"flex-1 flex flex-col items-center py-3 lg:py-4 xl:py-5 transition-all",
adjustType === t.id ? "bg-[#1A1A1A] border border-border" : "text-muted"
"flex-1 flex flex-col items-center py-3 lg:py-4 xl:py-5 transition-all rounded-none",
adjustType === t.id ? "bg-[#1A1A1A] border border-[#222222]" : "text-[#888888]"
)}
>
<t.icon size={20} className={adjustType === t.id ? t.color : ""} />
@@ -538,25 +538,25 @@ export default function InventoryPage() {
<div className="flex items-center gap-3 md:gap-4">
<button
onClick={() => setAdjustQty(Math.max(1, adjustQty - 1))}
className="w-12 h-12 border border-border flex items-center justify-center hover:bg-black transition-colors"
className="w-12 h-12 border border-[#222222] flex items-center justify-center hover:bg-black transition-colors rounded-none"
>
<Minus size={24} />
</button>
<span className="text-5xl font-normal tabular-nums">{adjustQty}</span>
<button
onClick={() => setAdjustQty(adjustQty + 1)}
className="w-12 h-12 border border-border flex items-center justify-center hover:bg-black transition-colors"
className="w-12 h-12 border border-[#222222] flex items-center justify-center hover:bg-black transition-colors rounded-none"
>
<Plus size={24} />
</button>
</div>
{adjustType === 'TRASH' && (
<div className="w-full bg-red-500/5 border border-red-500/20 p-4">
<div className="w-full bg-red-500/5 border border-red-500/20 p-4 rounded-none">
<select
value={trashReason}
onChange={(e) => setTrashReason(e.target.value)}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
>
<option>Damaged</option>
<option>Expired</option>
@@ -572,7 +572,7 @@ export default function InventoryPage() {
<button
onClick={isEditing ? handleUpdateItem : handleAdjustStock}
className={cn(
"w-full py-4 sm:py-5 font-normal text-lg transition-all active:scale-[0.98]",
"w-full py-4 sm:py-5 font-normal text-lg transition-all active:scale-[0.98] rounded-none",
isEditing ? "bg-white text-black" : (
adjustType === 'ADD' ? "btn-primary" :
adjustType === 'REMOVE' ? "bg-amber-600 text-white" :
@@ -593,30 +593,30 @@ export default function InventoryPage() {
{/* Category Edit Overlay */}
{editingCategory && (
<div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-background/90 animate-in fade-in duration-300">
<div className="bg-surface border border-border p-4 md:p-6 max-w-sm w-full shadow-2xl space-y-3 md:space-y-4 animate-in zoom-in-95 duration-200">
<div className="bg-[#0A0A0A] border border-[#222222] p-4 md:p-6 max-w-sm w-full shadow-none space-y-3 md:space-y-4 animate-in zoom-in-95 duration-200 rounded-none">
<div className="flex justify-between items-center">
<h2 className="text-xl font-normal">Edit Category</h2>
<button onClick={() => setEditingCategory(null)} className="p-2 hover:bg-black border border-transparent hover:border-border transition-colors text-secondary">
<button onClick={() => setEditingCategory(null)} className="p-2 hover:bg-black border border-transparent hover:border-[#222222] transition-colors text-[#888888] rounded-none">
<X size={20} />
</button>
</div>
<div className="space-y-2 md:space-y-3">
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Name</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Name</label>
<input
type="text"
value={catEditedName}
onChange={e => setCatEditedName(e.target.value)}
className="w-full"
className="w-full bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
<div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Description</label>
<label className="text-sm font-normal text-[#888888] ml-1 tracking-tight">Description</label>
<textarea
value={catEditedDesc}
onChange={e => setCatEditedDesc(e.target.value)}
className="w-full h-24 resize-none"
className="w-full h-24 resize-none bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
</div>
</div>
@@ -642,17 +642,17 @@ export default function InventoryPage() {
{/* Box Manager Modal */}
{showBoxManager && (
<div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-background/90 animate-in fade-in duration-300">
<div className="w-full max-w-2xl bg-surface border border-border overflow-hidden flex flex-col max-h-[90vh]">
<div className="p-4 md:p-6 pb-3 md:pb-4 flex flex-col gap-3 md:gap-4 shrink-0 bg-surface/70">
<div className="w-full max-w-2xl bg-[#0A0A0A] border border-[#222222] overflow-hidden flex flex-col max-h-[90vh] rounded-none">
<div className="p-4 md:p-6 pb-3 md:pb-4 flex flex-col gap-3 md:gap-4 shrink-0 bg-[#0A0A0A]/70">
<div className="flex justify-between items-center">
<div>
<h3 className="text-2xl font-normal tracking-tight flex items-center gap-3">
<Package className="text-primary" size={28} />
Box Inventory
</h3>
<p className="text-sm text-muted font-normal mt-1">Manage physical box labels & printing</p>
<p className="text-sm text-[#888888] font-normal mt-1">Manage physical box labels & printing</p>
</div>
<button onClick={() => { setShowBoxManager(false); setBoxSearchQuery(''); }} className="p-3 hover:bg-black border border-transparent hover:border-border transition-colors text-secondary">
<button onClick={() => { setShowBoxManager(false); setBoxSearchQuery(''); }} className="p-3 hover:bg-black border border-transparent hover:border-[#222222] transition-colors text-[#888888] rounded-none">
<X size={24} />
</button>
</div>
@@ -663,13 +663,13 @@ export default function InventoryPage() {
placeholder="Search boxes..."
value={boxSearchQuery}
onChange={(e) => setBoxSearchQuery(e.target.value)}
className="w-full pl-11 pr-4"
className="w-full pl-11 pr-4 bg-black border border-[#222222] focus:border-primary px-3 py-2 rounded-none"
/>
<Search className="absolute left-4 top-1/2 -translate-y-1/2 text-secondary" size={18} />
<Search className="absolute left-4 top-1/2 -translate-y-1/2 text-[#888888]" size={18} />
{boxSearchQuery && (
<button
onClick={() => setBoxSearchQuery('')}
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 hover:bg-black border border-border text-muted"
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 hover:bg-black border border-[#222222] text-[#888888] rounded-none"
>
<X size={14} />
</button>
@@ -689,21 +689,21 @@ export default function InventoryPage() {
{getFilteredBoxes(existingBoxes).map(box => {
const itemCount = inventory.filter(i => i.box_label === box).length;
return (
<div key={box} className="bg-black/50 border border-border p-3 md:p-4 flex flex-col gap-2 md:gap-3 group hover:border-primary/40 transition-all">
<div key={box} className="bg-black/50 border border-[#222222] p-3 md:p-4 flex flex-col gap-2 md:gap-3 group hover:border-primary/40 transition-all rounded-none">
<div className="flex-1 min-w-0">
<h4 className="text-lg font-normal text-white truncate">{box}</h4>
<p className="text-xs text-muted font-normal mt-0.5">{itemCount} Items Linked</p>
<p className="text-xs text-[#888888] font-normal mt-0.5">{itemCount} Items Linked</p>
</div>
<div className="flex gap-2 shrink-0">
<button
onClick={() => setSelectedBoxLabel(box)}
className="btn-primary flex-1 text-xs py-2"
className="btn-primary flex-1 text-xs py-2 rounded-none"
>
<Printer size={14} /> Print Label
</button>
<button
onClick={() => { setSearchQuery(box); setShowBoxManager(false); setBoxSearchQuery(''); }}
className="btn-secondary flex-1 text-xs py-2"
className="btn-secondary flex-1 text-xs py-2 rounded-none"
>
View
</button>
@@ -715,9 +715,9 @@ export default function InventoryPage() {
)}
</div>
<div className="p-4 md:p-6 py-3 md:py-4 bg-black/50 border-t border-border text-center flex items-center justify-center gap-2">
<div className="p-4 md:p-6 py-3 md:py-4 bg-black/50 border-t border-[#222222] text-center flex items-center justify-center gap-2">
<div className="w-1 h-1 bg-primary animate-pulse" />
<p className="text-xs text-secondary font-normal font-mono">TFM aInventory Box Management Mode</p>
<p className="text-xs text-[#888888] font-normal font-mono">TFM aInventory Box Management Mode</p>
</div>
</div>
</div>
@@ -728,7 +728,7 @@ export default function InventoryPage() {
<div className="fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/95 animate-in zoom-in-95 duration-200">
<div className="w-full max-w-md flex flex-col gap-3 md:gap-4">
<div id="print-label-area" className="w-full bg-white p-4 md:p-6 shadow-2xl flex flex-col items-center gap-3 md:gap-4">
<div id="print-label-area" className="w-full bg-white p-4 md:p-6 shadow-none flex flex-col items-center gap-3 md:gap-4 rounded-none">
<h2 className="text-2xl font-normal text-black tracking-tighter text-center">
{selectedBoxLabel}
</h2>
@@ -743,7 +743,7 @@ export default function InventoryPage() {
<div className="flex flex-col gap-2 md:gap-3 no-print">
<button
onClick={() => window.print()}
className="btn-primary w-full py-5 text-lg"
className="btn-primary w-full py-5 text-lg rounded-none"
>
<Printer size={20} /> Print To Dymo/Brother
</button>
@@ -772,14 +772,14 @@ export default function InventoryPage() {
img.src = "data:image/svg+xml;base64," + btoa(svgData);
}
}}
className="btn-secondary w-full py-4 text-sm"
className="btn-secondary w-full py-4 text-sm rounded-none"
>
<Download size={16} /> Save For Mobile App
</button>
<button
onClick={() => setSelectedBoxLabel(null)}
className="w-full py-4 text-muted font-normal text-xs"
className="w-full py-4 text-[#888888] font-normal text-xs rounded-none"
>
Close Label Preview
</button>

View File

@@ -79,16 +79,16 @@ export default function LoginPage() {
if (!mounted) return null;
return (
<div data-testid="identity-check-overlay" className="bg-background flex items-center justify-center p-4 md:min-h-screen">
<div data-testid="identity-check-overlay" className="bg-[#131313] flex items-center justify-center p-4 md:min-h-screen font-sans">
<Toaster position="top-center" />
<div className="bg-surface border border-slate-800 rounded-3xl p-4 md:p-6 max-w-sm w-full shadow-2xl space-y-3 md:space-y-4 animate-in fade-in zoom-in duration-500">
<div className="bg-[#0A0A0A] border border-[#222222] rounded-none p-4 md:p-6 max-w-sm w-full shadow-none space-y-3 md:space-y-4 animate-in fade-in zoom-in duration-500">
<div className="text-center space-y-2">
<div className="w-16 h-16 bg-primary/10 text-primary rounded-2xl flex items-center justify-center mx-auto mb-4 border border-primary/20">
<div className="w-16 h-16 bg-[#F58618]/10 text-[#F58618] rounded-none flex items-center justify-center mx-auto mb-4 border border-[#F58618]/20">
<User size={32} />
</div>
<h2 className="text-2xl font-normal text-white tracking-tight">Identity Check</h2>
<p className="text-muted text-sm">Select operator profile or use direct login</p>
<p className="text-[#888888] text-sm font-normal">Select operator profile or use direct login</p>
</div>
<div data-testid="user-list" className="grid gap-2 md:gap-3">
@@ -101,23 +101,23 @@ export default function LoginPage() {
key={user.id}
data-testid="user-list-item"
onClick={() => handleSelectUser(user)}
className="bg-slate-800/50 hover:bg-slate-800 border border-slate-800 hover:border-primary/40 p-4 lg:p-5 xl:p-6 lg:p-8 xl:p-10 rounded-2xl text-left transition-all group flex items-center justify-between"
className="bg-transparent hover:bg-[#1A1A1A] border border-[#222222] hover:border-[#F58618] p-4 lg:p-5 xl:p-6 rounded-none text-left transition-all group flex items-center justify-between"
>
<div className="flex items-center gap-3">
<div className="w-8 h-8 rounded-full bg-surface border border-slate-700 flex items-center justify-center text-muted group-hover:text-primary transition-colors">
<div className="w-8 h-8 rounded-none bg-[#000000] border border-[#222222] flex items-center justify-center text-[#888888] group-hover:text-[#F58618] transition-colors">
{user.role === 'admin' ? <Shield size={14} /> : <User size={14} />}
</div>
<div>
<p className="text-white font-normal text-sm">{user.username}</p>
<p className="text-xs text-muted font-normal mt-1">{user.role}</p>
<p className="text-xs text-[#888888] font-normal mt-1">{user.role}</p>
</div>
</div>
<ChevronRight size={16} className="text-secondary group-hover:text-primary transition-colors" />
<ChevronRight size={16} className="text-[#888888] group-hover:text-[#F58618] transition-colors" />
</button>
))}
</>
) : (
<div className="text-center p-4 text-muted text-xs font-normal animate-pulse">
<div className="text-center p-4 text-[#888888] text-xs font-normal animate-pulse">
Connectivity issues? Use manual login below.
</div>
)}
@@ -126,7 +126,7 @@ export default function LoginPage() {
<button
data-testid="ldap-login-tab"
onClick={() => setIsEnterprise(true)}
className="flex items-center justify-center gap-2 py-4 rounded-2xl border border-dashed border-slate-700 text-muted hover:text-white hover:border-slate-500 transition-all font-normal text-xs"
className="flex items-center justify-center gap-2 py-4 rounded-none border border-dashed border-[#222222] text-[#888888] hover:text-white hover:border-[#888888] transition-all font-normal text-xs"
>
<Lock size={12} />
Enterprise
@@ -137,7 +137,7 @@ export default function LoginPage() {
setSelectedUserForLogin({ username: '' });
// We use an empty username object to trigger the manual input view
}}
className="flex items-center justify-center gap-2 py-4 rounded-2xl border border-primary/20 bg-primary/5 text-primary hover:bg-primary/10 transition-all font-normal text-xs"
className="flex items-center justify-center gap-2 py-4 rounded-none border border-[#F58618]/20 bg-[#F58618]/5 text-[#F58618] hover:bg-[#F58618]/10 transition-all font-normal text-xs"
>
<User size={12} />
Manual Login
@@ -147,40 +147,40 @@ export default function LoginPage() {
) : isEnterprise ? (
<div className="space-y-4 animate-in slide-in-from-right-4 duration-300">
<div className="flex justify-between items-center px-1">
<p className="text-xs font-normal text-muted">Enterprise Account</p>
<p className="text-xs font-normal text-[#888888]">Enterprise Account</p>
<button
onClick={() => setIsEnterprise(false)}
className="text-xs font-normal text-primary hover:underline"
className="text-xs font-normal text-[#F58618] hover:underline"
>
Back to profiles
</button>
</div>
<div className="space-y-2">
<label className="text-xs font-normal text-muted px-1">Username</label>
<label className="text-xs font-normal text-[#888888] px-1">Username</label>
<div className="relative">
<User className="absolute left-4 top-1/2 -translate-y-1/2 text-muted" size={16} />
<User className="absolute left-4 top-1/2 -translate-y-1/2 text-[#888888]" size={16} />
<input
ref={enterpriseUserRef}
data-testid="username-input"
type="text"
autoFocus
className="w-full bg-slate-800/50 border border-slate-800 focus:border-primary rounded-2xl py-4 pl-12 pr-4 text-white focus:outline-none transition-all placeholder:text-slate-700 font-mono"
className="w-full bg-[#000000] border border-[#222222] focus:border-[#F58618] rounded-none py-4 pl-12 pr-4 text-white focus:outline-none transition-all placeholder:text-[#333333] font-mono"
placeholder="e.g. jsmith"
/>
</div>
</div>
<div className="space-y-2">
<label className="text-xs font-normal text-muted px-1">Password</label>
<label className="text-xs font-normal text-[#888888] px-1">Password</label>
<div className="relative">
<Lock className="absolute left-4 top-1/2 -translate-y-1/2 text-muted" size={16} />
<Lock className="absolute left-4 top-1/2 -translate-y-1/2 text-[#888888]" size={16} />
<input
ref={enterprisePassRef}
data-testid="password-input"
type="password"
onKeyDown={(e) => e.key === 'Enter' && handleLogin()}
className="w-full bg-slate-800/50 border border-slate-800 focus:border-primary rounded-2xl py-4 pl-12 pr-4 text-white/50 focus:text-white focus:outline-none transition-all placeholder:text-slate-700 font-mono"
className="w-full bg-[#000000] border border-[#222222] focus:border-[#F58618] rounded-none py-4 pl-12 pr-4 text-white/50 focus:text-white focus:outline-none transition-all placeholder:text-[#333333] font-mono"
placeholder="Enter password"
/>
</div>
@@ -189,52 +189,52 @@ export default function LoginPage() {
<button
data-testid="login-submit"
onClick={handleLogin}
className="w-full bg-primary text-white font-normal py-4 rounded-2xl shadow-xl shadow-primary/20 active:scale-95 transition-all"
className="w-full bg-[#F58618] text-black font-normal py-4 rounded-none shadow-none active:scale-95 transition-all"
>
Sign In
</button>
</div>
) : (
<div className="space-y-4 animate-in slide-in-from-right-4 duration-300">
<div className="bg-slate-800/30 p-4 lg:p-5 xl:p-6 lg:p-8 xl:p-10 rounded-2xl border border-slate-800 flex items-center gap-3">
<div className="bg-[#1A1A1A] p-4 lg:p-5 xl:p-6 rounded-none border border-[#222222] flex items-center gap-3">
<button
onClick={() => setSelectedUserForLogin(null)}
className="p-1 hover:bg-slate-700 rounded-lg transition-colors"
className="p-1 hover:bg-[#222222] rounded-none transition-colors"
>
<X size={16} className="text-secondary" />
<X size={16} className="text-[#888888]" />
</button>
<div>
<p className="text-sm font-normal text-muted">Logging in as</p>
<p className="text-sm font-normal text-[#888888]">Logging in as</p>
<p className="text-white font-normal">{selectedUserForLogin.username || "Manual Input"}</p>
</div>
</div>
<div className="space-y-2">
<label className="text-xs font-normal text-muted px-1">Username</label>
<label className="text-xs font-normal text-[#888888] px-1">Username</label>
<div className="relative">
<User className="absolute left-4 top-1/2 -translate-y-1/2 text-muted" size={16} />
<User className="absolute left-4 top-1/2 -translate-y-1/2 text-[#888888]" size={16} />
<input
type="text"
autoFocus
value={selectedUserForLogin.username || ""}
onChange={(e) => setSelectedUserForLogin({...selectedUserForLogin, username: e.target.value})}
className="w-full bg-slate-800/50 border border-slate-800 focus:border-primary rounded-2xl py-4 pl-12 pr-4 text-white focus:outline-none transition-all placeholder:text-slate-700 font-mono"
className="w-full bg-[#000000] border border-[#222222] focus:border-[#F58618] rounded-none py-4 pl-12 pr-4 text-white focus:outline-none transition-all placeholder:text-[#333333] font-mono"
placeholder="Admin"
/>
</div>
</div>
<div className="space-y-2">
<label className="text-xs font-normal text-muted px-1">Password</label>
<label className="text-xs font-normal text-[#888888] px-1">Password</label>
<div className="relative">
<Lock className="absolute left-4 top-1/2 -translate-y-1/2 text-muted" size={16} />
<Lock className="absolute left-4 top-1/2 -translate-y-1/2 text-[#888888]" size={16} />
<input
ref={localPassRef}
data-testid="local-password-input"
type="password"
autoFocus={!!selectedUserForLogin.username}
onKeyDown={(e) => e.key === 'Enter' && handleLogin()}
className="w-full bg-slate-800/50 border border-slate-800 focus:border-primary rounded-2xl py-4 pl-12 pr-4 text-white/50 focus:text-white focus:outline-none transition-all placeholder:text-slate-700 font-mono"
className="w-full bg-[#000000] border border-[#222222] focus:border-[#F58618] rounded-none py-4 pl-12 pr-4 text-white/50 focus:text-white focus:outline-none transition-all placeholder:text-[#333333] font-mono"
placeholder="Enter password"
/>
</div>
@@ -243,7 +243,7 @@ export default function LoginPage() {
<button
data-testid="local-login-submit"
onClick={handleLogin}
className="w-full bg-primary text-white font-normal py-4 rounded-2xl shadow-xl shadow-primary/20 active:scale-95 transition-all"
className="w-full bg-[#F58618] text-black font-normal py-4 rounded-none shadow-none active:scale-95 transition-all"
>
Verify Identity
</button>
@@ -253,8 +253,8 @@ export default function LoginPage() {
{/* Progress bar hint */}
{users.length === 0 && !selectedUserForLogin && !isEnterprise && (
<div className="w-full bg-slate-800 h-1 rounded-full overflow-hidden">
<div className="bg-primary h-full animate-progress-fast shadow-[0_0_8px_rgba(var(--primary-rgb),0.5)]"></div>
<div className="w-full bg-[#1A1A1A] h-1 rounded-none overflow-hidden">
<div className="bg-[#F58618] h-full animate-progress-fast"></div>
</div>
)}
</div>