feat(fsd): 허브·스페이스 중심 UI 목업 구조로 재편
맥락: - 기존 라우트/컴포넌트 구조를 FSD 기준으로 정리하고, /app 허브와 /space 집중 화면 중심의 목업 흐름을 구성하기 위해 변경사항: - App Router 구조를 /landing, /app, /space, /stats, /settings 중심으로 재배치 - entities/session/room/user 더미 데이터와 타입 정의 추가 - features(커스텀 입장, 룸 선택, 체크인, 리액션, 30초 리스타트 등) 단위로 로직 분리 - widgets(허브, 룸 갤러리, 타이머 HUD, 툴 도크 등) 조합형 UI 추가 - shared 공용 UI(Button/Chip/Modal/Toast 등) 및 유틸(cn/useReducedMotion) 정비 - 로그인 후 이동 경로를 /dashboard 에서 /app 으로 변경 - README를 현재 프로젝트 구조/라우트/구현 범위 기준으로 갱신 검증: - npx tsc --noEmit 세션-상태: 허브·스페이스 목업이 FSD 레이어로 동작 가능하도록 정리됨 세션-다음: /space 상단 및 도크의 인원 수 카피를 분위기형 카피로 후속 정리 세션-리스크: build는 네트워크 환경에서 Google Fonts fetch 실패 가능
This commit is contained in:
56
src/widgets/space-timer-hud/ui/SpaceTimerHudWidget.tsx
Normal file
56
src/widgets/space-timer-hud/ui/SpaceTimerHudWidget.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
import { cn } from '@/shared/lib/cn';
|
||||
import { Restart30sAction } from '@/features/restart-30s';
|
||||
|
||||
interface SpaceTimerHudWidgetProps {
|
||||
timerLabel: string;
|
||||
goal: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const HUD_ACTIONS = [
|
||||
{ id: 'start', label: '시작', icon: '▶' },
|
||||
{ id: 'pause', label: '일시정지', icon: '⏸' },
|
||||
{ id: 'reset', label: '리셋', icon: '↺' },
|
||||
] as const;
|
||||
|
||||
export const SpaceTimerHudWidget = ({
|
||||
timerLabel,
|
||||
goal,
|
||||
className,
|
||||
}: SpaceTimerHudWidgetProps) => {
|
||||
return (
|
||||
<div className={cn('pointer-events-none fixed inset-x-0 bottom-[4.7rem] z-20 px-4 pr-16 sm:px-6', className)}>
|
||||
<div className="mx-auto w-full max-w-xl pointer-events-auto">
|
||||
<section className="flex h-16 items-center justify-between gap-3 rounded-2xl border border-white/10 bg-black/25 px-3.5 backdrop-blur-sm">
|
||||
<div className="min-w-0">
|
||||
<div className="flex items-baseline gap-2">
|
||||
<span className="text-[11px] font-semibold uppercase tracking-[0.16em] text-white/62">
|
||||
Focus
|
||||
</span>
|
||||
<span className="text-2xl font-semibold tracking-tight text-white">25:00</span>
|
||||
<span className="text-[11px] text-white/62">{timerLabel}</span>
|
||||
</div>
|
||||
<p className="truncate text-[11px] text-white/58">목표: {goal}</p>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2.5">
|
||||
<div className="flex items-center gap-1.5">
|
||||
{HUD_ACTIONS.map((action) => (
|
||||
<button
|
||||
key={action.id}
|
||||
type="button"
|
||||
title={action.label}
|
||||
className="inline-flex h-8 w-8 items-center justify-center rounded-full border border-white/15 bg-white/8 text-sm text-white/82 transition-colors hover:bg-white/14 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-200/80"
|
||||
>
|
||||
<span aria-hidden>{action.icon}</span>
|
||||
<span className="sr-only">{action.label}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<Restart30sAction />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user