Skip to content

Commit ebfe9fa

Browse files
committed
style(audit): simplify file selection dialog header layout
- Refactor DialogTitle structure to use flexbox gap instead of nested flex containers - Consolidate icon, title, and badge into single flex row with improved spacing - Add ml-auto to badge for automatic right alignment instead of justify-between - Remove unnecessary nested div wrapper around icon and title text - Add flex-shrink-0 to icon to prevent scaling in flex layout - Add pr-8 padding to DialogTitle for better spacing with close button - Improve code readability and reduce DOM nesting complexity
1 parent a995bef commit ebfe9fa

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

frontend/src/components/audit/FileSelectionDialog.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -454,21 +454,17 @@ export default function FileSelectionDialog({
454454
<Dialog open={open} onOpenChange={onOpenChange}>
455455
<DialogContent className="!max-w-[1000px] !w-[95vw] max-h-[85vh] flex flex-col bg-white border-2 border-black p-0 shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] rounded-none">
456456
<DialogHeader className="p-5 border-b-2 border-black bg-gray-50 flex-shrink-0">
457-
<DialogTitle className="flex items-center justify-between">
458-
<div className="flex items-center space-x-2 font-display font-bold uppercase text-lg">
459-
<FolderOpen className="w-5 h-5 text-black" />
460-
<span>选择要审计的文件</span>
461-
</div>
462-
<div className="flex items-center gap-2">
463-
{excludePatterns && excludePatterns.length > 0 && (
464-
<Badge
465-
variant="outline"
466-
className="rounded-none border-gray-400 text-gray-600 font-mono text-xs"
467-
>
468-
已排除 {excludePatterns.length} 种模式
469-
</Badge>
470-
)}
471-
</div>
457+
<DialogTitle className="flex items-center gap-3 font-display font-bold uppercase text-lg pr-8">
458+
<FolderOpen className="w-5 h-5 text-black flex-shrink-0" />
459+
<span>选择要审计的文件</span>
460+
{excludePatterns && excludePatterns.length > 0 && (
461+
<Badge
462+
variant="outline"
463+
className="rounded-none border-gray-400 text-gray-600 font-mono text-xs ml-auto"
464+
>
465+
已排除 {excludePatterns.length} 种模式
466+
</Badge>
467+
)}
472468
</DialogTitle>
473469
</DialogHeader>
474470

0 commit comments

Comments
 (0)