feat: offline ldap support and ui polish v1.2.4
This commit is contained in:
@@ -193,7 +193,7 @@ export default function AdminPage() {
|
||||
<div className="flex items-center justify-between px-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-primary" />
|
||||
<h3 className="text-sm font-black text-white">Local Users (Manual)</h3>
|
||||
<h3 className="text-sm font-black text-white">Local Users</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-slate-900/40 border border-slate-800/50 rounded-3xl overflow-hidden shadow-xl divide-y divide-slate-800/50">
|
||||
@@ -250,7 +250,7 @@ export default function AdminPage() {
|
||||
<div className="flex items-center justify-between px-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-indigo-500" />
|
||||
<h3 className="text-sm font-black text-white">Enterprise (LDAP) Users</h3>
|
||||
<h3 className="text-sm font-black text-white">Enterprise Users (LDAP)</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-indigo-500/5 border border-indigo-500/10 rounded-3xl overflow-hidden shadow-xl divide-y divide-indigo-500/10">
|
||||
@@ -603,20 +603,23 @@ export default function AdminPage() {
|
||||
placeholder="••••••••"
|
||||
value={editUserForm.password}
|
||||
onChange={(e) => setEditUserForm({ ...editUserForm, password: e.target.value })}
|
||||
className="w-full bg-slate-950 border border-slate-800 focus:border-primary rounded-2xl py-4 px-5 text-white outline-none transition-all"
|
||||
className="w-full bg-slate-950 border border-slate-800 focus:border-primary rounded-2xl py-4 px-5 text-white/50 focus:text-white outline-none transition-all placeholder:text-slate-800"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<label className="text-xs font-black text-slate-500 px-1">Access Role</label>
|
||||
<select
|
||||
value={editUserForm.role}
|
||||
onChange={(e) => setEditUserForm({ ...editUserForm, role: e.target.value })}
|
||||
className="w-full bg-slate-950 border border-slate-800 focus:border-primary rounded-2xl py-4 px-5 text-white outline-none transition-all appearance-none"
|
||||
>
|
||||
<option value="user">USER (Standard)</option>
|
||||
<option value="admin">ADMIN (Root Access)</option>
|
||||
</select>
|
||||
<div className="relative flex items-center">
|
||||
<select
|
||||
value={editUserForm.role}
|
||||
onChange={(e) => setEditUserForm({ ...editUserForm, role: e.target.value })}
|
||||
className="w-full bg-slate-950 border border-slate-800 focus:border-primary rounded-2xl py-4 px-5 text-white outline-none transition-all appearance-none"
|
||||
>
|
||||
<option value="user">USER (Standard)</option>
|
||||
<option value="admin">ADMIN (Root Access)</option>
|
||||
</select>
|
||||
<ChevronDown size={20} className="absolute right-5 text-slate-500 pointer-events-none" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
|
||||
@@ -379,16 +379,19 @@ export default function InventoryPage() {
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="text-xs font-black text-slate-500 ml-1">Category</label>
|
||||
<select
|
||||
value={editedItem.category || ''}
|
||||
onChange={e => setEditedItem({...editedItem, category: e.target.value})}
|
||||
className="w-full bg-slate-950 border border-slate-800 rounded-xl py-3 px-4 text-sm outline-none text-slate-100"
|
||||
>
|
||||
<option value="">Select Category</option>
|
||||
{categoriesList.map(c => (
|
||||
<option key={c.id} value={c.name}>{c.name}</option>
|
||||
))}
|
||||
</select>
|
||||
<div className="relative flex items-center">
|
||||
<select
|
||||
value={editedItem.category || ''}
|
||||
onChange={e => setEditedItem({...editedItem, category: e.target.value})}
|
||||
className="w-full bg-slate-950 border border-slate-800 rounded-xl py-3 px-4 text-sm outline-none text-slate-100 appearance-none"
|
||||
>
|
||||
<option value="">Select Category</option>
|
||||
{categoriesList.map(c => (
|
||||
<option key={c.id} value={c.name}>{c.name}</option>
|
||||
))}
|
||||
</select>
|
||||
<ChevronDown size={16} className="absolute right-4 text-slate-500 pointer-events-none" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label className="text-xs font-black text-slate-500 ml-1">Item Type</label>
|
||||
|
||||
@@ -154,7 +154,7 @@ export default function LoginPage() {
|
||||
ref={enterprisePassRef}
|
||||
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 focus:outline-none transition-all placeholder:text-slate-700 font-mono"
|
||||
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"
|
||||
placeholder="Enter password"
|
||||
/>
|
||||
</div>
|
||||
@@ -191,7 +191,7 @@ export default function LoginPage() {
|
||||
type="password"
|
||||
autoFocus
|
||||
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 focus:outline-none transition-all placeholder:text-slate-700 font-mono"
|
||||
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"
|
||||
placeholder="Enter password"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -568,16 +568,19 @@ export default function Home() {
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="text-xs font-black text-slate-500 ml-1">Category</label>
|
||||
<select
|
||||
value={editedItem.category || ''}
|
||||
onChange={e => setEditedItem({...editedItem, category: e.target.value})}
|
||||
className="w-full bg-slate-950 border border-slate-800 rounded-xl py-3 px-4 text-sm outline-none text-slate-100"
|
||||
>
|
||||
<option value="">Select Category</option>
|
||||
{categories.map(c => (
|
||||
<option key={c.id} value={c.name}>{c.name}</option>
|
||||
))}
|
||||
</select>
|
||||
<div className="relative flex items-center">
|
||||
<select
|
||||
value={editedItem.category || ''}
|
||||
onChange={e => setEditedItem({...editedItem, category: e.target.value})}
|
||||
className="w-full bg-slate-950 border border-slate-800 rounded-xl py-3 px-4 text-sm outline-none text-slate-100 appearance-none"
|
||||
>
|
||||
<option value="">Select Category</option>
|
||||
{categories.map(c => (
|
||||
<option key={c.id} value={c.name}>{c.name}</option>
|
||||
))}
|
||||
</select>
|
||||
<ChevronDown size={16} className="absolute right-4 text-slate-500 pointer-events-none" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label className="text-xs font-black text-slate-500 ml-1">Item Type (e.g. SFP, Patch Cord)</label>
|
||||
|
||||
@@ -137,7 +137,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
ref={enterprisePassRef}
|
||||
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 focus:outline-none transition-all placeholder:text-slate-700 font-mono"
|
||||
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"
|
||||
placeholder="Enter password"
|
||||
/>
|
||||
</div>
|
||||
@@ -174,7 +174,7 @@ const IdentityCheckOverlay = memo(({ show, users, onAuthenticated }: IdentityChe
|
||||
type="password"
|
||||
autoFocus
|
||||
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 focus:outline-none transition-all placeholder:text-slate-700 font-mono"
|
||||
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"
|
||||
placeholder="Enter password"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user