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

@@ -1,7 +1,7 @@
# Checklist
- [x] Descriptor supports Standard, Borderless, FullScreen, Tool, and BackgroundOnly modes.
- [x] World Clock Air APP keeps the LanMountain custom title bar.
- [x] World Clock Air APP uses FluentAvalonia standard title-bar chrome.
- [x] Whiteboard Air APP opens as a fullscreen titlebar-less window.
- [x] Air APP windows do not use fused desktop bottom-most services.
- [x] Air APP windows do not use `Topmost=true` promotion.

View File

@@ -8,10 +8,10 @@ Give Air APPs explicit window chrome modes so title bars, fullscreen windows, bo
- Air APP host resolves an `AirAppWindowDescriptor` from launch options before creating content.
- Supported chrome modes are `Standard`, `Borderless`, `FullScreen`, `Tool`, and `BackgroundOnly`.
- `Standard` uses the LanMountain custom title bar and normal app-window behavior.
- `Borderless` hides the custom title bar while keeping a normal app window.
- `FullScreen` hides the custom title bar, removes rounded shell chrome, and enters fullscreen.
- `Tool` keeps host-owned chrome but disables resizing and hides the taskbar entry.
- `Standard` uses FluentAvalonia `FAAppWindow` title-bar chrome and normal app-window behavior.
- `Borderless` removes title-bar chrome while keeping a normal app window surface.
- `FullScreen` removes title-bar chrome and enters fullscreen.
- `Tool` keeps FluentAvalonia title-bar chrome but disables resizing and hides the taskbar entry.
- `BackgroundOnly` is reserved for a later background Air APP lifecycle and is not used by built-in v1 apps.
- Built-in `world-clock` uses `Standard`; built-in `whiteboard` uses `FullScreen`.

View File

@@ -5,3 +5,4 @@
- [x] Map built-in `whiteboard` to `FullScreen` chrome.
- [x] Apply descriptor settings from `AirAppWindow`.
- [x] Add regression tests for supported modes and built-in mode mapping.
- [x] Replace the hand-rolled Air APP title bar with FluentAvalonia `FAAppWindow` chrome.

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.