refactor: polish spacing details (Phase 3 - Low-Impact)
This commit is contained in:
@@ -33,7 +33,7 @@ export default function AiManager({
|
|||||||
}: AiManagerProps) {
|
}: AiManagerProps) {
|
||||||
return (
|
return (
|
||||||
<section data-testid="ai-config" className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl space-y-6 transition-all group/ai">
|
<section data-testid="ai-config" className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl space-y-6 transition-all group/ai">
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
||||||
<Brain size={20} />
|
<Brain size={20} />
|
||||||
@@ -156,7 +156,7 @@ export default function AiManager({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-3">
|
<div className="space-y-3 pt-1">
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1.5">
|
||||||
<div className="flex items-center justify-between px-1">
|
<div className="flex items-center justify-between px-1">
|
||||||
<label className="text-sm font-normal text-secondary tracking-tight">System Prompt (Vision Extraction)</label>
|
<label className="text-sm font-normal text-secondary tracking-tight">System Prompt (Vision Extraction)</label>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function CategoryManager({
|
|||||||
}: CategoryManagerProps) {
|
}: CategoryManagerProps) {
|
||||||
return (
|
return (
|
||||||
<section className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl space-y-6 transition-all group/categories">
|
<section className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl space-y-6 transition-all group/categories">
|
||||||
<div className="flex items-center justify-between px-2">
|
<div className="flex items-center justify-between px-2 mb-2">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
||||||
<Layers size={20} />
|
<Layers size={20} />
|
||||||
@@ -72,8 +72,8 @@ export default function CategoryManager({
|
|||||||
{/* Edit Category Modal */}
|
{/* Edit Category Modal */}
|
||||||
{editingCategory && (
|
{editingCategory && (
|
||||||
<div className="fixed inset-0 z-[100] flex items-end sm:items-center justify-center p-0 sm:p-4 bg-background/90 animate-in fade-in duration-300">
|
<div className="fixed inset-0 z-[100] flex items-end sm:items-center justify-center p-0 sm:p-4 bg-background/90 animate-in fade-in duration-300">
|
||||||
<div className="w-full max-w-lg bg-surface border-x border-t sm:border border-slate-800 rounded-t-[2.5rem] sm:rounded-3xl p-6 sm:p-10 shadow-2xl space-y-8 overflow-hidden animate-in slide-in-from-bottom-10">
|
<div className="w-full max-w-lg bg-surface border-x border-t sm:border border-slate-800 rounded-t-[2.5rem] sm:rounded-3xl p-6 sm:p-10 shadow-2xl space-y-4 overflow-hidden animate-in slide-in-from-bottom-10">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center mb-2">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
||||||
<Edit2 size={20} />
|
<Edit2 size={20} />
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export default function DatabaseManager({
|
|||||||
return (
|
return (
|
||||||
<div className="space-y-4 md:space-y-5 h-full">
|
<div className="space-y-4 md:space-y-5 h-full">
|
||||||
<div data-testid="database-info" className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl overflow-hidden relative group transition-all">
|
<div data-testid="database-info" className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl overflow-hidden relative group transition-all">
|
||||||
<div className="flex items-center gap-4 mb-6">
|
<div className="flex items-center gap-4 mb-4">
|
||||||
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
||||||
<Database size={20} />
|
<Database size={20} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function IdentityManager({
|
|||||||
}: IdentityManagerProps) {
|
}: IdentityManagerProps) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 flex flex-col shadow-2xl transition-all group/identity h-full">
|
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 flex flex-col shadow-2xl transition-all group/identity h-full">
|
||||||
<div className="flex items-center justify-between mb-6">
|
<div className="flex items-center justify-between mb-4">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
||||||
<User size={20} />
|
<User size={20} />
|
||||||
@@ -87,7 +87,7 @@ export default function IdentityManager({
|
|||||||
{editingUser && (
|
{editingUser && (
|
||||||
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-background/80 animate-in fade-in duration-200">
|
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-background/80 animate-in fade-in duration-200">
|
||||||
<div className="bg-surface border border-slate-800 rounded-[2.5rem] p-6 w-full max-w-md shadow-2xl">
|
<div className="bg-surface border border-slate-800 rounded-[2.5rem] p-6 w-full max-w-md shadow-2xl">
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center mb-2">
|
||||||
<h3 className="text-xl font-normal text-white tracking-tight">Edit Identity</h3>
|
<h3 className="text-xl font-normal text-white tracking-tight">Edit Identity</h3>
|
||||||
<button
|
<button
|
||||||
onClick={() => setEditingUser(null)}
|
onClick={() => setEditingUser(null)}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default function LdapManager({
|
|||||||
}: LdapManagerProps) {
|
}: LdapManagerProps) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl space-y-4 transition-all group/ldap">
|
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl space-y-4 transition-all group/ldap">
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-1">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
|
||||||
<Globe size={20} />
|
<Globe size={20} />
|
||||||
@@ -61,26 +61,26 @@ export default function LdapManager({
|
|||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label className="text-sm font-normal text-secondary tracking-tight ml-1">LDAP URI</label>
|
<label className="text-sm font-normal text-secondary tracking-tight ml-1">LDAP URI</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Server className="absolute left-3.5 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
<Server className="absolute left-3 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="ldap://host:389"
|
placeholder="ldap://host:389"
|
||||||
value={ldapConfig.server_uri}
|
value={ldapConfig.server_uri}
|
||||||
onChange={(e) => setLdapConfig({...ldapConfig, server_uri: e.target.value})}
|
onChange={(e) => setLdapConfig({...ldapConfig, server_uri: e.target.value})}
|
||||||
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-10 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-9 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label className="text-sm font-normal text-secondary tracking-tight ml-1">Context DN</label>
|
<label className="text-sm font-normal text-secondary tracking-tight ml-1">Context DN</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Shield className="absolute left-3.5 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
<Shield className="absolute left-3 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="dc=example,dc=com"
|
placeholder="dc=example,dc=com"
|
||||||
value={ldapConfig.base_dn}
|
value={ldapConfig.base_dn}
|
||||||
onChange={(e) => setLdapConfig({...ldapConfig, base_dn: e.target.value})}
|
onChange={(e) => setLdapConfig({...ldapConfig, base_dn: e.target.value})}
|
||||||
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-10 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-9 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,26 +90,26 @@ export default function LdapManager({
|
|||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label className="text-sm font-normal text-secondary tracking-tight ml-1">User DN Template</label>
|
<label className="text-sm font-normal text-secondary tracking-tight ml-1">User DN Template</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<User className="absolute left-3.5 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
<User className="absolute left-3 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="uid={username},ou=people..."
|
placeholder="uid={username},ou=people..."
|
||||||
value={ldapConfig.user_template}
|
value={ldapConfig.user_template}
|
||||||
onChange={(e) => setLdapConfig({...ldapConfig, user_template: e.target.value})}
|
onChange={(e) => setLdapConfig({...ldapConfig, user_template: e.target.value})}
|
||||||
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-10 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-9 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label className="text-sm font-normal text-secondary tracking-tight ml-1">Groups Base DN</label>
|
<label className="text-sm font-normal text-secondary tracking-tight ml-1">Groups Base DN</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Layers className="absolute left-3.5 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
<Layers className="absolute left-3 top-1/2 -translate-y-1/2 text-muted" size={14} />
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="ou=groups"
|
placeholder="ou=groups"
|
||||||
value={ldapConfig.groups_dn}
|
value={ldapConfig.groups_dn}
|
||||||
onChange={(e) => setLdapConfig({...ldapConfig, groups_dn: e.target.value})}
|
onChange={(e) => setLdapConfig({...ldapConfig, groups_dn: e.target.value})}
|
||||||
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-10 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
className="w-full bg-background/80 border border-slate-800 rounded-2xl py-2 pl-9 pr-4 text-xs font-normal text-white outline-none focus:border-primary/50 transition-all font-mono"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -144,7 +144,7 @@ export default function LdapManager({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex gap-2 pt-2">
|
<div className="flex gap-2 pt-1">
|
||||||
<button
|
<button
|
||||||
onClick={onTestLdap}
|
onClick={onTestLdap}
|
||||||
disabled={testingLdap}
|
disabled={testingLdap}
|
||||||
|
|||||||
Reference in New Issue
Block a user