Build [v1.10.11]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.10.10",
|
||||
"last_build": "2026-04-15-2026",
|
||||
"codename": "AccessibleUI",
|
||||
"version": "1.10.11",
|
||||
"last_build": "2026-04-15-2051",
|
||||
"codename": "StableFlow",
|
||||
"commit": "49d50e08"
|
||||
}
|
||||
@@ -16,33 +16,14 @@ import {
|
||||
Trash2,
|
||||
AlertTriangle,
|
||||
X,
|
||||
History,
|
||||
LayoutGrid,
|
||||
Wifi,
|
||||
WifiOff,
|
||||
ChevronRight,
|
||||
ChevronDown,
|
||||
Edit2,
|
||||
RefreshCw,
|
||||
CloudOff,
|
||||
Sparkles,
|
||||
Smartphone,
|
||||
CheckCircle2,
|
||||
User,
|
||||
ArrowDownCircle,
|
||||
ArrowUpCircle,
|
||||
Settings,
|
||||
Lock,
|
||||
Shield,
|
||||
Key,
|
||||
LogOut,
|
||||
UserPlus,
|
||||
Tag,
|
||||
ArrowRight,
|
||||
ArrowLeft,
|
||||
Search,
|
||||
Printer,
|
||||
Download
|
||||
Search
|
||||
} from 'lucide-react';
|
||||
import { generateBarcode128, getQRCodeURL } from '@/lib/labels';
|
||||
import { clsx, type ClassValue } from 'clsx';
|
||||
@@ -87,23 +68,20 @@ export default function Home() {
|
||||
window.location.href = '/login';
|
||||
return;
|
||||
}
|
||||
|
||||
setMounted(true);
|
||||
setIsOnline(navigator.onLine);
|
||||
|
||||
const savedUser = localStorage.getItem('inventory_user');
|
||||
if (savedUser) {
|
||||
setCurrentUser(JSON.parse(savedUser));
|
||||
}
|
||||
|
||||
// Initial categories fetch
|
||||
// Initial data fetch
|
||||
inventoryApi.getCategories().then(c => setCategories(c)).catch(() => { });
|
||||
}, []);
|
||||
loadInventory();
|
||||
preloadOCR();
|
||||
|
||||
useEffect(() => {
|
||||
if (!localStorage.getItem('inventory_token')) {
|
||||
window.location.href = '/login';
|
||||
return;
|
||||
}
|
||||
setMounted(true);
|
||||
setIsOnline(navigator.onLine);
|
||||
const handleOnline = () => {
|
||||
setIsOnline(true);
|
||||
handleSync(); // Auto-sync pending ops when back online
|
||||
@@ -121,9 +99,6 @@ export default function Home() {
|
||||
}
|
||||
}, 30000);
|
||||
|
||||
loadInventory();
|
||||
preloadOCR();
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('online', handleOnline);
|
||||
window.removeEventListener('offline', handleOffline);
|
||||
@@ -157,7 +132,7 @@ export default function Home() {
|
||||
const handleOnboardingComplete = async (itemData: any) => {
|
||||
try {
|
||||
if (itemData.part_number) {
|
||||
itemData.part_number = itemData.part_number.toUpperCase();
|
||||
itemData.part_number = itemData.part_number.toLowerCase();
|
||||
}
|
||||
// 1. Add to local DB cache
|
||||
await db.items.add(itemData);
|
||||
@@ -198,9 +173,9 @@ export default function Home() {
|
||||
setLastScanned(barcode);
|
||||
setShowScanner(false);
|
||||
|
||||
const upperBarcode = barcode.toUpperCase();
|
||||
const normalizedBarcode = barcode.toLowerCase();
|
||||
const item = await db.items.where('barcode').equals(barcode)
|
||||
.or('part_number').equals(upperBarcode).first();
|
||||
.or('part_number').equals(normalizedBarcode).first();
|
||||
|
||||
if (!item) {
|
||||
toast.error(`Item ${barcode} not found in catalog.`);
|
||||
@@ -230,7 +205,7 @@ export default function Home() {
|
||||
|
||||
const onOCRMatch = useCallback(async (text: string) => {
|
||||
// 1. Clean and normalize
|
||||
const cleanText = text.toUpperCase().replace(/[^A-Z0-9\s/+-]/g, ' ');
|
||||
const cleanText = text.toLowerCase().replace(/[^a-z0-9\s/+-]/g, ' ');
|
||||
|
||||
// Garbage Filter: Ignore noisy strings (measurements like 0.11, dates like 2024-07-25)
|
||||
// We only keep tokens that are at least 3 chars AND not just decimals
|
||||
@@ -258,7 +233,7 @@ export default function Home() {
|
||||
// [BOX SCANNING LOGIC] Prioritize checking if this is a known box
|
||||
const possibleBoxItems = inventory.filter(item => {
|
||||
if (!item.box_label) return false;
|
||||
const boxText = item.box_label.toUpperCase().replace(/[^A-Z0-9\s/+-]/g, ' ');
|
||||
const boxText = item.box_label.toLowerCase().replace(/[^a-z0-9\s/+-]/g, ' ');
|
||||
// Exact or Partial include match for box label
|
||||
if (cleanText.includes(boxText)) return true;
|
||||
// Strong token matching (for words >= 4 chars)
|
||||
@@ -286,11 +261,11 @@ export default function Home() {
|
||||
|
||||
for (const item of inventory) {
|
||||
let score = 0;
|
||||
const pn = (item.part_number || '').toUpperCase();
|
||||
const sn = (item.serial_number || '').toUpperCase();
|
||||
const name = item.name.toUpperCase();
|
||||
const category = item.category.toUpperCase();
|
||||
const ocrKey = (item.ocr_text || '').toUpperCase().replace(/[^A-Z0-9\s/+-]/g, ' ');
|
||||
const pn = (item.part_number || '').toLowerCase();
|
||||
const sn = (item.serial_number || '').toLowerCase();
|
||||
const name = item.name.toLowerCase();
|
||||
const category = item.category.toLowerCase();
|
||||
const ocrKey = (item.ocr_text || '').toLowerCase().replace(/[^a-z0-9\s/+-]/g, ' ');
|
||||
|
||||
// Priority 0: Exact OCR Key match (Heuristic provided by AI)
|
||||
if (ocrKey && cleanText.includes(ocrKey)) score += 1000;
|
||||
@@ -333,7 +308,7 @@ export default function Home() {
|
||||
try {
|
||||
const updated = { ...selectedItem, ...editedItem };
|
||||
// Normalize PN
|
||||
if (updated.part_number) updated.part_number = updated.part_number.toUpperCase();
|
||||
if (updated.part_number) updated.part_number = updated.part_number.toLowerCase();
|
||||
|
||||
await db.items.update(selectedItem.id!, updated);
|
||||
|
||||
@@ -459,8 +434,8 @@ export default function Home() {
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="text-2xl md:text-3xl font-black tracking-tight text-white leading-tight">Admin Control</h1>
|
||||
<p className="text-xs md:text-sm text-slate-400 font-bold tracking-tight mt-1 uppercase tracking-widest leading-relaxed">System Configuration & Security</p>
|
||||
<h1 className="text-2xl md:text-3xl font-black tracking-tight text-white leading-tight">Inventory Control</h1>
|
||||
<p className="text-xs md:text-sm text-slate-400 font-bold tracking-tight mt-1 leading-relaxed">Check-in, Check-out & Trash Operations</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -576,7 +551,7 @@ export default function Home() {
|
||||
<h3 className="text-xl font-black tracking-tight flex items-center gap-2">
|
||||
{isEditing ? "Edit Metadata" : selectedItem.name}
|
||||
{!isEditing && (
|
||||
<span className="text-[11px] bg-slate-800 text-slate-400 px-2 py-0.5 rounded-md font-black uppercase tracking-tight shadow-sm border border-slate-700/50">
|
||||
<span className="text-[11px] bg-slate-800 text-slate-400 px-2 py-0.5 rounded-md font-black tracking-tight shadow-sm border border-slate-700/50">
|
||||
In Stock: {selectedItem.quantity}
|
||||
</span>
|
||||
)}
|
||||
@@ -617,7 +592,7 @@ export default function Home() {
|
||||
<div className="space-y-4 mb-8">
|
||||
<div>
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-400 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Item Name</label>
|
||||
<label className="text-xs text-slate-400 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Item Name</label>
|
||||
<textarea
|
||||
value={editedItem.name || ''}
|
||||
onChange={(e) => setEditedItem({ ...editedItem, name: e.target.value })}
|
||||
@@ -731,7 +706,7 @@ export default function Home() {
|
||||
/>
|
||||
</div>
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-400 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">OCR Matching Key</label>
|
||||
<label className="text-xs text-slate-400 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">OCR Matching Key</label>
|
||||
<textarea
|
||||
value={editedItem.ocr_text || ''}
|
||||
onChange={e => setEditedItem({ ...editedItem, ocr_text: e.target.value })}
|
||||
@@ -774,7 +749,7 @@ export default function Home() {
|
||||
</button>
|
||||
<div className="text-center">
|
||||
<span className="text-xs font-black tabular-nums">{adjustQty}</span>
|
||||
<span className="text-[10px] text-primary/80 font-bold uppercase tracking-tight">Units</span>
|
||||
<span className="text-[10px] text-primary/80 font-bold tracking-tight">Units</span>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setAdjustQty(adjustQty + 1)}
|
||||
@@ -858,7 +833,7 @@ export default function Home() {
|
||||
>
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-black text-white">{item.name}</p>
|
||||
<p className="text-xs text-slate-400 font-bold uppercase tracking-widest mt-1">Part #: {item.part_number || 'N/A'}</p>
|
||||
<p className="text-xs text-slate-400 font-bold mt-1">Part #: {item.part_number || 'N/A'}</p>
|
||||
</div>
|
||||
<ChevronRight size={18} className="text-slate-600 group-hover:text-primary" />
|
||||
</button>
|
||||
|
||||
@@ -321,7 +321,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
</div>
|
||||
|
||||
<div className="absolute top-6 left-1/2 -translate-x-1/2 bg-black/60 backdrop-blur-md px-4 py-1.5 rounded-full border border-white/10">
|
||||
<span className="text-xs font-black text-white uppercase tracking-widest flex items-center gap-2">
|
||||
<span className="text-xs font-black text-white flex items-center gap-2">
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse" />
|
||||
Live Viewfinder
|
||||
</span>
|
||||
@@ -384,7 +384,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
) : editingIndex !== null ? (
|
||||
<div className="flex-1 flex flex-col gap-6 overflow-hidden">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-xs text-slate-500 font-bold uppercase tracking-wider">Item Details ({editingIndex + 1}/{extractedItems.length})</span>
|
||||
<span className="text-xs text-slate-500 font-bold">Item Details ({editingIndex + 1}/{extractedItems.length})</span>
|
||||
<button
|
||||
onClick={() => setEditingIndex(null)}
|
||||
className="text-xs text-primary font-bold px-3 py-1 bg-primary/10 rounded-full"
|
||||
@@ -395,7 +395,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
|
||||
<div className="flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide">
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Item Name</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Item Name</label>
|
||||
<textarea
|
||||
value={extractedItems[editingIndex].Item || extractedItems[editingIndex].name || ''}
|
||||
onChange={(e) => updateEditingItem({ Item: e.target.value })}
|
||||
@@ -406,7 +406,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="bg-slate-900/80 py-3 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Category</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Category</label>
|
||||
<input
|
||||
type="text"
|
||||
list="onboarding-categories"
|
||||
@@ -422,7 +422,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
</datalist>
|
||||
</div>
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Item Type</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Item Type</label>
|
||||
<input
|
||||
value={extractedItems[editingIndex].Type || extractedItems[editingIndex].type || ''}
|
||||
list="onboarding-types"
|
||||
@@ -438,7 +438,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div className="bg-slate-900/80 py-3 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Item Color</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Item Color</label>
|
||||
<input
|
||||
value={extractedItems[editingIndex].Color || extractedItems[editingIndex].color || ''}
|
||||
onChange={(e) => updateEditingItem({ Color: e.target.value })}
|
||||
@@ -447,7 +447,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
/>
|
||||
</div>
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Box / Container</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Box / Container</label>
|
||||
<input
|
||||
value={extractedItems[editingIndex].box_label || ''}
|
||||
list="onboarding-boxes"
|
||||
@@ -462,7 +462,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
</div>
|
||||
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Description</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Description</label>
|
||||
<textarea
|
||||
value={extractedItems[editingIndex].Description || extractedItems[editingIndex].description || ''}
|
||||
onChange={(e) => updateEditingItem({ Description: e.target.value })}
|
||||
@@ -473,7 +473,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div className="bg-slate-900/80 py-3 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Connector</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Connector</label>
|
||||
<input
|
||||
value={extractedItems[editingIndex].Connector || extractedItems[editingIndex].connector || ''}
|
||||
onChange={(e) => updateEditingItem({ Connector: e.target.value })}
|
||||
@@ -482,7 +482,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
/>
|
||||
</div>
|
||||
<div className="bg-slate-900/80 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Size / Length</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Size / Length</label>
|
||||
<input
|
||||
value={extractedItems[editingIndex].Size || extractedItems[editingIndex].size || ''}
|
||||
onChange={(e) => updateEditingItem({ Size: e.target.value })}
|
||||
@@ -493,7 +493,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
</div>
|
||||
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">OCR Matching Key</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">OCR Matching Key</label>
|
||||
<textarea
|
||||
value={extractedItems[editingIndex].OCR || extractedItems[editingIndex].ocr_text || ''}
|
||||
onChange={(e) => updateEditingItem({ OCR: e.target.value })}
|
||||
@@ -504,16 +504,16 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight uppercase">Part Number</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tight">Part Number</label>
|
||||
<input
|
||||
value={extractedItems[editingIndex].PartNr || extractedItems[editingIndex].part_number || ''}
|
||||
onChange={(e) => updateEditingItem({ PartNr: e.target.value })}
|
||||
className="bg-transparent w-full font-mono text-sm font-bold outline-none text-slate-200 uppercase"
|
||||
className="bg-transparent w-full font-mono text-sm font-bold outline-none text-slate-200"
|
||||
placeholder="ID code..."
|
||||
/>
|
||||
</div>
|
||||
<div className="bg-slate-900/80 py-2.5 px-4 rounded-[1.2rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors uppercase tracking-tighter">Initial Qty</label>
|
||||
<label className="text-xs text-slate-500 font-bold mb-0.5 block group-focus-within:text-primary transition-colors tracking-tighter">Initial Qty</label>
|
||||
<input
|
||||
type="number"
|
||||
value={extractedItems[editingIndex].quantity || 1}
|
||||
@@ -536,7 +536,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
) : (
|
||||
<div className="flex-1 flex flex-col gap-6 overflow-hidden">
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="text-sm font-black text-slate-400 uppercase tracking-widest">Discovery Dashboard</h3>
|
||||
<h3 className="text-sm font-black text-slate-400">Discovery Dashboard</h3>
|
||||
<span className="text-xs bg-primary/20 text-primary px-3 py-1 rounded-full font-bold">
|
||||
{extractedItems.length} items found
|
||||
</span>
|
||||
@@ -559,10 +559,10 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
<h4 className="font-black text-slate-100 truncate">{item.Item || item.name || "Unknown Item"}</h4>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<span className="text-xs font-black uppercase px-2 py-0.5 bg-slate-800 text-slate-400 rounded-md tracking-wider">
|
||||
<span className="text-xs font-black px-2 py-0.5 bg-slate-800 text-slate-400 rounded-md">
|
||||
{item.Type || item.type || "Generic"}
|
||||
</span>
|
||||
<span className="text-xs font-black uppercase px-2 py-0.5 bg-slate-800 text-slate-500 rounded-md tracking-wider">
|
||||
<span className="text-xs font-black px-2 py-0.5 bg-slate-800 text-slate-500 rounded-md">
|
||||
{item.PartNr || item.part_number || "No P/N"}
|
||||
</span>
|
||||
</div>
|
||||
@@ -602,7 +602,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
setExtractedItems([]);
|
||||
setImage(null);
|
||||
}}
|
||||
className="py-3 text-xs text-slate-600 font-bold hover:text-slate-400 tracking-widest uppercase"
|
||||
className="py-3 text-xs text-slate-600 font-bold hover:text-slate-400"
|
||||
>
|
||||
Discard Discovery
|
||||
</button>
|
||||
|
||||
@@ -70,7 +70,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
<Shield size={40} className="italic" />
|
||||
</div>
|
||||
<h2 className="text-3xl font-black text-white tracking-tight">Protocol Access</h2>
|
||||
<p className="text-slate-500 text-xs font-black uppercase tracking-widest">Select operator profile to initialize</p>
|
||||
<p className="text-slate-500 text-xs font-black">Select operator profile to initialize</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-3.5">
|
||||
@@ -88,7 +88,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-slate-100 font-black text-sm tracking-tight">{user.username}</p>
|
||||
<p className="text-xs text-slate-600 font-black uppercase tracking-widest mt-0.5">{user.role}</p>
|
||||
<p className="text-xs text-slate-600 font-black mt-0.5">{user.role}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-1.5 rounded-full bg-slate-900/50 text-slate-700 group-hover:text-primary group-hover:bg-primary/10 transition-all">
|
||||
@@ -99,7 +99,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
<div className="pt-4">
|
||||
<button
|
||||
onClick={() => setIsEnterprise(true)}
|
||||
className="w-full flex items-center justify-center gap-3 py-5 rounded-[1.5rem] border border-dashed border-slate-800 text-slate-600 hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-all font-black text-xs uppercase tracking-widest"
|
||||
className="w-full flex items-center justify-center gap-3 py-5 rounded-[1.5rem] border border-dashed border-slate-800 text-slate-600 hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-all font-black text-xs"
|
||||
>
|
||||
<Lock size={14} />
|
||||
Enterprise Directory
|
||||
@@ -109,10 +109,10 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
) : isEnterprise ? (
|
||||
<div className="space-y-5 animate-in slide-in-from-bottom-5 duration-300">
|
||||
<div className="flex justify-between items-center px-1">
|
||||
<p className="text-xs font-black text-slate-600 uppercase tracking-widest italic">LDAP Authentication</p>
|
||||
<p className="text-xs font-black text-slate-600 italic">LDAP Authentication</p>
|
||||
<button
|
||||
onClick={() => setIsEnterprise(false)}
|
||||
className="text-xs font-black text-primary hover:underline uppercase tracking-tighter"
|
||||
className="text-xs font-black text-primary hover:underline tracking-tighter"
|
||||
>
|
||||
Profile Swap
|
||||
</button>
|
||||
@@ -146,7 +146,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
|
||||
<button
|
||||
onClick={handleLogin}
|
||||
className="w-full bg-primary text-white font-black py-5 rounded-[1.5rem] shadow-2xl shadow-primary/20 hover:shadow-primary/30 active:scale-95 transition-all uppercase text-xs tracking-widest border border-primary/20"
|
||||
className="w-full bg-primary text-white font-black py-5 rounded-[1.5rem] shadow-2xl shadow-primary/20 hover:shadow-primary/30 active:scale-95 transition-all text-xs border border-primary/20"
|
||||
>
|
||||
Initialize Session
|
||||
</button>
|
||||
@@ -159,7 +159,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
<Shield size={20} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs font-black text-slate-600 uppercase tracking-widest">Active Profile</p>
|
||||
<p className="text-xs font-black text-slate-600">Active Profile</p>
|
||||
<p className="text-white font-black tracking-tight">{selectedUserForLogin.username}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -180,7 +180,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
type="password"
|
||||
autoFocus
|
||||
onKeyDown={(e) => e.key === 'Enter' && handleLogin()}
|
||||
className="w-full bg-slate-950/50 border border-slate-800/80 focus:border-primary/50 focus:bg-slate-950 rounded-[1.25rem] py-4.5 pl-14 pr-5 text-sm text-slate-100 focus:outline-none transition-all placeholder:text-slate-700 font-mono tracking-widest"
|
||||
className="w-full bg-slate-950/50 border border-slate-800/80 focus:border-primary/50 focus:bg-slate-950 rounded-[1.25rem] py-4.5 pl-14 pr-5 text-sm text-slate-100 focus:outline-none transition-all placeholder:text-slate-700 font-mono"
|
||||
placeholder="KEY-PHRASE"
|
||||
/>
|
||||
</div>
|
||||
@@ -188,7 +188,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
|
||||
<button
|
||||
onClick={handleLogin}
|
||||
className="w-full bg-primary text-white font-black py-5 rounded-[1.5rem] shadow-2xl shadow-primary/20 hover:shadow-primary/30 active:scale-95 transition-all uppercase text-xs tracking-widest border border-primary/20"
|
||||
className="w-full bg-primary text-white font-black py-5 rounded-[1.5rem] shadow-2xl shadow-primary/20 hover:shadow-primary/30 active:scale-95 transition-all text-xs border border-primary/20"
|
||||
>
|
||||
Unlock Account
|
||||
</button>
|
||||
@@ -197,7 +197,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
</div>
|
||||
|
||||
{users.length === 0 && (
|
||||
<div className="text-center p-8 text-slate-700 animate-pulse font-black text-xs uppercase tracking-[0.2em]">
|
||||
<div className="text-center p-8 text-slate-700 animate-pulse font-black text-xs">
|
||||
Synchronizing User Tokens...
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -257,11 +257,11 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
||||
<div className="p-6 bg-slate-900/90 backdrop-blur-xl border-t border-slate-800 flex flex-col gap-4">
|
||||
<div className="flex flex-col items-center gap-1">
|
||||
<p className="text-sm font-black text-white italic text-center">Protocol Detected</p>
|
||||
<p className="text-xs text-slate-500 font-black uppercase tracking-widest text-center">Select identity from label matrix</p>
|
||||
<p className="text-xs text-slate-500 font-black text-center">Select identity from label matrix</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => { setIsSelecting(false); setCapturedImage(null); setCountdown(4); }}
|
||||
className="w-full py-4 bg-slate-800 hover:bg-slate-700 text-white rounded-2xl font-black text-xs uppercase tracking-widest transition-all active:scale-95 border border-slate-700"
|
||||
className="w-full py-4 bg-slate-800 hover:bg-slate-700 text-white rounded-2xl font-black text-xs transition-all active:scale-95 border border-slate-700"
|
||||
>
|
||||
Abort Cycle
|
||||
</button>
|
||||
@@ -315,7 +315,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
||||
className="h-14 px-5 bg-slate-800/80 hover:bg-slate-700 border border-slate-700 text-white rounded-2xl flex flex-col items-center justify-center shadow-lg transition-all active:scale-95 shrink-0"
|
||||
>
|
||||
<span className="text-xs font-black tabular-nums">{zoom.toFixed(1)}x</span>
|
||||
<span className="text-xs text-primary font-black uppercase tracking-tighter">Zoom</span>
|
||||
<span className="text-xs text-primary font-black tracking-tighter">Zoom</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
@@ -323,14 +323,14 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
||||
{ocrProcessing ? (
|
||||
<>
|
||||
<RefreshCw className="animate-spin text-primary" size={18} />
|
||||
<span className="text-xs font-black text-slate-200 uppercase tracking-widest leading-none">Analyzing</span>
|
||||
<span className="text-xs font-black text-slate-200 leading-none">Analyzing</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Search className={cn("text-slate-600 transition-colors group-hover:text-primary", !isStarted && "opacity-20")} size={18} />
|
||||
<div className="flex flex-col">
|
||||
<span className="text-xs text-slate-500 font-black leading-none uppercase tracking-widest">Optical Assist</span>
|
||||
<span className="text-xs font-black text-primary leading-tight uppercase tabular-nums">
|
||||
<span className="text-xs text-slate-500 font-black leading-none">Optical Assist</span>
|
||||
<span className="text-xs font-black text-primary leading-tight tabular-nums">
|
||||
{countdown === 0 ? "Scanning" : `${countdown}s Cycle`}
|
||||
</span>
|
||||
</div>
|
||||
@@ -347,7 +347,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
||||
|
||||
<div className="w-full flex justify-center items-center gap-2">
|
||||
<div className="w-1 h-1 rounded-full bg-green-500 animate-pulse" />
|
||||
<p className="text-xs text-slate-600 font-black uppercase tracking-[0.15em]">
|
||||
<p className="text-xs text-slate-600 font-black">
|
||||
Optical Data Stream Active
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -45,14 +45,14 @@ export default function DatabaseManager({
|
||||
|
||||
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-6">
|
||||
<div className="space-y-1 sm:pr-6">
|
||||
<p className="text-xs font-bold text-slate-500 tracking-tight uppercase">Database Health</p>
|
||||
<p className="text-xs font-bold text-slate-500 tracking-tight">Database Health</p>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-2 h-2 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.3)]" />
|
||||
<span className="text-sm font-bold text-slate-200">Operational</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sm:pl-6 sm:border-l border-slate-800">
|
||||
<p className="text-xs font-bold text-slate-500 tracking-tight uppercase">Last Backup</p>
|
||||
<p className="text-xs font-bold text-slate-500 tracking-tight">Last Backup</p>
|
||||
<p className="text-sm font-bold text-slate-200 tabular-nums">{dbStats.backup_count > 0 ? 'Verified' : 'Pending...'}</p>
|
||||
</div>
|
||||
<div className="ml-auto">
|
||||
@@ -82,7 +82,7 @@ export default function DatabaseManager({
|
||||
|
||||
<div className="grid sm:grid-cols-3 gap-6">
|
||||
<div className="space-y-2">
|
||||
<label className="text-xs font-bold text-slate-500 tracking-tight ml-1 flex items-center gap-2 uppercase">
|
||||
<label className="text-xs font-bold text-slate-500 tracking-tight ml-1 flex items-center gap-2">
|
||||
<History size={10} /> Max Backups
|
||||
</label>
|
||||
<input
|
||||
@@ -93,7 +93,7 @@ export default function DatabaseManager({
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label className="text-xs font-bold text-slate-500 tracking-tight ml-1 flex items-center gap-2 uppercase">
|
||||
<label className="text-xs font-bold text-slate-500 tracking-tight ml-1 flex items-center gap-2">
|
||||
<Clock size={10} /> Schedule (Hour)
|
||||
</label>
|
||||
<input
|
||||
@@ -105,7 +105,7 @@ export default function DatabaseManager({
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label className="text-xs font-bold text-slate-500 tracking-tight ml-1 flex items-center gap-2 uppercase">
|
||||
<label className="text-xs font-bold text-slate-500 tracking-tight ml-1 flex items-center gap-2">
|
||||
<Zap size={10} /> Frequency (Days)
|
||||
</label>
|
||||
<input
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -20,7 +20,8 @@
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
},
|
||||
"types": ["node", "react", "react-dom"]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
|
||||
7
frontend/types/minimatch.d.ts
vendored
Normal file
7
frontend/types/minimatch.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare module 'minimatch' {
|
||||
function minimatch(p: string, pattern: string, options?: any): boolean;
|
||||
namespace minimatch {
|
||||
function filter(pattern: string, options?: any): (p: string) => boolean;
|
||||
}
|
||||
export = minimatch;
|
||||
}
|
||||
Reference in New Issue
Block a user