feat.完善了时钟轻应用,为启动器提供了多语言支持

This commit is contained in:
lincube
2026-05-18 12:26:23 +08:00
parent 93758fc083
commit b6d820a320
63 changed files with 4581 additions and 342 deletions

View File

@@ -0,0 +1,13 @@
# Checklist
- [x] Clicking `DesktopClock` and `DesktopWorldClock` opens the same global Clock Air APP type.
- [x] Repeated `world-clock` open requests use the global `world-clock:clock-suite:global` instance key.
- [x] Whiteboard Air APP keeps its per-component instance key behavior.
- [x] Clock Air APP opens as a normal application window, not a desktop-layer window.
- [x] Clock Air APP settings are independent from desktop clock widget settings.
- [x] Corrupt Clock Air APP settings fall back to defaults.
- [x] World clock time labels support 12-hour, 24-hour, and follow-system formatting.
- [x] Added localization keys are present in all four supported language files.
- [x] Build and automated tests pass.
- [ ] Manual visual verification in all four languages.
- [ ] Manual verification that minimizing keeps stopwatch and timer running while closing stops them.

View File

@@ -0,0 +1,42 @@
# Clock Air APP MVP
## Goal
Upgrade the built-in `world-clock` Air APP into a focused clock suite while keeping desktop clock widgets as lightweight launch entry points.
## Scope
- Keep the existing Air APP id `world-clock` for Launcher lifecycle compatibility.
- Use one global Clock Air APP instance for every clock widget entry point.
- Provide four tabs: World Clock, Stopwatch, Timer, and Settings.
- Store Clock Air APP settings independently from desktop widget settings at `AirApps/Clock/settings.json`.
- Follow the host language setting and provide localized text for `zh-CN`, `en-US`, `ja-JP`, and `ko-KR`.
## Behavior
- `world-clock` opens as a standard resizable FluentAvalonia window.
- The default window size is approximately `780x560`, with a minimum of `680x480`.
- World Clock shows local time and a configurable city list.
- Default city list is Beijing, London, Sydney, and New York.
- Users can add, remove, and reorder city entries during the Air APP session; the list persists across restarts.
- Stopwatch supports start, pause, resume, lap, and reset; laps are kept in the current window session, up to 50 entries.
- Timer supports fixed presets, a custom minute duration, start, pause, resume, reset, and a completed state.
- Closing the Clock Air APP stops stopwatch and timer activity.
- Minimizing the window keeps stopwatch and timer activity running.
- Timer completion can activate the Clock Air APP window when the setting is enabled.
## Settings
- Time format: follow system, 24-hour, or 12-hour.
- Show seconds.
- Startup tab: last used tab, World Clock, Stopwatch, or Timer.
- Activate window when timer finishes.
## Out of Scope
- Desktop clock widget visual redesign.
- Alarms.
- Focus mode.
- System notifications.
- Running stopwatch or timer after the Air APP window is closed.
- Third-party plugin Air APP declarations.

View File

@@ -0,0 +1,15 @@
# Tasks
- [x] Add Clock Air APP settings snapshot and JSON store.
- [x] Add shared Clock Air APP time formatting helpers.
- [x] Add stopwatch and timer state models with focused tests.
- [x] Replace the old world-clock view with `ClockAirAppView`.
- [x] Configure `world-clock` as a standard resizable Air APP window.
- [x] Make `world-clock` use a global single-instance key independent of source component id.
- [x] Add world clock city add, remove, and reorder behavior.
- [x] Add stopwatch tab with lap support.
- [x] Add timer tab with presets and custom duration.
- [x] Add independent Clock Air APP settings tab.
- [x] Add `zh-CN`, `en-US`, `ja-JP`, and `ko-KR` localization keys.
- [x] Ensure AirAppHost output includes localization JSON resources.
- [x] Add regression tests for Launcher keying, descriptors, settings, formatting, stopwatch, timer, and localization coverage.