mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
Settings → Active pills: the dot at the start of a row opens a palette of ten colours the catalog already uses, plus "Default" once something was changed. The dot looks as it always did. - CoucouKit/PillColors.swift: the preference (`pillColors` in UserDefaults, pill ID → "#RRGGBB", empty by default), the palette and the parsing. Same key, values and palette as Windows and Linux. - PillDefinition keeps the catalog's colour as `defaultColor`; `color` is now what gets painted, the user's own if they picked one. The catalog entries and every call site are unchanged. - AppState repaints the tasks already on the island when the preference changes, and a mini Mochi already on screen follows its task's colour. - iPhone: session rows, session widgets and the Live Activity already paint with the colour the Mac sends, so they follow. The session detail's backdrop now uses that colour too instead of the phone's own catalog. Service tiles, history, search and the approval notification still use the phone's catalog. Tests: tests/PillColorsTests.swift, run by scripts/test-pill-colors.sh and CI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9 lines
311 B
Bash
Executable File
9 lines
311 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-pill-colors.XXXXXX")"
|
|
trap 'rm -rf "$TEST_DIR"' EXIT
|
|
swiftc NotchBuddy/Sources/CoucouKit/PillColors.swift \
|
|
tests/PillColorsTests.swift -o "$TEST_DIR/pill-colors-tests"
|
|
"$TEST_DIR/pill-colors-tests"
|