Commit Graph

4 Commits

Author SHA1 Message Date
d0857d7028 [bugfix] fix countdown snapshot time calculations and unify tokio instants
- switch ClockAnchor to tokio::time::Instant for consistent async timing
- remove incorrect epoch-ms math in Countdown model and expose instant getters
- update CountdownService snapshot to use remaining_at(now) plus start/target instants
- add missing core extern declaration in lib.rs
2026-02-26 16:24:35 +01:00
503a3ef94c [refactor] simplify app state to a single countdown service
- replace AppState.countdowns vector with countdown_service
- add CountdownService::new(id, label, duration) for configurable initialization
- add CountdownService::default() with default countdown values
- remove unused next_id field and note TODO for multi-countdown support
2026-02-26 12:32:52 +01:00
7817c9c907 feat(countdown): add app state and wire countdown service into Tauri
- add `app_state` module with `ClockAnchor` and `AppState`
  - initialize `AppState` with a default `CountdownService`
  - register app state in Tauri via `.manage(app_state)`
  - extend `CountdownSnapshotDto` epoch fields to `Option<u128>`
  - add countdown model helpers for start/target epoch-ms conversion
  - return optional epoch fields from `CountdownService::snapshot`
  - ignore generated `dist/` directory in `.gitignore`
2026-02-26 12:23:54 +01:00
236cab99ae init Tauri 2026-02-20 19:40:15 +01:00