fix(audit-wave-9): standardize on Sheet for previews; doctrine in CLAUDE.md
Swap the one outlier (client-interests-tab.tsx) from Vaul Drawer to Sheet side=right so every detail-preview surface uses the same primitive. Document the doctrine: Sheet for side panels on both desktop and mobile; Vaul Drawer reserved for mobile-only bottom-sheet UX (currently just MoreSheet). Closes ui/ux M11. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { toastError } from '@/lib/api/toast-error';
|
||||
import { toast } from 'sonner';
|
||||
import { useConfirmation } from '@/hooks/use-confirmation';
|
||||
|
||||
const ACCEPT = 'image/png,image/jpeg,image/webp,image/svg+xml,image/heic,image/heif,image/avif';
|
||||
|
||||
@@ -54,6 +55,7 @@ function centeredCrop(width: number, height: number, aspect: number): Crop {
|
||||
}
|
||||
|
||||
export function PdfLogoUploader() {
|
||||
const { confirm, dialog: confirmDialog } = useConfirmation();
|
||||
const [current, setCurrent] = useState<CurrentLogo | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [working, setWorking] = useState(false);
|
||||
@@ -160,7 +162,12 @@ export function PdfLogoUploader() {
|
||||
}
|
||||
|
||||
async function clear() {
|
||||
if (!confirm('Remove the PDF logo? Future reports will fall back to the port name.')) return;
|
||||
const ok = await confirm({
|
||||
title: 'Remove PDF logo',
|
||||
description: 'Remove the PDF logo? Future reports will fall back to the port name.',
|
||||
confirmLabel: 'Remove',
|
||||
});
|
||||
if (!ok) return;
|
||||
setWorking(true);
|
||||
try {
|
||||
const res = await fetch('/api/v1/admin/branding/logo', { method: 'DELETE' });
|
||||
@@ -334,6 +341,7 @@ export function PdfLogoUploader() {
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
{confirmDialog}
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user