From abc1525fe21eb12c5770f49e71de2906cec16dbb Mon Sep 17 00:00:00 2001 From: corpi Date: Mon, 16 Mar 2026 18:44:59 +0900 Subject: [PATCH] =?UTF-8?q?feat(space):=20goal=20complete=EB=A5=BC=20?= =?UTF-8?q?=EC=A4=91=EC=95=99=20=EB=AA=A8=EB=8B=AC=EB=A1=9C=20=EC=9E=AC?= =?UTF-8?q?=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../space-focus-hud/ui/GoalCompleteSheet.tsx | 321 +++++++++--------- 1 file changed, 152 insertions(+), 169 deletions(-) diff --git a/src/widgets/space-focus-hud/ui/GoalCompleteSheet.tsx b/src/widgets/space-focus-hud/ui/GoalCompleteSheet.tsx index cf3396a..d0adb64 100644 --- a/src/widgets/space-focus-hud/ui/GoalCompleteSheet.tsx +++ b/src/widgets/space-focus-hud/ui/GoalCompleteSheet.tsx @@ -4,22 +4,7 @@ import type { FormEvent } from 'react'; import { useEffect, useMemo, useRef, useState } from 'react'; import { copy } from '@/shared/i18n'; import { cn } from '@/shared/lib/cn'; -import { - HUD_FIELD, - HUD_OPTION_CHEVRON, - HUD_OPTION_ROW, - HUD_OPTION_ROW_BREAK, - HUD_OPTION_ROW_PRIMARY, - HUD_REVEAL_BASE, - HUD_REVEAL_COMPLETE, - HUD_REVEAL_HIDDEN, - HUD_TRAY_CONTENT, - HUD_TEXT_LINK, - HUD_TEXT_LINK_STRONG, - HUD_TRAY_HAIRLINE, - HUD_TRAY_LAYER, - HUD_TRAY_SHELL, -} from './overlayStyles'; +import { HUD_FIELD } from './overlayStyles'; interface GoalCompleteSheetProps { open: boolean; @@ -100,14 +85,14 @@ export const GoalCompleteSheet = ({ isTimerCompleteMode ? copy.space.goalComplete.timerTitle : view === 'next' - ? copy.space.goalComplete.nextTitle - : copy.space.goalComplete.title; + ? copy.space.goalComplete.nextTitle + : copy.space.goalComplete.title; const description = isTimerCompleteMode ? copy.space.goalComplete.timerDescription : view === 'next' - ? copy.space.goalComplete.nextDescription - : copy.space.goalComplete.description; + ? copy.space.goalComplete.nextDescription + : copy.space.goalComplete.description; const handleSubmit = async (event: FormEvent) => { event.preventDefault(); @@ -165,197 +150,195 @@ export const GoalCompleteSheet = ({ } }; + const baseButtonClass = + 'inline-flex min-h-[3.5rem] items-center justify-center rounded-[18px] border px-4 py-3 text-center text-[13px] font-medium tracking-[0.01em] transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/12 disabled:cursor-not-allowed disabled:opacity-40'; + const secondaryButtonClass = + 'border-white/10 bg-white/[0.04] text-white/72 hover:border-white/16 hover:bg-white/[0.07] hover:text-white'; + const primaryButtonClass = + 'border-white/14 bg-white/[0.12] text-white hover:border-white/22 hover:bg-white/[0.17]'; + const breakButtonClass = + 'border-emerald-200/14 bg-[rgba(16,38,31,0.44)] text-emerald-50 hover:border-emerald-200/20 hover:bg-[rgba(16,38,31,0.58)]'; + + const renderGoalCard = () => { + if (!trimmedCurrentGoal) { + return null; + } + + return ( +
+

+ {copy.space.goalComplete.currentGoalLabel} +

+

+ {trimmedCurrentGoal} +

+
+ ); + }; + return (
-
-
-
+
-
-
-
-

목표 완료

-

{title}

-

{description}

-
+
+
+
+ +
+
{isTimerCompleteMode ? null : ( )} + +
+ {isTimerCompleteMode ? '⌛' : '✦'} +
+

GOAL COMPLETE

+

+ {title} +

+

+ {description} +

- {isTimerCompleteMode ? ( -
- {trimmedCurrentGoal ? ( -
-

- {copy.space.goalComplete.currentGoalLabel} -

-

{trimmedCurrentGoal}

-
- ) : null} +
+ {renderGoalCard()} -
- + {isTimerCompleteMode ? ( +
-
-
- ) : view === 'choice' ? ( -
- {trimmedCurrentGoal ? ( -
-

- {copy.space.goalComplete.currentGoalLabel} -

-

{trimmedCurrentGoal}

-
- ) : null} - -
- -
-
- ) : ( -
- {trimmedCurrentGoal ? ( -
-

- {copy.space.goalComplete.currentGoalLabel} -

-

{trimmedCurrentGoal}

-
- ) : null} - - - -