Salah 0.3: larger AMOLED UI with swipe-scrollable prayers

This commit is contained in:
2026-09-12 13:05:15 +01:00
parent bb8be7012a
commit 8e660f403b
6 changed files with 73 additions and 113 deletions
+14 -10
View File
@@ -13,21 +13,24 @@ Morocco (Ministry of Habous), matching AlAdhan `method=21`:
- Fajr 19°, Isha 17° (twilight angles)
- Standard Asr (shadow factor 1× — Maliki default in Morocco)
- Dhuhr = solar noon + 5 min; Maghrib = sunset + 5 min (AlAdhan's baked offsets)
- Location hardcoded: Casablanca 33.5731, −7.5898 · TZ = UTC+1 year-round
(Morocco dropped DST in 2018)
- Location hardcoded: Casablanca 33.5731, −7.5898 · fixed TZ = UTC+1.
Ramadan clock changes are not handled by this version.
All computation happens **on the watch** — no GPS, no network. Pure solar math
(same Meeus approach as the sundial) lives in `src/common/prayer.js`.
## Screen
## Screen (v0.3)
- Header: CASABLANCA + current clock
- Purple banner: next prayer name + countdown (`1h 55m`, `+1d …` wraps past midnight)
- Six chord-tapered rows: widths [380, 412, 424, 406, 368, 304] px computed from
the circle chord at each row's position (fixed-width rows clipped off the disc
in the first layout — asserted numerically in tests now)
- Passed prayers dimmed (opacity 0.45); next row purple-highlighted
- 15s refresh
- Pure #000000 AMOLED background, including the list and prayer rows
- Larger 42px clock, 28px prayer names and 36px times
- Native vertically swipe-scrollable list: 80px rows in a 320×240px viewport
- Top/bottom spacers let the first and last prayers scroll to the center
- Fixed next-prayer countdown; lavender outline/text highlight the next prayer
- Normal system back button exits; no crown support assumed
- 15s refresh; no changes to prayer calculations
Build and automated tests pass; v0.3 scrolling/rendering needs an on-watch check.
`preview-0.3.png` is a static layout mock with illustrative times, not a watch screenshot.
## Project layout
@@ -52,6 +55,7 @@ npm ci
npm run release
node tests/prayer.cjs
node tests/page.cjs
node tests/amoled.cjs
```
## Install