Files
smart-home-tablet/components/TimerModal.tsx
Cosmo f78daffd5b
All checks were successful
Deploy / deploy (push) Successful in 3m23s
feat(timers): tap-to-open modal with big touch targets + create via UI
Tablet touch targets were cramped (30px +/- buttons). Swap to modal UX:

- New TimerModal component handles both 'control existing' and
  'create new'. 84px countdown, 56px min button height, 3×2 adjust
  grid (-5m, -1m, -10s, +10s, +1m, +5m), big destructive cancel/stop.
  Create view has 7 duration presets (1..60 min), label input with
  shortcut chips (Чайник, Паста, Яйца…), gradient 'Запустить' CTA.
- TimerHomeWidget cards are now full tap targets — open control modal
  on press. + button in header opens create modal. Inline buttons
  removed. Subtle hint text 'тап чтобы изменить'.
- Ticking countdown inside modal stays fresh via shared timers state:
  while modal is open we look up the current timer in active[] by id
  and re-pass to modal on every tick. When timer disappears
  (cancelled / expired >30s), modal auto-closes.
2026-04-23 16:34:51 +00:00

13 KiB