Implement Card Pulse Animation and UI Enhancements

- Added a new pulse animation for screen cards to enhance visual feedback.
- Updated the background of the screen management list for improved aesthetics.
- Refined the search input styling for better integration with the overall UI.
- Enhanced screen card hover effects with dynamic glow based on screen type.
- Adjusted layout spacing for a more consistent user experience.

Made-with: Cursor
This commit is contained in:
DDD1542 2026-03-16 09:17:59 +09:00
parent cbd47184e7
commit 6395f4d032
2 changed files with 87 additions and 49 deletions

View File

@ -299,16 +299,16 @@ export default function ScreenManagementPage() {
</div> </div>
</div> </div>
) : ( ) : (
<div className="flex-1 overflow-auto p-6"> <div className="flex-1 overflow-auto p-6 bg-muted/30 dark:bg-background">
{/* 카드 뷰 상단: 검색 + 카운트 */} {/* 카드 뷰 상단: 검색 + 카운트 */}
<div className="flex items-center gap-3 mb-4"> <div className="flex items-center gap-3 mb-5">
<div className="relative flex-1 max-w-sm"> <div className="relative flex-1 max-w-sm">
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" /> <Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
<Input <Input
placeholder="화면 검색..." placeholder="화면 검색..."
value={searchTerm} value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)} onChange={(e) => setSearchTerm(e.target.value)}
className="pl-9 h-9 rounded-xl bg-muted/30 dark:bg-muted/30 border-border/50 dark:border-border/50 focus:bg-background focus:ring-2 focus:ring-primary/30 transition-colors" className="pl-9 h-9 rounded-xl bg-card dark:bg-card border-border/50 shadow-sm focus:bg-card focus:ring-2 focus:ring-primary/30 transition-colors"
/> />
{searchTerm && ( {searchTerm && (
<button <button
@ -324,55 +324,78 @@ export default function ScreenManagementPage() {
<span className="text-xs text-muted-foreground">{filteredScreens.length} </span> <span className="text-xs text-muted-foreground">{filteredScreens.length} </span>
</div> </div>
<div className="grid grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3"> <div className="grid grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3">
{filteredScreens.map((screen) => ( {filteredScreens.map((screen) => {
<div const screenType = (screen as { screenType?: string }).screenType || "form";
key={screen.screenId} const isSelected = selectedScreen?.screenId === screen.screenId;
className={`group relative overflow-hidden rounded-[10px] border cursor-pointer transition-all duration-200 ${ const isRecentlyModified = screen.updatedDate && (Date.now() - new Date(screen.updatedDate).getTime()) < 7 * 24 * 60 * 60 * 1000;
selectedScreen?.screenId === screen.screenId
? "border-primary/40 bg-card shadow-[0_0_0_1px_hsl(var(--primary)/0.4)]" const typeColorClass = screenType === "grid"
: "border-border/40 dark:border-border/10 bg-card dark:bg-card/80 hover:border-border/60 dark:hover:border-border/20 hover:bg-card hover:shadow-[0_2px_20px_-6px_rgba(0,0,0,0.08)] dark:hover:shadow-[0_2px_20px_-6px_rgba(0,0,0,0.5)]" ? "from-primary to-primary/20"
}`} : screenType === "dashboard"
onClick={() => handleScreenSelect(screen)} ? "from-warning to-warning/20"
onDoubleClick={() => handleDesignScreen(screen)} : "from-success to-success/20";
>
{/* 좌측 타입별 컬러 바 */} const glowClass = screenType === "grid"
<div className={`absolute left-0 top-0 bottom-0 w-[3px] ${ ? "hover:shadow-[0_8px_24px_-4px_rgba(0,0,0,0.1),0_0_20px_hsl(var(--primary)/0.1)] dark:hover:shadow-[0_8px_24px_-4px_rgba(0,0,0,0.4),0_0_24px_hsl(var(--primary)/0.15)]"
(screen as { screenType?: string }).screenType === "grid" ? "bg-primary" : : screenType === "dashboard"
(screen as { screenType?: string }).screenType === "dashboard" ? "bg-warning" : ? "hover:shadow-[0_8px_24px_-4px_rgba(0,0,0,0.1),0_0_20px_hsl(var(--warning)/0.1)] dark:hover:shadow-[0_8px_24px_-4px_rgba(0,0,0,0.4),0_0_24px_hsl(var(--warning)/0.12)]"
"bg-success" : "hover:shadow-[0_8px_24px_-4px_rgba(0,0,0,0.1),0_0_20px_hsl(var(--success)/0.1)] dark:hover:shadow-[0_8px_24px_-4px_rgba(0,0,0,0.4),0_0_24px_hsl(var(--success)/0.12)]";
}`} />
<div className="pl-4 pr-[14px] py-[14px]"> const badgeBgClass = screenType === "grid"
{/* 상단: 이름 + 호버 편집 */} ? "bg-primary/8 dark:bg-primary/15 text-primary"
<div className="flex items-start gap-2"> : screenType === "dashboard"
<div className="flex-1 min-w-0"> ? "bg-warning/8 dark:bg-warning/15 text-warning"
<div className="text-[13px] font-semibold leading-tight truncate tracking-[-0.2px]">{screen.screenName}</div> : "bg-success/8 dark:bg-success/15 text-success";
<div className="text-[10px] font-mono text-muted-foreground/80 dark:text-muted-foreground/50 mt-0.5 tracking-[-0.3px] truncate">{screen.screenCode}</div>
</div> return (
<span className="text-[10px] text-muted-foreground/70 dark:text-muted-foreground/40 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0 mt-0.5"></span> <div
</div> key={screen.screenId}
{/* 설명 (있으면) */} className={`group relative overflow-hidden rounded-[12px] cursor-pointer transition-all duration-250 ease-[cubic-bezier(0.4,0,0.2,1)] ${
{screen.description && ( isSelected
<div className="text-[10px] text-muted-foreground/60 dark:text-muted-foreground/40 mt-1.5 truncate">{screen.description}</div> ? "border border-primary bg-primary/5 dark:bg-primary/8 shadow-[0_0_0_2px_hsl(var(--primary)/0.22),0_1px_3px_rgba(0,0,0,0.06)] dark:shadow-[0_0_0_2px_hsl(var(--primary)/0.3),0_1px_4px_rgba(0,0,0,0.3)]"
: `border border-transparent bg-card shadow-[0_1px_3px_rgba(0,0,0,0.06),0_1px_2px_rgba(0,0,0,0.04)] dark:shadow-[0_1px_4px_rgba(0,0,0,0.35),0_0_1px_rgba(0,0,0,0.2)] hover:-translate-y-[2px] ${glowClass}`
}`}
onClick={() => handleScreenSelect(screen)}
onDoubleClick={() => handleDesignScreen(screen)}
>
{/* 좌측 그라데이션 액센트 바 */}
<div className={`absolute left-0 top-3 bottom-3 w-[3px] rounded-r-full bg-gradient-to-b ${typeColorClass} transition-all duration-250 group-hover:top-1 group-hover:bottom-1 group-hover:w-[4px]`} />
{isSelected && (
<div className={`absolute left-0 top-0 bottom-0 w-[4px] bg-gradient-to-b ${typeColorClass}`} />
)} )}
{/* 중단: 메타 정보 */} <div className="pl-[14px] pr-4 py-4">
<div className="flex items-center gap-3 mt-2.5 text-[11px] text-muted-foreground/80 dark:text-muted-foreground/60"> {/* Row 1: 이름 + 타입 뱃지 */}
<span className="flex items-center gap-1"> <div className="flex items-center gap-2 mb-1">
<Database className="h-3 w-3 opacity-70 dark:opacity-50" /> <div className="text-[15px] font-bold leading-snug truncate flex-1 min-w-0 tracking-[-0.3px]">{screen.screenName}</div>
<span className="font-mono text-[10px] tracking-[-0.3px]">{screen.tableLabel || screen.tableName || "—"}</span> <span className={`text-[11px] font-semibold px-2.5 py-[3px] rounded-md flex-shrink-0 ${badgeBgClass}`}>
</span> {screenType === "grid" ? "그리드" : screenType === "dashboard" ? "대시보드" : "폼"}
</div> </span>
{/* 하단: 타입 칩 + 날짜 */} </div>
<div className="flex items-center justify-between mt-2.5 pt-2 border-t border-border/30 dark:border-border/5"> {/* Row 2: 스크린 코드 */}
<span className="text-[10px] font-medium px-[7px] py-[2px] rounded bg-primary/10 text-primary tracking-[-0.2px]"> <div className="text-[12px] font-mono text-muted-foreground tracking-[-0.3px] truncate mb-3">{screen.screenCode}</div>
{(screen as { screenType?: string }).screenType === "grid" ? "그리드" : (screen as { screenType?: string }).screenType === "dashboard" ? "대시보드" : "폼"} {/* Row 3: 테이블 칩 + 메타 */}
</span> <div className="flex items-center gap-1.5 flex-wrap">
<span className="text-[10px] text-muted-foreground/60 dark:text-muted-foreground/30 font-mono font-light"> <span className="inline-flex items-center gap-1.5 text-[12px] font-medium text-foreground/80 dark:text-foreground/70 px-2.5 py-1 rounded-md bg-muted/60 dark:bg-muted/40">
{screen.updatedDate ? new Date(screen.updatedDate).toLocaleDateString("ko-KR", { month: "2-digit", day: "2-digit" }) : screen.createdDate ? new Date(screen.createdDate).toLocaleDateString("ko-KR", { month: "2-digit", day: "2-digit" }) : ""} <Database className="h-3.5 w-3.5 text-muted-foreground" />
</span> <span className="font-mono text-[11px]">{screen.tableLabel || screen.tableName || "—"}</span>
</span>
</div>
{/* Row 4: 날짜 + 수정 상태 */}
<div className="flex items-center justify-between mt-3 pt-2.5 border-t border-border/20 dark:border-border/10">
<span className="text-[12px] font-mono text-muted-foreground">
{screen.updatedDate ? new Date(screen.updatedDate).toLocaleDateString("ko-KR", { year: "numeric", month: "2-digit", day: "2-digit" }) : screen.createdDate ? new Date(screen.createdDate).toLocaleDateString("ko-KR", { year: "numeric", month: "2-digit", day: "2-digit" }) : ""}
</span>
{isRecentlyModified && (
<span className="flex items-center gap-1.5 text-[11px] text-muted-foreground">
<span className="relative inline-block w-[6px] h-[6px] rounded-full bg-success screen-card-pulse-dot" />
</span>
)}
</div>
</div> </div>
</div> </div>
</div> );
))} })}
</div> </div>
{filteredScreens.length === 0 && ( {filteredScreens.length === 0 && (
<div className="flex flex-col items-center justify-center py-20 text-muted-foreground"> <div className="flex flex-col items-center justify-center py-20 text-muted-foreground">

View File

@ -427,6 +427,21 @@ select {
border-spacing: 0 !important; border-spacing: 0 !important;
} }
/* ===== 카드 펄스 도트 애니메이션 ===== */
@keyframes screen-card-pulse {
0%, 100% { opacity: 0; transform: scale(1); }
50% { opacity: 0.35; transform: scale(2); }
}
.screen-card-pulse-dot::after {
content: '';
position: absolute;
inset: -3px;
border-radius: 50%;
background: hsl(var(--success));
opacity: 0;
animation: screen-card-pulse 2.5s ease-in-out infinite;
}
/* ===== 저장 테이블 막대기 애니메이션 ===== */ /* ===== 저장 테이블 막대기 애니메이션 ===== */
@keyframes saveBarDrop { @keyframes saveBarDrop {
0% { 0% {