refactor: improve auth defaults, update UI, and docs
- Provide fallback values for auth environment variables - Refine global CSS styles and typography - Update application metadata descriptions - Add toast error handling to clients page - Formalize phase implementation guidelines in AGENTS.md
This commit is contained in:
1 parent
df14ee1a9a
commit
fde2c86b1e
48 files changed
+1062
-1665
No files matched your search
+12
-19
@@ -7,7 +7,6 @@ export interface ModalProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
title: string;
|
||||
description?: string;
|
||||
children: React.ReactNode;
|
||||
footer?: React.ReactNode;
|
||||
maxWidth?: 'xs' | 'sm' | 'md' | 'lg';
|
||||
@@ -17,7 +16,6 @@ export const Modal: React.FC<ModalProps> = ({
|
||||
isOpen,
|
||||
onClose,
|
||||
title,
|
||||
description,
|
||||
children,
|
||||
footer,
|
||||
maxWidth = 'md',
|
||||
@@ -41,44 +39,39 @@ export const Modal: React.FC<ModalProps> = ({
|
||||
if (!isOpen) return null;
|
||||
|
||||
const maxWidthStyles = {
|
||||
xs: 'max-w-[440px]',
|
||||
sm: 'max-w-[480px]',
|
||||
md: 'max-w-[640px]',
|
||||
lg: 'max-w-[800px]',
|
||||
xs: 'max-w-[380px]',
|
||||
sm: 'max-w-[420px]',
|
||||
md: 'max-w-[540px]',
|
||||
lg: 'max-w-[680px]',
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 bg-black/60">
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center p-3 bg-black/60">
|
||||
<div
|
||||
className={cn(
|
||||
'w-full bg-[var(--bg-elevated)] border border-[var(--border-strong)] text-[var(--text)] flex flex-col max-h-[calc(100dvh-1.5rem)] sm:max-h-[min(88dvh,800px)] overflow-hidden animate-in fade-in zoom-in-95 duration-150',
|
||||
'w-full bg-[var(--bg-elevated)] border border-[var(--border-strong)] text-[var(--text)] flex flex-col max-h-[calc(100dvh-1.5rem)] sm:max-h-[min(86dvh,720px)] overflow-hidden animate-in fade-in zoom-in-95 duration-150',
|
||||
maxWidthStyles[maxWidth]
|
||||
)}
|
||||
>
|
||||
<div className="flex items-start justify-between gap-4 p-4 sm:px-6 sm:py-5 border-b border-[var(--border)] shrink-0">
|
||||
<div className="min-w-0">
|
||||
<h2 className="text-[18px] font-semibold text-[var(--text)] leading-snug">{title}</h2>
|
||||
{description && (
|
||||
<p className="text-[13px] text-[var(--text-muted)] mt-1.5">{description}</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-3 px-3.5 py-2.5 border-b border-[var(--border)] shrink-0">
|
||||
<h2 className="text-[13px] font-medium text-[var(--text)] leading-snug truncate">{title}</h2>
|
||||
<Button
|
||||
size="icon"
|
||||
variant="ghost"
|
||||
onClick={onClose}
|
||||
aria-label="Close dialog"
|
||||
className="w-9 h-9 text-[var(--text-dim)] hover:text-[var(--text)]"
|
||||
className="w-6.5 h-6.5 text-[var(--text-dim)] hover:text-[var(--text)]"
|
||||
>
|
||||
<Icon name="X" size={14} />
|
||||
<Icon name="X" size={12} />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="p-4 sm:p-6 overflow-y-auto flex-1 text-[14px] flex flex-col gap-4">
|
||||
<div className="p-3.5 overflow-y-auto flex-1 text-[12px] flex flex-col gap-3">
|
||||
{children}
|
||||
</div>
|
||||
|
||||
{footer && (
|
||||
<div className="flex flex-wrap items-center justify-end gap-2 p-4 sm:px-6 border-t border-[var(--border)] bg-[var(--bg-sidebar)] shrink-0">
|
||||
<div className="flex flex-wrap items-center justify-end gap-1.5 px-3.5 py-2 border-t border-[var(--border)] bg-[var(--bg-sidebar)] shrink-0">
|
||||
{footer}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user