| | | 1 | | @page "/" |
| | | 2 | | @inherits IndexBase |
| | | 3 | | |
| | | 4 | | <div class="main-container"> |
| | 4 | 5 | | <ErrorBanner ErrorMessage="@ErrorMessage" OnDismiss="@(() => ErrorMessage = null)" /> |
| | | 6 | | |
| | | 7 | | <!-- Today's Summary --> |
| | | 8 | | <div class="summary-section"> |
| | | 9 | | <TodaySummary TotalFocusMinutes="TodayTotalFocusMinutes" |
| | | 10 | | PomodoroCount="TodayPomodoroCount" |
| | | 11 | | TasksWorkedOn="TodayTasksWorkedOn" /> |
| | | 12 | | </div> |
| | | 13 | | |
| | | 14 | | <!-- Timer Section --> |
| | | 15 | | <div class="timer-section @GetTimerThemeClass()"> |
| | | 16 | | <div class="timer-section-header"> |
| | | 17 | | <div class="session-tabs" role="tablist"> |
| | | 18 | | <button class="@(CurrentSessionType == SessionType.Pomodoro ? "active" : "")" |
| | 2 | 19 | | @onclick="() => HandleSessionSwitch(SessionType.Pomodoro)" |
| | | 20 | | title="@Constants.KeyboardShortcuts.PomodoroKey" |
| | | 21 | | role="tab" |
| | | 22 | | aria-selected="@(CurrentSessionType == SessionType.Pomodoro)"> |
| | | 23 | | Pomodoro |
| | | 24 | | </button> |
| | | 25 | | <button class="@(CurrentSessionType == SessionType.ShortBreak ? "active" : "")" |
| | 2 | 26 | | @onclick="() => HandleSessionSwitch(SessionType.ShortBreak)" |
| | | 27 | | title="@Constants.KeyboardShortcuts.ShortBreakKey" |
| | | 28 | | role="tab" |
| | | 29 | | aria-selected="@(CurrentSessionType == SessionType.ShortBreak)"> |
| | | 30 | | Short Break |
| | | 31 | | </button> |
| | | 32 | | <button class="@(CurrentSessionType == SessionType.LongBreak ? "active" : "")" |
| | 2 | 33 | | @onclick="() => HandleSessionSwitch(SessionType.LongBreak)" |
| | | 34 | | title="@Constants.KeyboardShortcuts.LongBreakKey" |
| | | 35 | | role="tab" |
| | | 36 | | aria-selected="@(CurrentSessionType == SessionType.LongBreak)"> |
| | | 37 | | Long Break |
| | | 38 | | </button> |
| | | 39 | | </div> |
| | | 40 | | </div> |
| | | 41 | | |
| | | 42 | | <TimerDisplay RemainingTime="RemainingTime" |
| | | 43 | | SessionType="CurrentSessionType" |
| | | 44 | | IsRunning="IsTimerRunning" /> |
| | | 45 | | |
| | | 46 | | <TimerControls IsRunning="IsTimerRunning" |
| | | 47 | | IsPaused="IsTimerPaused" |
| | | 48 | | IsStarted="IsTimerStarted" |
| | | 49 | | CanStart="CurrentTaskId.HasValue || CurrentSessionType != SessionType.Pomodoro" |
| | | 50 | | SessionType="CurrentSessionType" |
| | | 51 | | OnStart="HandleTimerStart" |
| | | 52 | | OnPause="HandleTimerPause" |
| | | 53 | | OnResume="HandleTimerResume" |
| | | 54 | | OnReset="HandleTimerReset" /> |
| | | 55 | | |
| | | 56 | | <CurrentTaskIndicator CurrentSessionType="@CurrentSessionType" |
| | | 57 | | CurrentTaskId="@CurrentTaskId" |
| | | 58 | | Tasks="@Tasks" /> |
| | | 59 | | |
| | | 60 | | <!-- Header Actions (PiP and Help buttons) --> |
| | | 61 | | <div class="header-actions"> |
| | 3 | 62 | | <button class="btn-pip-header" @onclick="() => ShowKeyboardHelp = true" title="@Constants.KeyboardShortcuts. |
| | | 63 | | <button class="btn-pip-header" @onclick="HandleTogglePip" title="@(IsPipOpen ? Constants.PipTimerUI.CloseFlo |
| | | 64 | | </div> |
| | | 65 | | </div> |
| | | 66 | | |
| | | 67 | | <!-- Tasks Section --> |
| | | 68 | | <div class="tasks-section"> |
| | | 69 | | <TaskList Tasks="Tasks" |
| | | 70 | | CurrentTaskId="CurrentTaskId" |
| | | 71 | | OnTaskAdd="HandleTaskAdd" |
| | | 72 | | OnTaskSelect="HandleTaskSelect" |
| | | 73 | | OnTaskComplete="HandleTaskComplete" |
| | | 74 | | OnTaskDelete="HandleTaskDelete" |
| | | 75 | | OnTaskUncomplete="HandleTaskUncomplete" /> |
| | | 76 | | </div> |
| | | 77 | | |
| | | 78 | | <!-- Consent Modal --> |
| | | 79 | | <ConsentModal IsVisible="IsConsentModalVisible" |
| | | 80 | | CompletedSessionType="ConsentService.CompletedSessionType" |
| | | 81 | | CountdownSeconds="ConsentCountdown" |
| | | 82 | | Options="ConsentOptions" |
| | | 83 | | OnOptionSelected="HandleConsentOptionSelect" /> |
| | | 84 | | |
| | | 85 | | <!-- Keyboard Help Modal --> |
| | | 86 | | <KeyboardHelpModal IsVisible="ShowKeyboardHelp" |
| | 1 | 87 | | OnClose="() => ShowKeyboardHelp = false" /> |
| | | 88 | | |
| | | 89 | | </div> |