| | | 1 | | @using Pomodoro.Web.Models |
| | | 2 | | |
| | | 3 | | <div class="keyboard-help-modal @(IsVisible ? "visible" : "")"> |
| | | 4 | | <div class="modal-backdrop" @onclick="Close"></div> |
| | | 5 | | <div class="modal-content"> |
| | | 6 | | <div class="modal-header"> |
| | 337 | 7 | | <h3>@Constants.KeyboardHelp.Title</h3> |
| | 337 | 8 | | <button class="modal-close" @onclick="Close" aria-label="@Constants.KeyboardHelp.CloseTooltip">@Constants.Ke |
| | | 9 | | </div> |
| | | 10 | | |
| | | 11 | | <div class="modal-body"> |
| | | 12 | | <div class="shortcut-section"> |
| | 337 | 13 | | <h4>@Constants.KeyboardHelp.TimerSection</h4> |
| | | 14 | | <div class="shortcut-item"> |
| | 337 | 15 | | <kbd>@Constants.KeyboardShortcuts.PlayPauseKey</kbd> |
| | 337 | 16 | | <span>@Constants.KeyboardShortcuts.PlayPauseDescription</span> |
| | | 17 | | </div> |
| | | 18 | | <div class="shortcut-item"> |
| | 337 | 19 | | <kbd>@Constants.KeyboardShortcuts.ResetKey</kbd> |
| | 337 | 20 | | <span>@Constants.KeyboardShortcuts.ResetDescription</span> |
| | | 21 | | </div> |
| | | 22 | | </div> |
| | | 23 | | |
| | | 24 | | <div class="shortcut-section"> |
| | 337 | 25 | | <h4>@Constants.KeyboardHelp.SessionSection</h4> |
| | | 26 | | <div class="shortcut-item"> |
| | 337 | 27 | | <kbd>@Constants.KeyboardShortcuts.PomodoroKey</kbd> |
| | 337 | 28 | | <span>@Constants.KeyboardShortcuts.PomodoroDescription</span> |
| | | 29 | | </div> |
| | | 30 | | <div class="shortcut-item"> |
| | 337 | 31 | | <kbd>@Constants.KeyboardShortcuts.ShortBreakKey</kbd> |
| | 337 | 32 | | <span>@Constants.KeyboardShortcuts.ShortBreakDescription</span> |
| | | 33 | | </div> |
| | | 34 | | <div class="shortcut-item"> |
| | 337 | 35 | | <kbd>@Constants.KeyboardShortcuts.LongBreakKey</kbd> |
| | 337 | 36 | | <span>@Constants.KeyboardShortcuts.LongBreakDescription</span> |
| | | 37 | | </div> |
| | | 38 | | </div> |
| | | 39 | | |
| | | 40 | | <div class="shortcut-section"> |
| | 337 | 41 | | <h4>@Constants.KeyboardHelp.OtherSection</h4> |
| | | 42 | | <div class="shortcut-item"> |
| | 337 | 43 | | <kbd>@Constants.KeyboardShortcuts.HelpKey</kbd> |
| | 337 | 44 | | <span>@Constants.KeyboardShortcuts.HelpDescription</span> |
| | | 45 | | </div> |
| | | 46 | | </div> |
| | | 47 | | </div> |
| | | 48 | | </div> |
| | | 49 | | </div> |
| | | 50 | | |
| | | 51 | | @code { |
| | | 52 | | /// <summary> |
| | | 53 | | /// Controls the visibility of the keyboard help modal |
| | | 54 | | /// </summary> |
| | | 55 | | [Parameter] |
| | 672 | 56 | | public bool IsVisible { get; set; } |
| | | 57 | | |
| | | 58 | | /// <summary> |
| | | 59 | | /// Event callback when the modal is closed |
| | | 60 | | /// </summary> |
| | | 61 | | [Parameter] |
| | 330 | 62 | | public EventCallback OnClose { get; set; } |
| | | 63 | | |
| | | 64 | | /// <summary> |
| | | 65 | | /// Closes the modal by invoking the OnClose callback |
| | | 66 | | /// </summary> |
| | | 67 | | private async Task Close() |
| | 3 | 68 | | { |
| | 3 | 69 | | await OnClose.InvokeAsync(); |
| | 3 | 70 | | } |
| | | 71 | | } |