diff --git a/.claude/commands/release.md b/.claude/commands/release.md index 5c4d6eb..49cabde 100644 --- a/.claude/commands/release.md +++ b/.claude/commands/release.md @@ -114,7 +114,38 @@ Replace the line `## [Unreleased]` (at the top of the Unreleased section) with: This preserves an empty Unreleased section for future work and stamps the release with today's date. -## Step 5 — Commit +## Step 5 — Check the screenshot goldens + +A release commit is the last chance to catch a stale golden before CI fails on it. The screenshot +tests compare the UI against committed PNGs in `app/src/testDebug/screenshots/`, so any change to a +Compose screen — a new row, a reworded string, a spacing tweak — makes the matching golden wrong. +Nothing in an ordinary build catches this: `./gradlew test` only checks that every screen still +composes, so a stale golden passes locally right up until `ci.yml` runs `verifyRoborazziDebug`. + +Work out whether that is likely for this release — did it touch the UI or any user-visible string? + +``` +git diff --stat $(git describe --tags --abbrev=0)..HEAD -- 'app/src/main/kotlin/**/ui/**' 'app/src/main/res/values/strings.xml' 'app/src/testDebug/screenshots/' +``` + +If UI or strings changed but the `screenshots/` folder did not, tell the user the goldens are +probably stale and confirm it: + +``` +./gradlew :app:verifyRoborazziDebug --tests '*ScreenshotTest' +``` + +On failure, look at the `_compare` images in `app/build/outputs/roborazzi/` and check the diff is +the intended change rather than a regression, then accept the new look: + +``` +./gradlew :app:recordRoborazziDebug --tests '*ScreenshotTest' +``` + +The `--tests` filter is not optional, and recording locally is legitimate — see AGENTS.md's +"Screenshot tests" for both points. Include the updated PNGs in the release commit. + +## Step 6 — Commit Run: ``` diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 132d76f..c464532 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,3 +120,37 @@ jobs: name: lint-report path: app/build/reports/lint-results-debug.html retention-days: 14 + + # The landing page only deploys from main, so without this a broken Liquid tag or SCSS + # variable would reach the live site before anyone found out. Same build action as + # pages.yml, so a pass here means that workflow will get through too. + # + # Deliberately no `needs: detect` — the site does not involve Gradle. + pages: + name: Pages Site + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build the site + uses: actions/jekyll-build-pages@v1 + with: + source: ./docs/pages + destination: ./_site + + # Do NOT assert that _site/CNAME exists — it never will. `github-pages build` forces + # `exclude => ["CNAME"]` whenever the site's own `exclude` is Jekyll's default, so the + # official builder strips it on purpose. The custom domain comes from the repository's + # Pages settings, not from a file in the artifact, which is why coilforphoniebox.app has + # been resolving all along without it. + # + # Worth knowing that a local `jekyll build` does copy CNAME, having no such rule, so this + # difference does not show up until it runs here. + - name: Check the pages and stylesheet rendered + run: | + test -s ./_site/main.css || { echo "::error::main.css missing or empty"; exit 1; } + test -f ./_site/index.html || { echo "::error::index.html missing"; exit 1; } + test -f ./_site/privacy/index.html || { echo "::error::privacy page missing"; exit 1; } + grep -q 'galleryItem' ./_site/index.html || { echo "::error::screenshot galleries did not render"; exit 1; } + grep -q 'deviceFrame' ./_site/index.html || { echo "::error::hero device frame did not render"; exit 1; } + if grep -q '{%' ./_site/index.html; then echo "::error::unrendered Liquid tag left in index.html"; exit 1; fi diff --git a/.github/workflows/google-play.yml b/.github/workflows/google-play.yml index 3e85fa4..b526508 100644 --- a/.github/workflows/google-play.yml +++ b/.github/workflows/google-play.yml @@ -106,6 +106,13 @@ jobs: serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} packageName: app.coilforphoniebox releaseFiles: release-assets/*.aab - track: ${{ inputs.track }} + # `tracks`, not `track`: the action warns that the singular form is deprecated, and + # refuses outright if both are set. It takes a comma-separated list; this workflow + # deliberately passes exactly one, which is why its own input stays singular. + # + # It must never arrive empty — the action defaults to *production* when neither input + # is given, which is not a default anything here should fall into by accident. Hence + # the `|| 'internal'` as well as the input's own default. + tracks: ${{ inputs.track || 'internal' }} whatsNewDirectory: whatsnew/ mappingFile: release-assets/mapping.txt diff --git a/AGENTS.md b/AGENTS.md index f1858c5..3978a18 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,12 +23,12 @@ condensed map of it, not a replacement. See "Implementation status" for what is | `core-transport/` | ZeroMQ client: `ZmqRpcClient` (DEALER), `ZmqStatusSubscriber` (SUB), `PhonieboxSession` (watchdog, reconnect), `ConnectionManager` (active box, reference-counted lifetime), `Commands`, the payload parsers, `HostDiscovery` (mDNS), `BoxProbe`. | | `core-data/` | Room database and DAOs, DataStore settings, repository implementations, settings export/import. | | `feature-media/` | `PhonieboxPlayer` (`SimpleBasePlayer`), `PhonieboxMediaService` (`MediaSessionService`), notification handling, `AutoSessionStarter`, `BootReceiver`, `MediaSessionBinder`. | -| `feature-shortcuts/` | `ShortcutPublisher` (dynamic and pinned shortcuts), `ShortcutSynchronizer`, `PlayDeepLink` (`coil://play?box=…`). | +| `feature-shortcuts/` | `ShortcutPublisher` (dynamic and pinned shortcuts), `ShortcutSynchronizer`, `PlayDeepLink` (`coil://play?box=…`), `OpenDeepLink` (`coil://open?box=…`). | | `app/src/testDebug/` | Screenshot tests and their golden PNGs — the app module's only tests. In the *debug* unit test source set, not `test`, because they compose into a debug-only activity. See "Screenshot tests". | | `app/src/debug/` | `HiltTestActivity` and the manifest entry for it: an empty, unexported Hilt entry point the screenshot tests compose into. Debug builds only. | | `docs/implementation-plan.md` | Full architecture/design spec — tech stack, module layout, transport design, data model, media session, multi-box design, branding, i18n rules, phased build plan. **Read before implementing anything non-trivial.** | | `docs/protocol-notes.md` | Condensed Phoniebox v3 ZMQ protocol reference, distilled from the upstream Python source. | -| `docs/pages/` | The GitHub Pages site (Jekyll), deployed by `pages.yml` — landing page (with generated screenshots in `assets/screenshots/`) and privacy policy, served at `coilforphoniebox.app` via the `CNAME` file in this folder. Kept separate from the planning docs above so the Pages *site* only contains user-facing content — the planning docs are still public in the repo, just not part of the deployed website. | +| `docs/pages/` | The GitHub Pages site (Jekyll), deployed by `pages.yml` — landing page (with generated screenshots in `assets/screenshots/`) and privacy policy, served at `coilforphoniebox.app` via the `CNAME` file in this folder. Kept separate from the planning docs above so the Pages *site* only contains user-facing content — the planning docs are still public in the repo, just not part of the deployed website. See "Landing page" below for the theme it is built on. | | `spike/` | Standalone Gradle/Kotlin JVM project validating the transport approach (JeroMQ DEALER client) against a real box, independent of Android. | | `tools/check_store_metadata.sh` | Validates `fastlane/metadata/android/` against Play's per-locale character limits (title 30, short 80, full 4000, release notes 500) **and its listing images** (24-bit PNG, no alpha, 320–3840 px a side, long side at most twice the short one, at least two per set). Pass a versionCode to also require release notes in every launch locale. Run by `/release` and by `google-play.yml`. Counts characters as bytes-minus-UTF-8-continuation-bytes rather than using `wc -m`, which silently counts bytes in a non-UTF-8 shell locale. | | `tools/probe_phoniebox.py` | Python/pyzmq script that does the same validation from the other side (REQ vs DEALER framing, pipelining, PubSub schema dump) — used to sanity-check protocol assumptions against a live box before trusting them in Kotlin. | @@ -44,7 +44,12 @@ condensed map of it, not a replacement. See "Implementation status" for what is - `ci.yml` / `codeql.yml` — build/test/lint/screenshot verification and CodeQL analysis on PRs to `main` or `develop`. Both start with a `detect` job that checks for a root `./gradlew`; that gate - is now satisfied, so these actually build, test and lint. + is now satisfied, so these actually build, test and lint. `ci.yml` also has a `Pages Site` job + that builds `docs/pages/` with the same action `pages.yml` uses and checks that `main.css`, both + pages, the galleries and the hero frame all rendered with no Liquid left unprocessed. It + deliberately skips the `detect` gate — the site has nothing to do with Gradle — and exists + because `pages.yml` only runs on `main`, so without it a broken template would reach the live + site before anyone noticed. It must **not** assert `_site/CNAME`; see "Landing page" for why. - `screenshots.yml` — re-records the golden screenshots *and* the store/website images on the Linux runner and commits them back to the branch. Triggered from the Actions tab, or by a push to `develop` whose commit message contains `[record-screenshots]`. See "Screenshot tests". @@ -60,12 +65,16 @@ condensed map of it, not a replacement. See "Implementation status" for what is file's `versionName` disagrees with the tag. Release notes come from `fastlane/metadata/android/{locale}/changelogs/{versionCode}.txt`, gated by `tools/check_store_metadata.sh` — a missing or over-limit locale fails the deploy. It does - **not** upload listing text (title/descriptions) yet; `r0adkll/upload-google-play` handles only - the AAB, mapping and release notes. + **not** upload listing text (title/descriptions) or screenshots yet; `r0adkll/upload-google-play` + handles only the AAB, mapping and release notes. The track reaches that action as `tracks` — the + singular `track` is deprecated there, and setting both is a hard error. This workflow's own input + stays singular because it passes exactly one, and it defaults twice over: the action uploads to + **production** when neither input is given, which is not a default to reach by accident. - `pages.yml` — deploys `docs/pages/` via Jekyll to GitHub Pages on push to `main` (path-filtered to `docs/pages/**`). GitHub Pages must be enabled in repo settings with source "GitHub Actions", - and the `coilforphoniebox.app` DNS must point at GitHub Pages, for the `CNAME` file in - `docs/pages/` to actually resolve. + the custom domain must be set there, and `coilforphoniebox.app` DNS must point at GitHub Pages. + The domain comes from that setting, **not** from `docs/pages/CNAME` — the official builder + strips that file from the output on purpose. See "Landing page". `main` is branch-protected: PRs required (enforced for admins too, 0 required approvals), plus `Build`/`Unit Tests`/`Lint`/`Analyze (Kotlin)` as required status checks (these currently pass @@ -169,6 +178,22 @@ server in this repo. (`coverart_cache_manager.py`); an empty string means "no artwork". Only a later request returns a file name, so a single call never yields a cover. `LibraryParser.coverArt` models the three outcomes and both callers retry. +- **Cover art is the only HTTP in the app, and the platform blocked it.** The file name resolves over + ZMQ, but the image comes from the box's own web server over plain `http://` — and Android refuses + cleartext HTTP by default at `targetSdk` 28 and up, which is every build this app has ever made. + `app/src/main/res/xml/network_security_config.xml` permits it (`base-config`, because the box's + address is entered at runtime and there is no domain list to write). Two things made this invisible + for a long time: the ZMQ sockets are raw TCP and were never subject to the policy, so *everything + except covers* worked and the transport looked innocent; and `CoverArt`'s error branch draws the + same placeholder as a song with genuinely no artwork, so the screen could not tell a refused + request from an absent cover. The image loader now carries a `DebugLogger` in debug builds for + exactly that reason. Verified against a real box: `get_single_coverart` answers with + `cover-.jpg` and `http:///cover-cache/` serves the JPEG. Note the cover file + name is always a hash, so `Box.coverUrl` needs no URL escaping even though the *song* paths it is + derived from are full of spaces and umlauts. +- **A wrong path on the box's web server answers `200`, not `404`** — the web UI is a single-page app + and its server falls back to `index.html`, so `/cover_cache/…` returns 609 bytes of HTML with a + `200`. When checking a cover URL by hand, look at `Content-Type`, not the status code. - **Never let cover art gate other state.** Every screen `combine`s the player state, and `combine` emits nothing until *all* inputs have emitted once — so a cover flow whose first value needs a round trip freezes the title, progress and controls with it. `PlayerRepository.coverUrl` is a @@ -207,9 +232,24 @@ These are settled decisions from `docs/implementation-plan.md`, not open questio Room migration across every table. - **Coil (this app) vs Coil (the image-loading library):** name collision is known and accepted; alias the library import to keep it unambiguous in code and review. -- **i18n is not an afterthought.** English is the source language for everything (code, comments, - commits, docs, UI strings). No hardcoded user-facing strings, no string concatenation, use - ``, format numbers/dates via the platform. Launch locales: en, de, fr, es, nl. +- **i18n is not an afterthought, and not a follow-up either.** English is the source language for + everything (code, comments, commits, docs, UI strings). No hardcoded user-facing strings, no + string concatenation, use ``, format numbers/dates via the platform. Launch locales: + en, de, fr, es, nl. +- **A new user-facing string lands in all five locales in the same change.** Not "English now, + translations later": later does not come on its own, and the gap is invisible from the English + build — a missing string falls back silently, so the feature looks finished while three of the + five launch locales show English in the middle of a translated screen. Write the four + translations as part of the work, flag them as drafts for a fluent speaker, and check with: + + ```bash + ./gradlew :app:lintDebug # MissingTranslation, MissingQuantity — both must come back clean + ``` + + A translation drafted by whoever wrote the feature and marked for review is not the "unreviewed + machine translation" the convention below rejects: what that rule forbids is shipping a + complete-looking translation nobody has read, not writing one down where the reviewer can find + it. Absence is the worse failure of the two, because nothing reports it. - **No custom fonts** — Material 3 default type scale only (keeps full Latin-1 coverage for all launch locales without APK cost). - **Dynamic colour (Material You) is off by default**, toggle in settings; brand colours are fixed @@ -351,9 +391,13 @@ Three levels, and the distinction matters: Kotlin 2.0.21 cannot read. Upgrading it means upgrading Kotlin and the Compose compiler too. Covered so far: the whole app on three devices (player light and dark, library, favourites, -settings, offline, onboarding), the player screen (playing, paused, idle, web radio, sleep -timer, light and dark), the library screen (folders, tracks, albums, search, no results, empty, -light and dark) and the chrome components. +settings top and lower half, box management, one box's page, offline, onboarding), the player +screen (playing, paused, idle, web radio, sleep timer, light and dark), the library screen +(folders, tracks, albums, search, no results, empty, light and dark) and the chrome components. + +Box management is captured with **two** boxes configured (`app/boxes_*`, `app/box_detail_*`), since +one box is the case where those screens have least to say — and the box page golden is the +*non-active* box, which is the state the old settings screen could not reach at all. The tablet goldens are the reason the player got a tablet layout at all: `app/player_tablet.png` used to be a full-screen cover with its own controls pushed off the bottom, which is obvious in a @@ -375,8 +419,11 @@ commits the result back to the branch. Its own commit carries no marker, so it c `StoreAssetTest` generates the Play listing screenshots and the website's, from the same fakes and the same harness as the goldens, into `fastlane/metadata/android/en-US/images/` — `phoneScreenshots` (1233×2460), `sevenInchScreenshots` (1200×1920) and `tenInchScreenshots` -(2560×1600), five images each. The phone set is copied to `docs/pages/assets/screenshots/`, -which is what the landing page shows. +(2560×1600), five images each. All three sets are copied into `docs/pages/assets/screenshots/` +— the phone set at the top level, then `tablet7/` and `tablet10/` — because the website is served +from `docs/pages` only and cannot link into the fastlane tree. Everything is copied, not just what +the site currently shows, so changing which tablet shots appear is an edit to +`docs/pages/_config.yml` alone and never needs Gradle or a re-record. **They are products, not baselines**, and the distinction runs through everything here: @@ -404,9 +451,15 @@ which is what the landing page shows. - **English only, deliberately.** Another locale is one more subclass with a locale qualifier, but three of the five translations are unreviewed drafts missing 43 strings, and a store screenshot with English fallbacks visible in it is worse than no localised screenshot. -- The **10-inch set shows the untouched tablet layout** — a phone layout stretched across - 1280 dp. It is accurate and not flattering; publishing the phone set alone may serve the - listing better until that layout is addressed. +- The **10-inch set is now mixed, not uniformly bad.** The player and sleep timer genuinely use + the width — since "put the cover beside the controls on a wide screen" they are a two-pane + layout with the cover beside the title and transport controls. Library, favourites and search + are still the phone layout stretched across 1280 dp, which leaves folder names on the far left + with their action icons about 1500 px away, and over half the favourites grid empty. Accurate, + and not flattering. The landing page shows the two that work and skips the three that do not + (see "Landing page"); the same split is worth making if these are ever uploaded to Play. +- The **7-inch set holds up throughout** — at 1200×1920 it is portrait, so it reads as a roomier + phone rather than a stretched one. Neither `google-play.yml` nor `r0adkll/upload-google-play` uploads images yet, so these files are the canonical source waiting for a tool that reads them — the same position the listing text @@ -414,10 +467,96 @@ is in. The locale axis is one German golden rather than all five launch locales — `library/folders_de.png`, which is also the only place the translations can be *seen* without a -phone. It shows the drift honestly: 43 of the 163 strings have no German at all yet and fall -back to English on screen. - -## The `coil://play` deep link +phone. It used to show 43 strings falling back to English mid-screen, which is how the gap was +noticed at all; every string is translated as of this commit, so what it now shows is German +throughout. + +## Landing page + +`docs/pages/` is built on **[automatic-app-landing-page](https://github.com/emilbaehr/automatic-app-landing-page)** +by Emil Baehr, MIT. The theme is **vendored** — `_layouts/`, `_includes/`, `_sass/` and +`main.scss` are copies, not a `remote_theme` — because it keeps `index.html` and `main.scss` at +its repo root, and `remote_theme` only pulls `_layouts`, `_includes`, `_sass` and `assets`. So +upstream fixes have to be merged by hand; `_config.yml`'s header comment records what diverged. +Vendoring means the MIT notice has to travel with the code, so it is reproduced in +`docs/pages/_THEME-LICENSE.txt` — underscore-prefixed, so Jekyll keeps it out of the built site. +MIT is GPL-compatible, so it does not conflict with Coil's own GPL-3.0. + +**`CNAME` never appears in the build output, and that is correct.** `github-pages build` — what +both `pages.yml` and the CI check run — sets `exclude: [CNAME]` itself whenever the site's own +`exclude` is Jekyll's default, which `docs/pages/_config.yml` leaves it as. The custom domain +comes from the repository's Pages settings; for an Actions deployment nothing reads a `CNAME` file +out of the artifact, which is why `coilforphoniebox.app` resolved long before anyone checked. Do +not "fix" this by asserting the file exists, and be aware that a local `jekyll build` *does* copy +it, so local output and CI output differ on this one file. + +The theme is built for iOS apps, and three parts of it were wrong for an Android-only client: + +- **The device frame was an iPhone** — body PNGs plus a notched SVG clip-path sized for + 1125×2436 (0.462). The store screenshots are 1233×2460 (0.501), so they came out squashed. + Replaced with a bezel drawn in CSS that takes its height from the image, so it cannot squash + whatever gets dropped in later. +- **It showed one screenshot.** `screencontent.html` looped the files in `assets/screenshot/` + but assigned every one to the same ``, so the last silently won. Replaced by a captioned + `overflow-x` strip driven by the `screenshots:` list in `_config.yml`, plus the first entry in + the hero frame. No carousel script — images a reader can flick through beat images behind a + JS state machine, and it survives JS being off. +- **The App Store badge rendered unconditionally** and the "smart app banner" was + `apple-itunes-app`. Both gone; the Play badge and a GitHub Releases button replace them. The + `itunes.apple.com` lookup that filled in icon, name and price at runtime is gone too, along + with the jQuery it needed. + +Beyond the theme, three things were added: + +- **A second, tablet strip.** `gallery.html` is shared by both and takes `include.items`, + `include.heading`, `include.area` and `include.variant`. Two details there have bitten once + each: Jekyll exposes include parameters as `include.*`, and a bare `{% if items %}` silently + renders nothing; and both strips carry the same `.gallery` class, so the grid area has to come + from a per-strip modifier or the second lands on top of the first. The tablet strip mixes + landscape and portrait shots, so its cards size by image *height* and take their width from the + image (`width: min-content`) — sized off the caption instead, a 182px portrait shot ends up + centred in a 530px landscape-shaped card. +- **A lightbox**, in `_includes/lightbox.html`. Native `` + `showModal()`, so Escape, + the backdrop and the focus trap are the browser's job, and roughly 40 lines cover the rest: + click to open, arrow keys and buttons to page within the clicked strip, and the `src` dropped + on close. Every thumbnail is a real `` to its own image file, so with no JS or no `` + the click still opens the full-size image. The hero is zoomable too and forms a group of one. +- **A side-links panel** (`sidelinks.html`, `side_links:` in `_config.yml`) filling the four + columns beside the prose, which is capped at a 780px measure and otherwise left that band + empty. A url containing `://` is treated as external and gets `target="_blank"` plus the + outward arrow. + +Every thumbnail needs `width`/`height` in `_config.yml`. They are not decoration: the images are +lazy-loaded and the tablet strip sizes by height, so with no intrinsic ratio to work from the +browser collapses each one to 1px wide until it loads. Note also that the thumbnails sit inside +the lightbox anchor, so CSS must reach them with a descendant selector — `.galleryItem > img` +matches nothing and the images silently fall back to natural size, 2560px wide in one case. + +Two things about it are load-bearing: + +- **`.coverWrapper`'s height is a magic number, per breakpoint.** It wraps the whole page in + `default.html`, so it cannot size to content without tinting the features and footer as well. + Everything in `.appInfo` is light text, so anything that spills past the band lands on the + white body and vanishes — `.downloadNote` is last and goes first. Sweep the widths after + touching the hero. The tightest case is where the download buttons stack; buttons stack at + ≤600px rather than the theme's ≤528px precisely because `flex-wrap` used to drop the second + one to its own row somewhere in between and add an unaccounted row of height. +- **Two logo variants.** `assets/coil-mark.svg` (deep green card, white coil) is the favicon and + the hero icon, and the header on the white privacy page. It is a copy of `brand/coil-mark.svg` + — Jekyll only copies files from the site source, so the two can drift; keep them in step. + `assets/coil-mark-header.svg` inverts + it — white card, green coil — for the header on the green cover, where the standard mark has + almost no contrast. Its viewBox is cropped to the card so the logo is not mostly dead space. + The layout picks one via `{% include header.html inverse=true %}`. + +Font Awesome still loads from `use.fontawesome.com` for the 14 feature and social icons — the +one third-party request left on the site. + +## Deep links + +Two hosts, and the split is the point: `coil://play` reaches the box, `coil://open` does not. + +### `coil://play` — start a favourite `PlayDeepLink` in `:feature-shortcuts` owns the format; `PlayShortcutActivity` in `:app` answers it. It is **exported** (`AndroidManifest.xml`), so it is not a private shortcut mechanism: an automation @@ -444,12 +583,43 @@ coil://play?box=&type=track&url= - Adding anything to this format means widening what an unprivileged external intent can ask Coil to do. Keep it to starting playback — the same limit the RPC surface itself observes. +### `coil://open` — open the app + +`OpenDeepLink` in `:feature-shortcuts` owns the format; `MainActivity` answers it, via a second +`intent-filter` on the launcher activity. + +``` +coil://open # open the app, leaving the active box alone +coil://open?box= # open it showing that box +``` + +- **`box` is optional here**, unlike in a `play` link where it is required. A folder path means + nothing without the box it came from; "just open the app" is a complete request on its own. A + blank `box=` is treated as absent rather than as an error. +- **It sends the box nothing.** All an outside caller gets is what tapping the launcher icon already + does, plus which of the user's own boxes the app comes up on — so this is the *less* privileged of + the two links, and it cannot start, stop or change playback. +- **The id is checked before it is used.** `BoxRepository.setActive` writes straight to settings + without validating, so a stale link — a reset phone, a hand-written id — would otherwise leave the + app pointed at a box that does not exist. `MainActivity` looks it up first and says so with a + toast if it is gone. +- **A later link arrives at `onNewIntent`, not `onCreate`**, because the activity is `singleTask`. + Both paths are handled, and a `deepLinkHandled` flag rides in `savedInstanceState` so a rotation + does not re-apply the link — otherwise a user who arrived by link, switched box, then turned the + phone would be yanked back. +- **A box's own page hands the link out** ("Copy link to this box" / "Share link to this box", on + `BoxDetailScreen`), for the same reason a favourite's menu does: the box id is a UUID shown nowhere else, so + `?box=` is unusable without a way to obtain it. A bare `coil://open` needs no such help and can be + typed by hand. + ## Project conventions - Project language is English throughout: code, comments, commit messages, documentation. - Translations are contributed as PRs against `res/values-/strings.xml`; no unreviewed machine translation (a partial, human-reviewed translation is fine — an unreviewed complete one - is not). + is not). This is about *quality*, and is not licence to leave a locale short: every string + exists in every locale as of this commit, as a draft where it has to be, and `MissingTranslation` + coming back clean is the check. See the i18n rule under "Architecture decisions to preserve". - Scope discipline: Coil is deliberately a playback remote only. Card management, box system settings and shutdown/reboot stay out of scope — see README "What Coil does not do" and the implementation plan §1 and §16. **One exception, deliberately made: the sleep timer** — see @@ -467,9 +637,14 @@ still needs doing, in rough order of importance: 1. **First run against a real box happened and found three bugs** (all fixed): `as_thread` discarding every result, `core.version` not being an RPC, and the volume slider firing a command per frame. What is confirmed working on hardware: the DEALER framing, PubSub status, play/pause/ - next/prev, `play_folder`, and favourites. Still unconfirmed on hardware: the library views and - cover art (both were broken by `as_thread` and have not been retested), the connection test, - mDNS discovery, the media session and notification, launcher shortcuts, and multi-box switching. + next/prev, `play_folder`, and favourites. A later session found a fourth on hardware — Android's + default cleartext-HTTP block stopping every cover fetch (see "Cover art is the only HTTP in the + app" above); the whole cover chain is now verified against a real box *up to the phone* + (`playerstatus.file` → `get_single_coverart` → the HTTP fetch), and `get_folder_content` and + `list_albums` answer correctly too, but **the fix itself has not yet been seen rendering in the + app on a device**. Still unconfirmed on hardware: the library views as screens, the connection + test, mDNS discovery, the media session and notification, launcher shortcuts, and multi-box + switching. 2. **The four translations are unreviewed drafts.** `values-de|fr|es|nl/strings.xml` each carry a header saying so. Per the rule above they must be read by a fluent speaker before a release — missing strings fall back to English, so correcting them incrementally is safe. @@ -509,14 +684,27 @@ still needs doing, in rough order of importance: stays in the single `strings.xml`. `:feature-shortcuts` therefore has no string resources at all. For the same reason the media notification's text reaches `:feature-media` through the `MediaNotificationTexts` interface, implemented in `:app`. -- **"Add another box" lives on the settings screen, and is always visible there.** §7.5's collapsed - top bar — a plain indicator, not a switcher, while there is one box — is kept, but it made a second - box unreachable: the switcher sheet holds the only other "Add box" entry, and settings offered one - solely when *no* box existed. One box was therefore a dead end, which reads as multi-box being - unimplemented rather than merely hidden. Settings now also carries a box picker once there are two - or more, mirroring the switcher, since that is where boxes are configured. Adding a box - deliberately does **not** make it active: nothing should tear down a live connection the user did - not ask to change. +- **Boxes are configured on their own screen, not in the settings list.** §7.5's collapsed top bar — + a plain indicator, not a switcher, while there is one box — is kept, but it made a second box + unreachable, so settings had to hold a way in. Doing that inside the settings list did not work: + "switch box" (a radio list), "add another box" and "this box's address" ended up as neighbouring + rows of the same shape, and the screen read as three overlapping ways to say *box*. Box management + is now `ui/boxes/BoxesScreen` (every box, plus "Add box") with `BoxDetailScreen` under it (name, + address, ports, that box's `coil://open` link, removing it), behind one "Manage boxes" row in + settings. Consequences worth keeping: + - Both screens address a box **by id** (`BoxesViewModel`), not through "the active box". Renaming + or re-addressing a non-active box no longer requires switching to it — on the settings screen + that was impossible, since every field there described whichever box was active. + - Switching boxes stays in the top bar only, and a box row *opens* the box rather than selecting + it. A box page for the non-active box offers "Switch to this box"; the active one just says so. + - The library actions (rescan, the search crawl) stay in settings, because they run against the + active box — on a box page, three of four pages could not offer them honestly. + - The rows both screens are built from live in `ui/components/SettingsRows.kt`, so box management + looks like the screen it was reached from. + - Sub-screens of a tab (box management, a box, add-box) get a back arrow in the top bar and keep + the settings tab lit — see `owningDestination` in `CoilApp`. +- Adding a box deliberately does **not** make it active: nothing should tear down a live connection + the user did not ask to change. - **A single track is favouritable**, which the plan's `FOLDER | ALBUM` favourite type (§6.3, §7.2) does not allow. From a playing song, "save this" is genuinely ambiguous between the track and its folder, so both are offered by name instead of one being guessed at: a tap on the player's star diff --git a/CHANGELOG.md b/CHANGELOG.md index e0978cc..24331be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,33 @@ automatically from the `## [x.y.z]` heading matching `versionName` in `app/build ## [Unreleased] +## [0.9.0] - 2026-08-05 + +### Added +- **Media controls can be switched off entirely.** "Show controls" had two settings, both of which + put a notification up sooner or later; it now has three, with "Never" as the third. In that mode + no media session is created at all — no notification, no lock screen controls, no hardware volume + buttons reaching the box — and Coil controls the box from its own screens only. Choosing it while + the box is playing takes the notification down there and then rather than at the next restart +- **A link that just opens Coil**, `coil://open`, alongside the existing link that starts a + favourite — optionally naming a box, so it opens showing that one. Box management hands the link + out per box under "Copy link to this box". It sends the box nothing and never starts playback + +### Changed +- **Boxes are managed on their own screen**, reached from "Manage boxes" in settings, instead of + being a stretch of the settings list where picking a box, adding a box and editing the current + box sat next to each other and looked alike. Each box now has its own page: name, address and + ports, its `coil://open` link, and removing it. A box that is not the active one can be renamed + or re-addressed without switching to it first, which was previously impossible. Switching boxes + stays where it was, in the name at the top of the screen; settings keeps the library actions, + which act on the box Coil is controlling now + +### Fixed +- **Cover art never loaded on a real box.** A Phoniebox serves artwork over plain HTTP, and Android + blocks cleartext HTTP by default, so every cover request was refused before it left the phone. + Nothing showed it: a refused request draws the same placeholder as a song with no artwork, and the + ZMQ sockets are raw TCP and so were never affected — which is why everything except covers worked + ## [0.8.0] - 2026-08-05 ### Added diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1d246a0..84716df 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -20,8 +20,8 @@ android { applicationId = "app.coilforphoniebox" minSdk = 26 targetSdk = 36 - versionCode = 2 - versionName = "0.8.0" + versionCode = 3 + versionName = "0.9.0" } androidResources { @@ -150,15 +150,30 @@ val flattenStoreAssets = tasks.register("flattenStoreAssets") { // The website is served from docs/pages only, so it needs its own copy rather than a // link into the fastlane tree. - val phones = storeImages.resolve("phoneScreenshots") - if (phones.isDirectory) { - pagesScreenshots.mkdirs() - phones.listFiles { file -> file.extension == "png" }?.forEach { file -> - file.copyTo(pagesScreenshots.resolve(file.name), overwrite = true) + // + // All three sets are copied, not just the ones the site currently shows. Which tablet + // images are worth showing is a content decision — some screens still have a lot of dead + // space at 1280 dp — and it belongs in docs/pages/_config.yml's `tablet_screenshots` + // list, not in a build script. Copying everything means changing that list never + // requires touching Gradle or re-recording. + var copied = 0 + listOf( + "phoneScreenshots" to pagesScreenshots, + "sevenInchScreenshots" to pagesScreenshots.resolve("tablet7"), + "tenInchScreenshots" to pagesScreenshots.resolve("tablet10"), + ).forEach { (setName, destination) -> + val source = storeImages.resolve(setName) + if (!source.isDirectory) return@forEach + destination.mkdirs() + source.listFiles { file -> file.extension == "png" }?.forEach { file -> + file.copyTo(destination.resolve(file.name), overwrite = true) + copied++ } } - logger.lifecycle("Flattened $flattened store screenshot(s); phone set copied to the Pages site.") + logger.lifecycle( + "Flattened $flattened store screenshot(s); copied $copied to the Pages site." + ) } } diff --git a/app/lint.xml b/app/lint.xml index 6d2f6f5..f724735 100644 --- a/app/lint.xml +++ b/app/lint.xml @@ -11,4 +11,16 @@ + + + + + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9e56b37..45688af 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -15,6 +15,7 @@ android:fullBackupContent="@xml/backup_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" + android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.Coil" @@ -29,6 +30,18 @@ + + + + + + + + + + Alle wiederholen + Wiedergabeoptionen + Einschlaftimer + Einschlaftimer ist aktiv + Timer abbrechen + Einschlaftimer + Beendet die Wiedergabe nach der gewählten Zeit. Die Box bleibt eingeschaltet — Coil schaltet sie nie aus. + Stoppt in %1$s + + %1$s Min. + %1$s Min. + + + + Ordner als Favorit speichern + Ordner aus den Favoriten entfernen + Titel als Favorit speichern + Titel aus den Favoriten entfernen + Album als Favorit speichern + Album aus den Favoriten entfernen + Favoriten-Optionen + + + Bibliothek durchsuchen + Suche löschen + Titel + Nichts gefunden + Coil durchsucht, was es von der Box geladen hat. Alben sind vollständig da, sobald der Tab „Alben“ geöffnet wurde; Ordner und Titel kommen dazu, sobald du sie öffnest. In den Einstellungen kann Coil einmal die ganze Bibliothek durchgehen und alles durchsuchbar machen. + + + Details + Pfad + Interpret + Album + Album-Interpret + Titelnummer + Länge + Datei + + + Link kopieren + Link teilen + Link kopiert + Diese Box ist auf diesem Telefon nicht eingerichtet. + Link zu dieser Box kopieren + Link zu dieser Box teilen + Öffnet Coil mit dieser Box — für eine Automatisierungs-App, einen NFC-Tag oder eine Notiz. Die Wiedergabe wird nicht gestartet. + + + Ganze Bibliothek durchsuchbar machen + Geht jeden Ordner einmal durch, damit die Suche alles findet. Bei einer großen Bibliothek dauert das, und Karten werden auf der Box währenddessen langsamer erkannt. Lass diesen Bildschirm offen, solange es läuft. + Anhalten + %1$s Ordner gelesen. Zum Anhalten tippen; das Gelesene bleibt durchsuchbar. + Bibliothek durchsuchbar: %1$s Ordner gelesen. + Nach %1$s Ordnern angehalten — diese Bibliothek ist größer, als Coil auf einmal erfasst, daher kann die Suche noch etwas übersehen. + Die Box hat nach %1$s Ordnern nicht mehr geantwortet. Das Gelesene bleibt durchsuchbar. + Die Box spielt gerade. Versuche es erneut, wenn sie im Leerlauf ist, damit Karten weiterhin sofort erkannt werden. + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 812525d..a9c0ef8 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -12,6 +12,7 @@ Biblioteca Favoritos Ajustes + Atrás No se está reproduciendo nada Título desconocido @@ -45,14 +46,17 @@ hace %1$d minuto hace %1$d minutos + hace %1$d de minutos hace %1$d hora hace %1$d horas + hace %1$d de horas hace %1$d día hace %1$d días + hace %1$d de días Reproducir carpeta Subir un nivel @@ -72,6 +76,11 @@ Cambiar de caja Añadir caja Activa + Coil controla una caja a la vez. Cuando haya una segunda configurada, el nombre de la parte superior de la pantalla cambia entre ellas. + Coil está controlando esta caja. + Cambiar a esta caja + El reproductor, la biblioteca y los favoritos mostrarán esta caja. + Conexión La caja y este teléfono tienen que estar en la misma red. Coil habla directamente con la caja; nada pasa por internet. Encontrado en esta red @@ -112,8 +121,10 @@ Idioma Abre los ajustes de idioma del sistema para Coil. - Esta caja + Gestionar cajas Dirección + Biblioteca + Se aplica a %1$s, la caja que Coil controla ahora. Volver a leer la biblioteca en la caja Pide a la caja que busque archivos nuevos. Con una biblioteca grande puede tardar. La caja está releyendo su biblioteca. @@ -122,6 +133,8 @@ Controles en la pantalla de bloqueo Mostrar controles + Nunca + Sin notificación y sin controles en la pantalla de bloqueo. Controlas la caja desde Coil. Solo mientras Coil está abierto Sin conexión en segundo plano y sin gasto de batería. Siempre que la caja suene @@ -158,4 +171,74 @@ Más opciones + + + + + Repetir todo + Opciones de reproducción + Temporizador + El temporizador está activo + Cancelar el temporizador + Temporizador + Detiene la reproducción después del tiempo que elijas. La caja se queda encendida — Coil nunca la apaga. + Se detiene en %1$s + + %1$s min + %1$s min + %1$s min + + + + Guardar la carpeta como favorito + Quitar la carpeta de favoritos + Guardar la pista como favorito + Quitar la pista de favoritos + Guardar el álbum como favorito + Quitar el álbum de favoritos + Opciones del favorito + + + Buscar en la biblioteca + Borrar la búsqueda + Pistas + No se encontró nada + Coil busca en lo que ha cargado de la caja. Los álbumes están todos en cuanto se abre la pestaña Álbumes; las carpetas y las pistas van llegando a medida que las abres. En los ajustes, Coil puede recorrer toda la biblioteca una vez y hacer que todo sea localizable. + + + Detalles + Ruta + Artista + Álbum + Artista del álbum + Número de pista + Duración + Archivo + + + Copiar el enlace + Compartir el enlace + Enlace copiado + Esa caja no está configurada en este teléfono. + Copiar el enlace a esta caja + Compartir el enlace a esta caja + Abre Coil mostrando esta caja — para una app de automatización, una etiqueta NFC o una nota. No inicia la reproducción. + + + Hacer localizable toda la biblioteca + Recorre cada carpeta una vez para que la búsqueda lo encuentre todo. Con una biblioteca grande tarda, y mientras tanto las tarjetas pueden tardar en registrarse en la caja. Deja esta pantalla abierta mientras se ejecuta. + Detener + %1$s carpetas leídas. Toca para detener; lo leído sigue siendo localizable. + Biblioteca localizable: %1$s carpetas leídas. + Se detuvo tras %1$s carpetas — esta biblioteca es mayor de lo que Coil indexa de una vez, así que la búsqueda puede seguir sin encontrar parte de ella. + La caja dejó de responder tras %1$s carpetas. Lo leído sigue siendo localizable. + La caja está reproduciendo. Inténtalo cuando esté en reposo, para que las tarjetas se sigan registrando enseguida. + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index cfac702..259b47b 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -16,6 +16,7 @@ Bibliothèque Favoris Réglages + Retour Aucune lecture en cours Titre inconnu @@ -49,14 +50,17 @@ il y a %1$d minute il y a %1$d minutes + il y a %1$d de minutes il y a %1$d heure il y a %1$d heures + il y a %1$d d\'heures il y a %1$d jour il y a %1$d jours + il y a %1$d de jours Lire le dossier Remonter d\'un niveau @@ -76,6 +80,11 @@ Changer de box Ajouter une box Active + Coil pilote une box à la fois. Dès qu\'une deuxième box est configurée, le nom en haut de l\'écran permet de passer de l\'une à l\'autre. + Coil pilote cette box. + Passer à cette box + Le lecteur, la bibliothèque et les favoris affichent alors cette box. + Connexion La box et ce téléphone doivent être sur le même réseau. Coil parle directement à la box ; rien ne passe par internet. Trouvé sur ce réseau @@ -116,8 +125,10 @@ Langue Ouvre les réglages de langue du système pour Coil. - Cette box + Gérer les box Adresse + Bibliothèque + S\'applique à %1$s, la box que Coil pilote actuellement. Réanalyser la bibliothèque sur la box Demande à la box de chercher de nouveaux fichiers. Cela peut prendre du temps sur une grande bibliothèque. La box réanalyse sa bibliothèque. @@ -126,6 +137,8 @@ Commandes sur l\'écran de verrouillage Afficher les commandes + Jamais + Aucune notification et aucune commande sur l\'écran de verrouillage. Vous pilotez la box depuis Coil. Seulement quand Coil est ouvert Aucune connexion en arrière-plan, aucune consommation de batterie. Dès que la box joue @@ -162,4 +175,74 @@ Plus d\'options + + + + + Tout répéter + Options de lecture + Minuterie d\'arrêt + La minuterie est active + Annuler la minuterie + Minuterie d\'arrêt + Arrête la lecture après le délai choisi. La box reste allumée — Coil ne l\'éteint jamais. + Arrêt dans %1$s + + %1$s min + %1$s min + %1$s min + + + + Enregistrer le dossier dans les favoris + Retirer le dossier des favoris + Enregistrer le titre dans les favoris + Retirer le titre des favoris + Enregistrer l\'album dans les favoris + Retirer l\'album des favoris + Options du favori + + + Rechercher dans la bibliothèque + Effacer la recherche + Titres + Aucun résultat + Coil cherche dans ce qu\'il a chargé depuis la box. Les albums y sont tous dès que l\'onglet Albums a été ouvert ; les dossiers et les titres arrivent à mesure que vous les ouvrez. Les réglages permettent de parcourir toute la bibliothèque une fois pour tout rendre trouvable. + + + Détails + Chemin + Artiste + Album + Artiste de l\'album + Numéro de piste + Durée + Fichier + + + Copier le lien + Partager le lien + Lien copié + Cette box n\'est pas configurée sur ce téléphone. + Copier le lien vers cette box + Partager le lien vers cette box + Ouvre Coil sur cette box — pour une application d\'automatisation, un tag NFC ou une note. Ne démarre pas la lecture. + + + Rendre toute la bibliothèque trouvable + Parcourt chaque dossier une fois pour que la recherche trouve tout. Cela prend du temps sur une grande bibliothèque, et les cartes posées sur la box peuvent tarder à être reconnues pendant ce temps. Laissez cet écran ouvert pendant l\'opération. + Arrêter + %1$s dossiers lus. Touchez pour arrêter ; ce qui a été lu reste trouvable. + Bibliothèque trouvable : %1$s dossiers lus. + Arrêt après %1$s dossiers — cette bibliothèque est plus grande que ce que Coil parcourt en une fois, la recherche peut donc encore en oublier une partie. + La box a cessé de répondre après %1$s dossiers. Ce qui a été lu reste trouvable. + La box est en train de jouer. Réessayez quand elle est au repos, pour que les cartes continuent d\'être reconnues sans délai. + diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 1dcf8d7..b2d1dd4 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -15,6 +15,7 @@ Bibliotheek Favorieten Instellingen + Terug Er speelt niets Onbekende titel @@ -75,6 +76,11 @@ Andere box kiezen Box toevoegen Actief + Coil bedient één box tegelijk. Zodra er een tweede box is ingesteld, schakelt de naam boven in het scherm tussen de boxen. + Coil bedient deze box. + Naar deze box wisselen + De speler, bibliotheek en favorieten laten dan deze box zien. + Verbinding De box en deze telefoon moeten in hetzelfde netwerk zitten. Coil praat direct met de box; niets gaat via internet. Gevonden in dit netwerk @@ -115,8 +121,10 @@ Taal Opent de taalinstellingen van het systeem voor Coil. - Deze box + Boxen beheren Adres + Bibliotheek + Geldt voor %1$s, de box die Coil nu bedient. Bibliotheek op de box opnieuw inlezen Laat de box naar nieuwe bestanden zoeken. Bij een grote bibliotheek kan dat even duren. De box leest haar bibliotheek opnieuw in. @@ -125,6 +133,8 @@ Bediening op het vergrendelscherm Bediening tonen + Nooit + Geen melding en geen bediening op het vergrendelscherm. Je bedient de box in Coil zelf. Alleen zolang Coil open is Geen verbinding op de achtergrond, geen batterijverbruik. Zodra de box speelt @@ -161,4 +171,73 @@ Meer opties + + + + + Alles herhalen + Weergaveopties + Slaaptimer + Slaaptimer staat aan + Timer annuleren + Slaaptimer + Stopt de weergave na de tijd die je kiest. De box blijft aan — Coil zet hem nooit uit. + Stopt over %1$s + + %1$s min + %1$s min + + + + Map als favoriet opslaan + Map uit favorieten verwijderen + Nummer als favoriet opslaan + Nummer uit favorieten verwijderen + Album als favoriet opslaan + Album uit favorieten verwijderen + Favorietopties + + + Bibliotheek doorzoeken + Zoekopdracht wissen + Nummers + Niets gevonden + Coil zoekt in wat het van de box heeft geladen. Albums staan er allemaal in zodra het tabblad Albums is geopend; mappen en nummers komen erbij zodra je ze opent. Bij de instellingen kan Coil de hele bibliotheek één keer doorlopen en alles doorzoekbaar maken. + + + Details + Pad + Artiest + Album + Albumartiest + Tracknummer + Lengte + Bestand + + + Link kopiëren + Link delen + Link gekopieerd + Die box is niet ingesteld op deze telefoon. + Link naar deze box kopiëren + Link naar deze box delen + Opent Coil met deze box — voor een automatiseringsapp, een NFC-tag of een notitie. Start de weergave niet. + + + Hele bibliotheek doorzoekbaar maken + Loopt elke map één keer door, zodat zoeken alles vindt. Bij een grote bibliotheek duurt dat even, en kaartjes worden op de box ondertussen langzamer herkend. Houd dit scherm open zolang het loopt. + Stoppen + %1$s mappen gelezen. Tik om te stoppen; wat gelezen is blijft doorzoekbaar. + Bibliotheek doorzoekbaar: %1$s mappen gelezen. + Gestopt na %1$s mappen — deze bibliotheek is groter dan Coil in één keer indexeert, dus zoeken kan nog iets missen. + De box antwoordde niet meer na %1$s mappen. Wat gelezen is blijft doorzoekbaar. + De box speelt. Probeer het als hij niets doet, zodat kaartjes snel herkend blijven worden. + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d92ab45..e2dc01c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,6 +17,8 @@ Library Favourites Settings + + Back Nothing playing @@ -135,11 +137,18 @@ Move down This launcher does not support home screen shortcuts. - + Boxes Switch box Add box Active + Coil controls one box at a time. Once a second box is set up, the name at the top of the screen switches between them. + + Coil is controlling this box. + Switch to this box + The player, library and favourites then show this box. + + Connection The box and this phone have to be on the same network. Coil talks to the box directly; nothing goes through the internet. @@ -188,13 +197,16 @@ Opens the system language settings for Coil. - This box + + Manage boxes Address + + Library + + Applies to %1$s, the box Coil is controlling now. Rescan library on the box Tells the box to look for new files. Can take a while on a large library. Rescan started on the box. - Add another box - Coil controls one box at a time. Once a second box is set up, the name at the top of the screen switches between them. Make the whole library searchable @@ -212,6 +224,8 @@ Lock screen controls Show controls + Never + No notification and no lock screen controls. You control the box from inside Coil. Only while Coil is open No background connection, no battery cost. Whenever the box plays @@ -255,6 +269,11 @@ Could not reach the box. Starting %1$s on %2$s + + That box is not set up on this phone. + Copy link to this box + Share link to this box + Opens Coil showing this box — for an automation app, an NFC tag or a note. It does not start playback. More options diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..c4e8ef0 --- /dev/null +++ b/app/src/main/res/xml/network_security_config.xml @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/app/src/testDebug/kotlin/app/coilforphoniebox/screenshot/AppScreenshotTest.kt b/app/src/testDebug/kotlin/app/coilforphoniebox/screenshot/AppScreenshotTest.kt index 296883b..cf2e1b4 100644 --- a/app/src/testDebug/kotlin/app/coilforphoniebox/screenshot/AppScreenshotTest.kt +++ b/app/src/testDebug/kotlin/app/coilforphoniebox/screenshot/AppScreenshotTest.kt @@ -2,6 +2,7 @@ package app.coilforphoniebox.screenshot import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.performClick +import androidx.compose.ui.test.performScrollTo import androidx.hilt.navigation.compose.hiltViewModel import app.coilforphoniebox.R import app.coilforphoniebox.domain.model.ConnectionState @@ -93,6 +94,57 @@ abstract class AppScreenshotTest : ScreenshotTest() { captureRoot("app/settings_$device") } + /** + * The settings rows that start below the fold on a phone — the row into box management, and + * the library actions that run against whichever box is active. + * + * Scrolled to by name rather than by gesture, so the golden lands on the same rows every + * time. Without this the settings golden would only ever show the appearance section, and a + * change further down would pass unseen. + */ + @Test + fun settings_lower_section() { + showApp() + navigateTo(R.string.nav_settings) + compose.onNodeWithText(string(R.string.settings_index)).performScrollTo() + compose.waitForIdle() + captureRoot("app/settings_lower_$device") + } + + /** + * Box management, reached the way a user reaches it: settings, then the row that leads out + * of settings. Two boxes, because one box is the case where this screen has least to say. + */ + @Test + fun boxes() { + boxes.boxes.value = listOf(Fixtures.livingRoom, Fixtures.bedroom) + showApp() + navigateTo(R.string.nav_settings) + openBoxManagement() + captureRoot("app/boxes_$device") + } + + /** + * One box's own page — the fields that used to sit in the settings list, on the box that is + * *not* active, which is the case the settings screen could not offer at all. + */ + @Test + fun box_detail() { + boxes.boxes.value = listOf(Fixtures.livingRoom, Fixtures.bedroom) + showApp() + navigateTo(R.string.nav_settings) + openBoxManagement() + compose.onNodeWithText(Fixtures.bedroom.displayName).performClick() + compose.waitForIdle() + captureRoot("app/box_detail_$device") + } + + private fun openBoxManagement() { + compose.onNodeWithText(string(R.string.settings_manage_boxes)).performScrollTo() + compose.onNodeWithText(string(R.string.settings_manage_boxes)).performClick() + compose.waitForIdle() + } + /** * Box configured, box not answering: the offline banner under the top bar, and the * indicator's dot gone grey. Both live in the scaffold and appear in no screen golden. diff --git a/app/src/testDebug/kotlin/app/coilforphoniebox/shortcuts/OpenDeepLinkTest.kt b/app/src/testDebug/kotlin/app/coilforphoniebox/shortcuts/OpenDeepLinkTest.kt new file mode 100644 index 0000000..b7328e8 --- /dev/null +++ b/app/src/testDebug/kotlin/app/coilforphoniebox/shortcuts/OpenDeepLinkTest.kt @@ -0,0 +1,86 @@ +package app.coilforphoniebox.shortcuts + +import android.net.Uri +import androidx.test.ext.junit.runners.AndroidJUnit4 +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test +import org.junit.runner.RunWith + +/** + * `coil://open` parsing and building. + * + * Lives in `:app`'s `testDebug` source set rather than in `:feature-shortcuts` because + * `android.net.Uri` needs Robolectric, and this is the module where Robolectric is already + * configured — down to the SDK level it runs on. Moving it would mean a second copy of that + * setup for one test class. + */ +@RunWith(AndroidJUnit4::class) +class OpenDeepLinkTest { + + @Test + fun `parses a link with no box as a request to leave the active box alone`() { + val request = OpenDeepLink.parse(Uri.parse("coil://open")) + + assertEquals(OpenDeepLink.Request(boxId = null), request) + } + + @Test + fun `parses the box id`() { + val request = OpenDeepLink.parse(Uri.parse("coil://open?box=box-living-room")) + + assertEquals("box-living-room", request?.boxId) + } + + /** A hand-written link with an empty parameter still means "just open the app". */ + @Test + fun `treats a blank box as absent`() { + val request = OpenDeepLink.parse(Uri.parse("coil://open?box=")) + + assertEquals(OpenDeepLink.Request(boxId = null), request) + } + + @Test + fun `ignores the play host, which is a different link`() { + assertNull(OpenDeepLink.parse(Uri.parse("coil://play?box=box-1&type=folder&path=Stories"))) + } + + @Test + fun `ignores another scheme on the same host`() { + assertNull(OpenDeepLink.parse(Uri.parse("https://open?box=box-1"))) + } + + @Test + fun `ignores a null uri, so every incoming intent can be handed to it`() { + assertNull(OpenDeepLink.parse(null)) + } + + @Test + fun `builds a link without a box`() { + assertEquals("coil://open", OpenDeepLink.uriFor().toString()) + } + + @Test + fun `builds and parses a box link round trip`() { + val uri = OpenDeepLink.uriFor("box-bedroom") + + assertEquals("coil://open?box=box-bedroom", uri.toString()) + assertEquals("box-bedroom", OpenDeepLink.parse(uri)?.boxId) + } + + /** Ids are generated UUIDs today, but the format must not depend on that. */ + @Test + fun `escapes a box id that needs it`() { + val uri = OpenDeepLink.uriFor("box one&two") + + assertEquals("box one&two", OpenDeepLink.parse(uri)?.boxId) + } + + @Test + fun `restricts the intent to the app's own package`() { + val intent = OpenDeepLink.intentFor(packageName = "app.coilforphoniebox", boxId = "box-1") + + assertEquals("app.coilforphoniebox", intent.`package`) + assertEquals("coil://open?box=box-1", intent.data.toString()) + } +} diff --git a/app/src/testDebug/screenshots/app/box_detail_phone.png b/app/src/testDebug/screenshots/app/box_detail_phone.png new file mode 100644 index 0000000..06141f6 Binary files /dev/null and b/app/src/testDebug/screenshots/app/box_detail_phone.png differ diff --git a/app/src/testDebug/screenshots/app/box_detail_small.png b/app/src/testDebug/screenshots/app/box_detail_small.png new file mode 100644 index 0000000..d93e253 Binary files /dev/null and b/app/src/testDebug/screenshots/app/box_detail_small.png differ diff --git a/app/src/testDebug/screenshots/app/box_detail_tablet.png b/app/src/testDebug/screenshots/app/box_detail_tablet.png new file mode 100644 index 0000000..497cbd0 Binary files /dev/null and b/app/src/testDebug/screenshots/app/box_detail_tablet.png differ diff --git a/app/src/testDebug/screenshots/app/boxes_phone.png b/app/src/testDebug/screenshots/app/boxes_phone.png new file mode 100644 index 0000000..aeea0ee Binary files /dev/null and b/app/src/testDebug/screenshots/app/boxes_phone.png differ diff --git a/app/src/testDebug/screenshots/app/boxes_small.png b/app/src/testDebug/screenshots/app/boxes_small.png new file mode 100644 index 0000000..87b2acd Binary files /dev/null and b/app/src/testDebug/screenshots/app/boxes_small.png differ diff --git a/app/src/testDebug/screenshots/app/boxes_tablet.png b/app/src/testDebug/screenshots/app/boxes_tablet.png new file mode 100644 index 0000000..dace543 Binary files /dev/null and b/app/src/testDebug/screenshots/app/boxes_tablet.png differ diff --git a/app/src/testDebug/screenshots/app/settings_lower_phone.png b/app/src/testDebug/screenshots/app/settings_lower_phone.png new file mode 100644 index 0000000..c44dea8 Binary files /dev/null and b/app/src/testDebug/screenshots/app/settings_lower_phone.png differ diff --git a/app/src/testDebug/screenshots/app/settings_lower_small.png b/app/src/testDebug/screenshots/app/settings_lower_small.png new file mode 100644 index 0000000..ece1690 Binary files /dev/null and b/app/src/testDebug/screenshots/app/settings_lower_small.png differ diff --git a/app/src/testDebug/screenshots/app/settings_lower_tablet.png b/app/src/testDebug/screenshots/app/settings_lower_tablet.png new file mode 100644 index 0000000..c24e500 Binary files /dev/null and b/app/src/testDebug/screenshots/app/settings_lower_tablet.png differ diff --git a/app/src/testDebug/screenshots/app/settings_phone.png b/app/src/testDebug/screenshots/app/settings_phone.png index dfda367..e242ef9 100644 Binary files a/app/src/testDebug/screenshots/app/settings_phone.png and b/app/src/testDebug/screenshots/app/settings_phone.png differ diff --git a/app/src/testDebug/screenshots/app/settings_tablet.png b/app/src/testDebug/screenshots/app/settings_tablet.png index 6e5c254..c4b62dc 100644 Binary files a/app/src/testDebug/screenshots/app/settings_tablet.png and b/app/src/testDebug/screenshots/app/settings_tablet.png differ diff --git a/app/src/testDebug/screenshots/library/folders_de.png b/app/src/testDebug/screenshots/library/folders_de.png index dacbad2..9b4c0da 100644 Binary files a/app/src/testDebug/screenshots/library/folders_de.png and b/app/src/testDebug/screenshots/library/folders_de.png differ diff --git a/core-domain/src/main/kotlin/app/coilforphoniebox/domain/model/AppSettings.kt b/core-domain/src/main/kotlin/app/coilforphoniebox/domain/model/AppSettings.kt index 0b392b1..827c2ff 100644 --- a/core-domain/src/main/kotlin/app/coilforphoniebox/domain/model/AppSettings.kt +++ b/core-domain/src/main/kotlin/app/coilforphoniebox/domain/model/AppSettings.kt @@ -5,11 +5,13 @@ enum class ThemeMode { SYSTEM, LIGHT, DARK } /** * How far the media session is allowed to reach beyond the app (§8.3). * - * [APP_ONLY] is the default: no persistent service, no battery cost, controls only - * while Coil is open. [AUTOMATIC] keeps a foreground service alive so controls - * appear on their own when the box starts playing. + * Listed by increasing reach. [OFF] means no media session at all: no notification, no + * lock screen controls, and nothing that could put either up — Coil then controls the box + * only from its own screens. [APP_ONLY] is the default: no persistent service, no battery + * cost, controls only while Coil is open. [AUTOMATIC] keeps a foreground service alive so + * controls appear on their own when the box starts playing. */ -enum class SessionMode { APP_ONLY, AUTOMATIC } +enum class SessionMode { OFF, APP_ONLY, AUTOMATIC } /** Global settings. Everything box-specific lives on [Box] instead (§7.2). */ data class AppSettings( diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index 4fce4cc..c76298b 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -249,6 +249,9 @@ Per box there is an `autoSessionEnabled` flag, so a box in a guest room can be e - A box switcher in the top app bar: name plus connection dot, tapping opens a bottom sheet with all boxes and their reachability - With exactly one box configured, the switcher collapses to a plain connection indicator — no one should pay UI complexity for a feature they do not use - Adding a box: mDNS scan results plus manual entry, connection test, name it +- **Configuring boxes is its own screen**, reached from one row in settings ("Manage boxes"), with a page per box underneath it: name, address, ports, that box's `coil://open` link, removing it. Everything there addresses a box by id, so a box that is not active can still be edited +- The split is deliberate: *switching* is a frequent, one-tap act and belongs in the top bar; *configuring* is rare and belongs behind a row. Interleaving the two in the settings list — pick a box, add a box, edit the current box, all as neighbouring rows of the same shape — was the part users read twice +- Settings keeps what is global plus the actions that run against the active box (rescan, the search crawl), because those cannot be offered from a box page that is not the active box's ### 7.6 Migration safety @@ -296,6 +299,12 @@ For the app to notice that the box has started playing, **something** has to hol - No persistent service; the session exists only while the app is in the foreground - No battery drain, no permanent notification +**"Never" mode:** +- No media session at all: nothing binds or starts the service, so there is no notification and no lock screen controls, not even while the box plays +- Coil still controls the box from its own screens — the UI holds the connection itself while it is open, independently of the service +- Switching to this mode takes effect immediately, mid-playback included: the service stops itself *and* the UI drops its binding, because a bound service outlives its own `stopSelf` and media3 would otherwise still post a notification on the next `state == play` +- The hardware volume buttons stop reaching the box in this mode, since that comes from the session being active (§8.1) + **Realistic expectation:** in automatic mode delivery is not completely reliable. Aggressive Doze and vendor-specific app killing (Samsung, Xiaomi, OnePlus) can drop the connection. The watchdog catches this, but it can take seconds to minutes. This belongs in a note in settings, along with a link to the battery optimisation exemption (`ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS`). Idle consumption itself is low: one open TCP connection with no traffic. The cost driver is the process being kept alive, not the network. @@ -428,7 +437,8 @@ Material You would replace the brand colour with the user's wallpaper palette. * 1. **Player** (start screen) — large cover, title and album, progress with seek, transport controls, volume slider, shuffle/repeat, favourite star, box switcher with connection state 2. **Library** — tabs for "Folders" (drill-down) and "Albums" (grid with covers); tap to play, long press to favourite 3. **Favourites** — grid, drag to reorder, context menu for "Add to home screen" -4. **Settings** — split into global (theme, dynamic colour, language) and per box (host, ports, connection test, automatic session, network, rescan library) +4. **Settings** — global (theme, dynamic colour, language, lock screen controls, data), the actions that run against the active box (rescan, search crawl), and one row into box management +5. **Boxes** — every configured box, and a page per box for host, ports, name, its link and removing it (§7.5). Reached from settings, not from the navigation bar: it is set-up, not a place to be A persistent mini player sits at the bottom across all screens. diff --git a/docs/pages/_THEME-LICENSE.txt b/docs/pages/_THEME-LICENSE.txt new file mode 100644 index 0000000..a779bad --- /dev/null +++ b/docs/pages/_THEME-LICENSE.txt @@ -0,0 +1,34 @@ +The layouts, includes, stylesheets and the Google Play badge in this folder are derived from +the "Automatic App Landing Page" Jekyll theme: + + https://github.com/emilbaehr/automatic-app-landing-page + +The theme is vendored rather than referenced as a remote_theme, so its MIT licence notice is +reproduced here in full, as that licence requires. Coil itself is GPL-3.0 (see /LICENSE at the +repo root) — the two do not conflict; MIT is compatible with the GPL. + +The filename starts with an underscore so Jekyll treats it as a special entry and keeps it out +of the built site. It is a notice for people reading the repo, not a page. + +---------------------------------------------------------------------------------------------- + +The MIT License (MIT) + +Copyright (c) 2019 Emil Baehr + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/pages/_config.yml b/docs/pages/_config.yml index 1954c36..0599f2a 100644 --- a/docs/pages/_config.yml +++ b/docs/pages/_config.yml @@ -1,3 +1,273 @@ -title: Coil -description: A native Android remote for Phoniebox. -url: "https://coilforphoniebox.app" +# Coil's landing page. +# +# Adapted from the "Automatic App Landing Page" Jekyll theme by Emil Baehr +# (https://github.com/emilbaehr/automatic-app-landing-page), vendored rather than +# used via remote_theme because the theme puts index.html and main.scss at its repo +# root, and remote_theme only pulls _layouts, _includes, _sass and assets. +# +# Three parts of the upstream theme were iOS-only and have been replaced: +# - the iPhone body PNGs and notched clip-path -> a CSS-drawn Android frame +# - the itunes.apple.com lookup that filled in icon/name/price at runtime +# -> the plain values below +# - the unconditional App Store badge -> Play Store + GitHub buttons +# The jQuery and itunes.apple.com round trips the theme did on every page load are gone. +# Font Awesome is still pulled from use.fontawesome.com for the feature and social icons — +# the one remaining third-party request. Swapping those 14 icons for inline SVG would make +# the site fully self-contained; worth doing if the CDN hop ever bothers us. + +# Page title +page_title : Coil — a native Android remote for Phoniebox + +# App info +app_name : Coil +app_icon : assets/coil-mark.svg +# Used by the header on the green cover only, where the standard mark's deep green card has +# almost no contrast. The privacy page's header sits on white and uses app_icon instead. +header_icon_inverse : assets/coil-mark-header.svg +app_description : A native Android remote for Phoniebox. +app_description_secondary : Open it, see what is playing, pick something else, hand the phone back. When the box starts playing, playback controls appear on your lock screen — no app launch needed. + +playstore_link : https://play.google.com/store/apps/details?id=app.coilforphoniebox +github_link : https://github.com/EarMaster/coil +releases_link : https://github.com/EarMaster/coil/releases + +# Shown in small print under the download buttons. Leave blank to hide. +download_note : Pick one and stay with it. Play Store builds and GitHub APKs carry different signatures, which Android treats as different apps. + +# Information about yourself +your_name : Nico Wiedemann +your_link : https://github.com/EarMaster +email_address : coil@wiedemann.rocks +github_username : EarMaster + +# Feature list Edit, add or remove features to be presented. +# Icon names are Font Awesome 5 free solid icons. +features : + + - title : Player + description : Cover art, scrubbing, transport controls and volume, all on one screen. + fontawesome_icon_name : play-circle + + - title : Library browsing + description : Browse by folder or album and play anything you find. + fontawesome_icon_name : folder-open + + - title : Search + description : Find a folder, album or track. Ignores case and accents. + fontawesome_icon_name : search + + - title : Sleep timer + description : Stops playback after a set time and leaves the box switched on. + fontawesome_icon_name : moon + + - title : Lock screen controls + description : Appear on their own when the box starts playing, and can be switched off entirely. + fontawesome_icon_name : lock + + - title : Favourites + description : Save a folder, an album or a single track, then reach it from a home screen shortcut — or a link, for an automation app or an NFC tag. + fontawesome_icon_name : star + + - title : Multiple boxes + description : One per room, switched from the top bar, each with its own favourites. + fontawesome_icon_name : boxes + + - title : Hardware volume buttons + description : Control the box while the media session is active. + fontawesome_icon_name : volume-up + + - title : Dark mode + description : Built for bedtime rather than bolted on. + fontawesome_icon_name : adjust + + - title : Five languages + description : English, German, French, Spanish and Dutch. + fontawesome_icon_name : language + + - title : Nothing leaves your network + description : No account, no telemetry, no cloud. Coil talks only to the boxes you configure. + fontawesome_icon_name : shield-alt + + - title : Open source + description : GPL-3.0, on GitHub. Issues, pull requests and translations are welcome. + fontawesome_icon_name : code-branch + +# Screenshot gallery The same images as the Play listing's phone set. They are +# generated from the app itself — +# `./gradlew :app:recordRoborazziDebug --tests '*StoreAssetTest'` +# renders them and copies them here — so they cannot drift +# away from what the app actually looks like. +# +# The first entry is also the one shown in the hero device frame. +# +# width/height are the file's real pixel dimensions and are required, +# not decoration: the images are lazy-loaded, and the tablet strip +# sizes cards by height, so without an intrinsic ratio to lay out +# from the browser collapses each one to 1px wide until it loads. +gallery_heading : Screenshots +screenshots : + + - image : assets/screenshots/01_player.png + width : 1233 + height : 2460 + title : Player + description : Cover art, the track title, scrubbing and transport controls. + alt : The player screen, showing cover art, the track title, a scrubbing bar and transport controls + + - image : assets/screenshots/02_library.png + width : 1233 + height : 2460 + title : Library + description : Browse by folder or album, with the mini player docked at the bottom. + alt : Browsing the library by folder, with a mini player at the bottom + + - image : assets/screenshots/03_favourites.png + width : 1233 + height : 2460 + title : Favourites + description : Saved folders, albums and tracks as a grid of covers. + alt : Saved favourites shown as a grid of covers + + - image : assets/screenshots/04_search.png + width : 1233 + height : 2460 + title : Search + description : Folder, album and track results, grouped and ready to play. + alt : Searching the library, with folder, album and track results grouped under headings + + - image : assets/screenshots/05_sleep_timer.png + width : 1233 + height : 2460 + title : Sleep timer + description : Counting down to when playback stops. The box stays switched on. + alt : The player with a sleep timer running, counting down to when playback stops + +# Tablet gallery A curated subset, not the whole set. `flattenStoreAssets` copies all +# ten tablet images to assets/screenshots/tablet7 (1200×1920) and +# tablet10 (2560×1600), so anything below can be swapped in by editing +# this list alone. +# +# Left out on purpose: the 10-inch library, favourites and search. +# Those screens still stretch the phone layout across 1280 dp, which +# leaves folder names on the far left and their action icons about +# 1500 px away, and over half the favourites grid empty. Accurate, but +# it advertises the weakest thing about the tablet build. Add them +# once that layout is addressed. +# +# Cards in this strip are sized by height, so portrait and landscape +# shots can sit side by side. +tablet_gallery_heading : On a tablet +tablet_screenshots : + + - image : assets/screenshots/tablet10/01_player.png + width : 2560 + height : 1600 + title : Player + description : On a wide screen the cover moves beside the controls instead of above them. + alt : The player on a landscape tablet, with cover art filling the left half and the title, scrubbing bar and transport controls on the right + + - image : assets/screenshots/tablet7/02_library.png + width : 1200 + height : 1920 + title : Library + description : The same folder and album browsing, with room for more of it at once. + alt : Browsing the library by folder on a portrait tablet, with the mini player docked at the bottom + + - image : assets/screenshots/tablet10/05_sleep_timer.png + width : 2560 + height : 1600 + title : Sleep timer + description : The countdown sits under the transport controls, where it does on a phone. + alt : The player on a landscape tablet with a sleep timer running, showing Stops in 25:00 beneath the transport controls + +# Side links Fills the column beside the prose section, which is capped at a +# 780px measure for readability and would otherwise leave a wide +# band of empty page next to it. +# +# A url containing "://" is treated as external: it opens in a new +# tab and gets the outward arrow. Icons are Font Awesome 5 free; +# set style to "fab" for a brand icon, otherwise it defaults to fas. +side_links_heading : Elsewhere +side_links : + + - title : Phoniebox + description : phoniebox.de — the RFID jukebox Coil is a remote for + url : https://phoniebox.de + fontawesome_icon_name : compact-disc + + - title : Phoniebox on GitHub + description : Install guide and issues for the box itself + url : https://github.com/MiczFlor/RPi-Jukebox-RFID + fontawesome_icon_name : microchip + + - title : Coil on GitHub + description : Source, issues and pull requests + url : https://github.com/EarMaster/coil + fontawesome_icon_name : github + fontawesome_icon_style : fab + + - title : Releases + description : Signed APKs, and the changelog for each version + url : https://github.com/EarMaster/coil/releases + fontawesome_icon_name : download + + - title : Privacy policy + description : What Coil stores, and what it never sends anywhere + url : /privacy/ + fontawesome_icon_name : lock + +# Theme settings +# +# The upstream theme darkens the top bar over the cover image to separate the two. Coil's +# cover is a flat gradient rather than a photo, so that overlay just read as a second, +# mismatched green stripe — transparency 0 lets the header sit on one continuous gradient. +# Raise it again if the cover ever becomes a photograph. +topbar_color : "#000000" +topbar_transparency : 0 +topbar_title_color : "#ffffff" + +cover_gradient_start : "#137a66" +cover_gradient_end : "#093f36" + +device_bezel_color : "#14201d" +device_screen_color : "#f1f8f5" + +body_background_color : "#ffffff" + +link_color : "#0f6b5c" + +app_title_color : "#ffffff" +app_description_color : "#ffffff" + +feature_title_color : "#10201c" +feature_text_color : "#5a6b66" + +feature_icons_foreground_color : "#0f6b5c" +feature_icons_background_color : "#e2f0ea" + +social_icons_foreground_color : "#5a6b66" +social_icons_background_color : "#e6edea" + +footer_text_color : "#5a6b66" + +#################################################### +### Jekyll Configuration. No need to touch this. ### +#################################################### + +title : Coil +description : A native Android remote for Phoniebox. +url : "https://coilforphoniebox.app" + +sass: + style: compressed + +# No `exclude` key on purpose, and note what that means for CNAME: `github-pages build` adds +# `exclude: [CNAME]` of its own accord whenever the site's `exclude` is Jekyll's default, so +# docs/pages/CNAME never reaches _site. That is GitHub's intended behaviour — for an Actions +# deployment the custom domain comes from the repository's Pages settings, not from a file in +# the artifact. Setting any non-default `exclude` here would suppress that and copy CNAME +# through; there is no reason to want that. +# +# A local `jekyll build` has no such rule and does copy CNAME, so the two disagree. + +markdown: kramdown diff --git a/docs/pages/_includes/features.html b/docs/pages/_includes/features.html new file mode 100644 index 0000000..dcb3660 --- /dev/null +++ b/docs/pages/_includes/features.html @@ -0,0 +1,22 @@ +
+ + {% for feature in site.features %} + + {% if feature.title %} +
+
+ + + + +
+
+

{{ feature.title }}

+

{{ feature.description }}

+
+
+ {% endif %} + + {% endfor %} + +
diff --git a/docs/pages/_includes/footer.html b/docs/pages/_includes/footer.html new file mode 100644 index 0000000..5a4077a --- /dev/null +++ b/docs/pages/_includes/footer.html @@ -0,0 +1,39 @@ +
diff --git a/docs/pages/_includes/gallery.html b/docs/pages/_includes/gallery.html new file mode 100644 index 0000000..cf18b9b --- /dev/null +++ b/docs/pages/_includes/gallery.html @@ -0,0 +1,38 @@ +{% comment %} + Parameters, all set by the layout. Jekyll exposes them as include.*, not as bare names. + include.items — a list of {image, title, description, alt} + include.heading — section heading, optional + include.area — grid area to occupy ("g" for the phone strip, "t" for the tablet one) + include.variant — "phone" fixes card width; "tablet" fixes card height instead, so + portrait and landscape shots can share a strip without one dwarfing + the other + + A plain overflow-x strip with scroll snapping. No carousel script: images a reader can + flick through beat images behind a JS state machine, and it keeps working with + JavaScript switched off. +{% endcomment %} + +{% if include.items and include.items.size > 0 %} + +{% endif %} diff --git a/docs/pages/_includes/head.html b/docs/pages/_includes/head.html new file mode 100644 index 0000000..baa4096 --- /dev/null +++ b/docs/pages/_includes/head.html @@ -0,0 +1,23 @@ + + + + + + {% if page.url == '/' %}{{ site.page_title }}{% else %}{{ page.title }} — {{ site.app_name }}{% endif %} + + + + + + + + + + {% if site.screenshots %} + + {% endif %} + + + + + diff --git a/docs/pages/_includes/header.html b/docs/pages/_includes/header.html new file mode 100644 index 0000000..257a4fa --- /dev/null +++ b/docs/pages/_includes/header.html @@ -0,0 +1,34 @@ +{% comment %} + include.inverse — set by the layout, not the page. The landing page's header sits on the + green cover and needs the white-card mark; the privacy page's header sits on white and + needs the standard deep green one. +{% endcomment %} +{% if include.inverse %} + {% assign header_icon = site.header_icon_inverse | default: site.app_icon %} +{% else %} + {% assign header_icon = site.app_icon %} +{% endif %} + +
+ + +
diff --git a/docs/pages/_includes/hero.html b/docs/pages/_includes/hero.html new file mode 100644 index 0000000..d397275 --- /dev/null +++ b/docs/pages/_includes/hero.html @@ -0,0 +1,38 @@ +{% assign hero = site.screenshots.first %} + +
+
+ + {{ hero.alt }} + +
+
+ +
+ +
+

{{ site.app_name }}

+
+
+

{{ site.app_description }}

+ {% if site.app_description_secondary %} +

{{ site.app_description_secondary }}

+ {% endif %} +
+
+ {% if site.playstore_link %} + + Get it on Google Play + + {% endif %} + {% if site.releases_link %} + + + APK on GitHub + + {% endif %} +
+ {% if site.download_note %} +

{{ site.download_note }}

+ {% endif %} +
diff --git a/docs/pages/_includes/lightbox.html b/docs/pages/_includes/lightbox.html new file mode 100644 index 0000000..ae4f714 --- /dev/null +++ b/docs/pages/_includes/lightbox.html @@ -0,0 +1,84 @@ + + + + +
+ +
+
+
+ + diff --git a/docs/pages/_includes/sidelinks.html b/docs/pages/_includes/sidelinks.html new file mode 100644 index 0000000..55489f5 --- /dev/null +++ b/docs/pages/_includes/sidelinks.html @@ -0,0 +1,23 @@ +{% if site.side_links and site.side_links.size > 0 %} + +{% endif %} diff --git a/docs/pages/_layouts/default.html b/docs/pages/_layouts/default.html new file mode 100644 index 0000000..317045a --- /dev/null +++ b/docs/pages/_layouts/default.html @@ -0,0 +1,28 @@ + + + +{% include head.html %} + + +
+
+
+ {% include header.html inverse=true %} + {% include hero.html %} + {% include features.html %} + {% include gallery.html items=site.screenshots heading=site.gallery_heading area="g" variant="phone" %} + {% include gallery.html items=site.tablet_screenshots heading=site.tablet_gallery_heading area="t" variant="tablet" %} + {% if content != '' %} +
+ {{ content }} +
+ {% endif %} + {% include sidelinks.html %} + {% include footer.html %} +
+
+
+ {% include lightbox.html %} + + + diff --git a/docs/pages/_layouts/page.html b/docs/pages/_layouts/page.html new file mode 100644 index 0000000..cdb021e --- /dev/null +++ b/docs/pages/_layouts/page.html @@ -0,0 +1,21 @@ +--- +# Front matter comment to ensure Jekyll properly reads file. +--- + + + + +{% include head.html %} + + +
+
+ {% include header.html %} +
+ {{ content }} +
+
+
+ + + diff --git a/docs/pages/_sass/base.scss b/docs/pages/_sass/base.scss new file mode 100644 index 0000000..21d7a46 --- /dev/null +++ b/docs/pages/_sass/base.scss @@ -0,0 +1,62 @@ +// Layout and grids +$content-width: 1170px; + +// Fonts and sizes +$font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +$primary-text-color: #000000; + +html { + font-size: 62.5%; + font-family: $font; + line-height: 1; +} + +body { + font-size: 2rem; + background-color: $body-color; + + // Better font rendering + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.subPageBody { + background-color: #fff; +} + +h1 { + font-size: 3rem; +} + +h2 { + font-size: 2rem; +} + +h3 { + font-size: 2rem; +} + +a:link, +a:hover, +a:visited, +a:active { + color: $accent-color; + text-decoration: none; +} + +// Shadows +$drop-shadow: drop-shadow(0px 5px 10px rgba(#000, 0.1)) + drop-shadow(0px 1px 1px rgba(#000, 0.2) + ); + +// Various resets +*, +*::before, +*::after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + + margin: 0; + padding: 0; +} diff --git a/docs/pages/_sass/github-markdown.scss b/docs/pages/_sass/github-markdown.scss new file mode 100644 index 0000000..348b158 --- /dev/null +++ b/docs/pages/_sass/github-markdown.scss @@ -0,0 +1,981 @@ +/* +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Markdown CSS adopted from https://github.com/sindresorhus/github-markdown-css +*/ + +@font-face { + font-family: octicons-link; + src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff'); +} + +.markdown-body .octicon { + display: inline-block; + fill: currentColor; + vertical-align: text-bottom; +} + +.markdown-body .anchor { + float: left; + line-height: 1; + margin-left: -20px; + padding-right: 4px; +} + +.markdown-body .anchor:focus { + outline: none; +} + +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { + color: rgba(#000000, 1); // Differs from default GitHub markdown styling + vertical-align: middle; + visibility: hidden; +} + +// Differs from default GitHub markdown styling +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + color: rgba(#000000, 1); +} + +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + text-decoration: none; +} + +.markdown-body h1:hover .anchor .octicon-link, +.markdown-body h2:hover .anchor .octicon-link, +.markdown-body h3:hover .anchor .octicon-link, +.markdown-body h4:hover .anchor .octicon-link, +.markdown-body h5:hover .anchor .octicon-link, +.markdown-body h6:hover .anchor .octicon-link { + visibility: visible; +} + +.markdown-body { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + color: rgba(#000000, 0.8); // Differs from default GitHub markdown styling + line-height: 1.5; + font-family: $font; // Use sitewide font stack instead of hardcoded font-stack + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; +} + +.markdown-body .pl-c { + color: #6a737d; +} + +.markdown-body .pl-c1, +.markdown-body .pl-s .pl-v { + color: #005cc5; +} + +.markdown-body .pl-e, +.markdown-body .pl-en { + color: #6f42c1; +} + +.markdown-body .pl-s .pl-s1, +.markdown-body .pl-smi { + color: #24292e; +} + +.markdown-body .pl-ent { + color: #22863a; +} + +.markdown-body .pl-k { + color: #d73a49; +} + +.markdown-body .pl-pds, +.markdown-body .pl-s, +.markdown-body .pl-s .pl-pse .pl-s1, +.markdown-body .pl-sr, +.markdown-body .pl-sr .pl-cce, +.markdown-body .pl-sr .pl-sra, +.markdown-body .pl-sr .pl-sre { + color: #032f62; +} + +.markdown-body .pl-smw, +.markdown-body .pl-v { + color: #e36209; +} + +.markdown-body .pl-bu { + color: #b31d28; +} + +.markdown-body .pl-ii { + background-color: #b31d28; + color: #fafbfc; +} + +.markdown-body .pl-c2 { + background-color: #d73a49; + color: #fafbfc; +} + +.markdown-body .pl-c2:before { + content: "^M"; +} + +.markdown-body .pl-sr .pl-cce { + color: #22863a; + font-weight: 700; +} + +.markdown-body .pl-ml { + color: #735c0f; +} + +.markdown-body .pl-mh, +.markdown-body .pl-mh .pl-en, +.markdown-body .pl-ms { + color: #005cc5; + font-weight: 700; +} + +.markdown-body .pl-mi { + color: #24292e; + font-style: italic; +} + +.markdown-body .pl-mb { + color: #24292e; + font-weight: 700; +} + +.markdown-body .pl-md { + background-color: #ffeef0; + color: #b31d28; +} + +.markdown-body .pl-mi1 { + background-color: #f0fff4; + color: #22863a; +} + +.markdown-body .pl-mc { + background-color: #ffebda; + color: #e36209; +} + +.markdown-body .pl-mi2 { + background-color: #005cc5; + color: #f6f8fa; +} + +.markdown-body .pl-mdr { + color: #6f42c1; + font-weight: 700; +} + +.markdown-body .pl-ba { + color: #586069; +} + +.markdown-body .pl-sg { + color: #959da5; +} + +.markdown-body .pl-corl { + color: #032f62; + text-decoration: underline; +} + +.markdown-body details { + display: block; +} + +.markdown-body summary { + display: list-item; +} + +.markdown-body a { + background-color: transparent; +} + +.markdown-body a:active, +.markdown-body a:hover { + outline-width: 0; +} + +.markdown-body strong { + font-weight: inherit; + font-weight: bolder; +} + +.markdown-body h1 { + font-size: 2em; + margin: .67em 0; +} + +.markdown-body img { + border-style: none; +} + +.markdown-body code, +.markdown-body kbd, +.markdown-body pre { + font-family: monospace,monospace; + font-size: 1em; +} + +.markdown-body hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} + +.markdown-body input { + font: inherit; + margin: 0; +} + +.markdown-body input { + overflow: visible; +} + +.markdown-body [type=checkbox] { + box-sizing: border-box; + padding: 0; +} + +.markdown-body * { + box-sizing: border-box; +} + +.markdown-body input { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +.markdown-body a { + color: $accent-color; + text-decoration: none; +} + +.markdown-body a:hover { + text-decoration: underline; +} + +.markdown-body strong { + font-weight: 600; +} + +.markdown-body hr { + background: transparent; + border: 0; + border-bottom: 1px solid #dfe2e5; + height: 0; + margin: 15px 0; + overflow: hidden; +} + +.markdown-body hr:before { + content: ""; + display: table; +} + +.markdown-body hr:after { + clear: both; + content: ""; + display: table; +} + +.markdown-body table { + border-collapse: collapse; + border-spacing: 0; +} + +.markdown-body td, +.markdown-body th { + padding: 0; +} + +.markdown-body details summary { + cursor: pointer; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + margin-bottom: 0; + margin-top: 0; +} + +.markdown-body h1 { + font-size: 32px; +} + +.markdown-body h1, +.markdown-body h2 { + font-weight: 600; +} + +.markdown-body h2 { + font-size: 24px; +} + +.markdown-body h3 { + font-size: 20px; +} + +.markdown-body h3, +.markdown-body h4 { + font-weight: 600; +} + +.markdown-body h4 { + font-size: 16px; +} + +.markdown-body h5 { + font-size: 14px; +} + +.markdown-body h5, +.markdown-body h6 { + font-weight: 600; +} + +.markdown-body h6 { + font-size: 12px; +} + +.markdown-body p { + margin-bottom: 10px; + margin-top: 0; +} + +.markdown-body blockquote { + margin: 0; +} + +.markdown-body ol, +.markdown-body ul { + margin-bottom: 0; + margin-top: 0; + padding-left: 0; +} + +.markdown-body ol ol, +.markdown-body ul ol { + list-style-type: lower-roman; +} + +.markdown-body ol ol ol, +.markdown-body ol ul ol, +.markdown-body ul ol ol, +.markdown-body ul ul ol { + list-style-type: lower-alpha; +} + +.markdown-body dd { + margin-left: 0; +} + +.markdown-body code, +.markdown-body pre { + font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace; + font-size: 12px; +} + +.markdown-body pre { + margin-bottom: 0; + margin-top: 0; +} + +.markdown-body input::-webkit-inner-spin-button, +.markdown-body input::-webkit-outer-spin-button { + -webkit-appearance: none; + appearance: none; + margin: 0; +} + +.markdown-body .border { + border: 1px solid #e1e4e8!important; +} + +.markdown-body .border-0 { + border: 0!important; +} + +.markdown-body .border-bottom { + border-bottom: 1px solid #e1e4e8!important; +} + +.markdown-body .rounded-1 { + border-radius: 3px!important; +} + +.markdown-body .bg-white { + background-color: #fff!important; +} + +.markdown-body .bg-gray-light { + background-color: #fafbfc!important; +} + +.markdown-body .text-gray-light { + color: #6a737d!important; +} + +.markdown-body .mb-0 { + margin-bottom: 0!important; +} + +.markdown-body .my-2 { + margin-bottom: 8px!important; + margin-top: 8px!important; +} + +.markdown-body .pl-0 { + padding-left: 0!important; +} + +.markdown-body .py-0 { + padding-bottom: 0!important; + padding-top: 0!important; +} + +.markdown-body .pl-1 { + padding-left: 4px!important; +} + +.markdown-body .pl-2 { + padding-left: 8px!important; +} + +.markdown-body .py-2 { + padding-bottom: 8px!important; + padding-top: 8px!important; +} + +.markdown-body .pl-3, +.markdown-body .px-3 { + padding-left: 16px!important; +} + +.markdown-body .px-3 { + padding-right: 16px!important; +} + +.markdown-body .pl-4 { + padding-left: 24px!important; +} + +.markdown-body .pl-5 { + padding-left: 32px!important; +} + +.markdown-body .pl-6 { + padding-left: 40px!important; +} + +.markdown-body .f6 { + font-size: 12px!important; +} + +.markdown-body .lh-condensed { + line-height: 1.25!important; +} + +.markdown-body .text-bold { + font-weight: 600!important; +} + +.markdown-body:before { + content: ""; + display: table; +} + +.markdown-body:after { + clear: both; + content: ""; + display: table; +} + +.markdown-body>:first-child { + margin-top: 0!important; +} + +.markdown-body>:last-child { + margin-bottom: 0!important; +} + +.markdown-body a:not([href]) { + color: inherit; + text-decoration: none; +} + +.markdown-body blockquote, +.markdown-body dl, +.markdown-body ol, +.markdown-body p, +.markdown-body pre, +.markdown-body table, +.markdown-body ul { + margin-bottom: 16px; + margin-top: 0; +} + +.markdown-body hr { + background-color: #e1e4e8; + border: 0; + height: .25em; + margin: 24px 0; + padding: 0; +} + +.markdown-body blockquote { + border-left: .25em solid #dfe2e5; + color: #6a737d; + padding: 0 1em; +} + +.markdown-body blockquote>:first-child { + margin-top: 0; +} + +.markdown-body blockquote>:last-child { + margin-bottom: 0; +} + +.markdown-body kbd { + background-color: #fafbfc; + border: 1px solid #c6cbd1; + border-bottom-color: #959da5; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #959da5; + color: #444d56; + display: inline-block; + font-size: 11px; + line-height: 10px; + padding: 3px 5px; + vertical-align: middle; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + font-weight: 600; + line-height: 1.25; + margin-bottom: 16px; + margin-top: 24px; +} + +.markdown-body h1 { + font-size: 2em; +} + +.markdown-body h1, +.markdown-body h2 { + border-bottom: 1px solid #eaecef; + padding-bottom: .3em; +} + +.markdown-body h2 { + font-size: 1.5em; +} + +.markdown-body h3 { + font-size: 1.25em; +} + +.markdown-body h4 { + font-size: 1em; +} + +.markdown-body h5 { + font-size: .875em; +} + +.markdown-body h6 { + color: #6a737d; + font-size: .85em; +} + +.markdown-body ol, +.markdown-body ul { + padding-left: 2em; +} + +.markdown-body ol ol, +.markdown-body ol ul, +.markdown-body ul ol, +.markdown-body ul ul { + margin-bottom: 0; + margin-top: 0; +} + +.markdown-body li { + word-wrap: break-all; +} + +.markdown-body li>p { + margin-top: 16px; +} + +.markdown-body li+li { + margin-top: .25em; +} + +.markdown-body dl { + padding: 0; +} + +.markdown-body dl dt { + font-size: 1em; + font-style: italic; + font-weight: 600; + margin-top: 16px; + padding: 0; +} + +.markdown-body dl dd { + margin-bottom: 16px; + padding: 0 16px; +} + +.markdown-body table { + display: block; + overflow: auto; + width: 100%; +} + +.markdown-body table th { + font-weight: 600; +} + +.markdown-body table td, +.markdown-body table th { + border: 1px solid #dfe2e5; + padding: 6px 13px; +} + +.markdown-body table tr { + background-color: #fff; + border-top: 1px solid #c6cbd1; +} + +.markdown-body table tr:nth-child(2n) { + background-color: #f6f8fa; +} + +.markdown-body img { + background-color: #fff; + box-sizing: content-box; + max-width: 100%; +} + +.markdown-body img[align=right] { + padding-left: 20px; +} + +.markdown-body img[align=left] { + padding-right: 20px; +} + +.markdown-body code { + background-color: rgba(27,31,35,.05); + border-radius: 3px; + font-size: 85%; + margin: 0; + padding: .2em .4em; +} + +.markdown-body pre { + word-wrap: normal; +} + +.markdown-body pre>code { + background: transparent; + border: 0; + font-size: 100%; + margin: 0; + padding: 0; + white-space: pre; + word-break: normal; +} + +.markdown-body .highlight { + margin-bottom: 16px; +} + +.markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; +} + +.markdown-body .highlight pre, +.markdown-body pre { + background-color: #f6f8fa; + border-radius: 3px; + font-size: 85%; + line-height: 1.45; + overflow: auto; + padding: 16px; +} + +.markdown-body pre code { + background-color: transparent; + border: 0; + display: inline; + line-height: inherit; + margin: 0; + max-width: auto; + overflow: visible; + padding: 0; + word-wrap: normal; +} + +.markdown-body .commit-tease-sha { + color: #444d56; + display: inline-block; + font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace; + font-size: 90%; +} + +.markdown-body .blob-wrapper { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + overflow-x: auto; + overflow-y: hidden; +} + +.markdown-body .blob-wrapper-embedded { + max-height: 240px; + overflow-y: auto; +} + +.markdown-body .blob-num { + -moz-user-select: none; + -ms-user-select: none; + -webkit-user-select: none; + color: rgba(27,31,35,.3); + cursor: pointer; + font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace; + font-size: 12px; + line-height: 20px; + min-width: 50px; + padding-left: 10px; + padding-right: 10px; + text-align: right; + user-select: none; + vertical-align: top; + white-space: nowrap; + width: 1%; +} + +.markdown-body .blob-num:hover { + color: rgba(27,31,35,.6); +} + +.markdown-body .blob-num:before { + content: attr(data-line-number); +} + +.markdown-body .blob-code { + line-height: 20px; + padding-left: 10px; + padding-right: 10px; + position: relative; + vertical-align: top; +} + +.markdown-body .blob-code-inner { + color: #24292e; + font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace; + font-size: 12px; + overflow: visible; + white-space: pre; + word-wrap: normal; +} + +.markdown-body .pl-token.active, +.markdown-body .pl-token:hover { + background: #ffea7f; + cursor: pointer; +} + +.markdown-body kbd { + background-color: #fafbfc; + border: 1px solid #d1d5da; + border-bottom-color: #c6cbd1; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #c6cbd1; + color: #444d56; + display: inline-block; + font: 11px SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace; + line-height: 10px; + padding: 3px 5px; + vertical-align: middle; +} + +.markdown-body :checked+.radio-label { + border-color: #0366d6; + position: relative; + z-index: 1; +} + +.markdown-body .tab-size[data-tab-size="1"] { + -moz-tab-size: 1; + tab-size: 1; +} + +.markdown-body .tab-size[data-tab-size="2"] { + -moz-tab-size: 2; + tab-size: 2; +} + +.markdown-body .tab-size[data-tab-size="3"] { + -moz-tab-size: 3; + tab-size: 3; +} + +.markdown-body .tab-size[data-tab-size="4"] { + -moz-tab-size: 4; + tab-size: 4; +} + +.markdown-body .tab-size[data-tab-size="5"] { + -moz-tab-size: 5; + tab-size: 5; +} + +.markdown-body .tab-size[data-tab-size="6"] { + -moz-tab-size: 6; + tab-size: 6; +} + +.markdown-body .tab-size[data-tab-size="7"] { + -moz-tab-size: 7; + tab-size: 7; +} + +.markdown-body .tab-size[data-tab-size="8"] { + -moz-tab-size: 8; + tab-size: 8; +} + +.markdown-body .tab-size[data-tab-size="9"] { + -moz-tab-size: 9; + tab-size: 9; +} + +.markdown-body .tab-size[data-tab-size="10"] { + -moz-tab-size: 10; + tab-size: 10; +} + +.markdown-body .tab-size[data-tab-size="11"] { + -moz-tab-size: 11; + tab-size: 11; +} + +.markdown-body .tab-size[data-tab-size="12"] { + -moz-tab-size: 12; + tab-size: 12; +} + +.markdown-body .task-list-item { + list-style-type: none; +} + +.markdown-body .task-list-item+.task-list-item { + margin-top: 3px; +} + +.markdown-body .task-list-item input { + margin: 0 .2em .25em -1.6em; + vertical-align: middle; +} + +.markdown-body hr { + border-bottom-color: #eee; +} + +.markdown-body .pl-0 { + padding-left: 0!important; +} + +.markdown-body .pl-1 { + padding-left: 4px!important; +} + +.markdown-body .pl-2 { + padding-left: 8px!important; +} + +.markdown-body .pl-3 { + padding-left: 16px!important; +} + +.markdown-body .pl-4 { + padding-left: 24px!important; +} + +.markdown-body .pl-5 { + padding-left: 32px!important; +} + +.markdown-body .pl-6 { + padding-left: 40px!important; +} + +.markdown-body .pl-7 { + padding-left: 48px!important; +} + +.markdown-body .pl-8 { + padding-left: 64px!important; +} + +.markdown-body .pl-9 { + padding-left: 80px!important; +} + +.markdown-body .pl-10 { + padding-left: 96px!important; +} + +.markdown-body .pl-11 { + padding-left: 112px!important; +} + +.markdown-body .pl-12 { + padding-left: 128px!important; +} \ No newline at end of file diff --git a/docs/pages/_sass/layout.scss b/docs/pages/_sass/layout.scss new file mode 100644 index 0000000..35a24ee --- /dev/null +++ b/docs/pages/_sass/layout.scss @@ -0,0 +1,1077 @@ +// Screenshots are 1233 x 2460, so height = width * 1.99513. The Android frame below +// derives its screen height from the image itself rather than a fixed value, which is +// why nothing here hard-codes a device height. + +// The coloured band behind the header and hero. +// +// The height is fixed rather than derived, because .coverWrapper wraps the whole page in +// default.html — letting it size to content would tint the features and footer too. That +// makes the number load-bearing: everything in .appInfo is light text, so anything that +// spills past the band lands on the white body and turns invisible. .downloadNote is last +// and therefore the first thing to disappear. +// +// So: if you add to the hero, or make the note longer, re-check every width. The heights +// below leave the note ~80px of clearance at each breakpoint, the tightest being the point +// where the download buttons go full-width and stack. +.coverWrapper { + height: 800px; + background: linear-gradient(160deg, $cover-gradient-start 0%, $cover-gradient-end 100%); + border-radius: 0px 0px 40px 40px; +} + +// Below 600px the download buttons stack full-width, which adds ~95px, and the note wraps +// to three or four lines. 1120px keeps clearance positive all the way down to a 320px +// viewport; the surplus green below the note is covered by the phone, which follows +// immediately in the stacked order. +@media only screen and (max-width: 600px) { + + .coverWrapper { + height: 1120px; + } + +} + +.headerBackground { + height: 115px; + background-color: rgba($header-color, $header-transparency); +} + +@media only screen and (max-width: 768px) { + + .headerBackground { + height: 80px; + } + +} + +.subPageHeaderBackground { + background-color: #fff; +} + +.container { // Set up the container for the site content + display: grid; + margin: auto; + max-width: $content-width; + padding-left: 15px; + padding-right: 15px; + grid-template-columns: repeat(12, 1fr); + grid-template-rows: 115px auto auto auto auto auto auto; + grid-column-gap: 30px; + grid-template-areas: + "h h h h h h h h h h h h" + "p p p p p i i i i i i i" + "c c c c c c c c c c c c" + "g g g g g g g g g g g g" + "t t t t t t t t t t t t" + "n n n n n n n n a a a a" + "f f f f f f f f f f f f"; +} + +.subPageContainer { + background-color: #fff; + grid-template-rows: 115px auto; + grid-template-areas: + "h h h h h h h h h h h h" + "pg pg pg pg pg pg pg pg pg pg pg pg"; +} + +@media only screen and (max-width: 992px) { + + .container { + grid-column-gap: 0px; + grid-template-rows: 115px auto auto auto auto auto auto auto; + grid-template-areas: + "h h h h h h h h h h h h" + "i i i i i i i i i i i i" + "p p p p p p p p p p p p" + "c c c c c c c c c c c c" + "g g g g g g g g g g g g" + "t t t t t t t t t t t t" + "n n n n n n n n n n n n" + "a a a a a a a a a a a a" + "f f f f f f f f f f f f"; + } + + .subPageContainer { + grid-template-rows: 115px auto; + } +} + +.page { + grid-area: pg; + max-width: 780px; + margin: 30px auto 70px auto; +} + + +header { + grid-area: h; + display: flex; + margin-right: -15px; +} + +.logo { + display: flex; + justify-content: flex-start; + align-items: center; + height: 115px; + margin-right: 30px; +} + +.headerName { + color: $header-title-color; + white-space: nowrap; + display: flex; + font-weight: bold; + margin-left: 15px; +} + +@media only screen and (max-width: 768px) { + + .logo { + height: 80px; + margin-right: 0px; + } + + .headerName { + display: none; + } + +} + +// The Coil mark is a wide RFID-card shape, not a square app icon, so no squircle clip-path +// and no plate behind it — each header just uses the variant that contrasts with its own +// background. The standard mark, on the white privacy page header. +.headerIcon { + width: 50px; + height: 50px; +} + +// The inverted mark, on the green cover. Its viewBox is cropped to the card, so it is sized +// by height and left to work out its own width. +.headerIconInverse { + width: auto; + height: 34px; +} + +@media only screen and (max-width: 768px) { + + .divider { + position: relative; + min-width: 1px; + max-width: 1px; + background-color: rgba(127, 127, 127, 0.2); + display: inline-block; + margin-left: 15px; + } + +} + + +// Navigation Links +.scroll { + display: flex; + width: 100%; + align-items: center; + justify-content: flex-end; + + height: 115px; + + white-space: nowrap; + overflow-x: auto; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; +} + +@media only screen and (max-width: 768px) { + + .scroll { + height: 80px; + padding-top: 100px; + padding-bottom: 100px; + margin-top: -60px; + justify-content: flex-start; + } + +} + +.scroll::-webkit-scrollbar { + display: none; +} + + +nav > ul { + color: #fff; + display: flex; + list-style-type: none; +} + +nav > ul li { + padding-left: 30px; +} + +@media only screen and (max-width: 768px) { + + nav > ul li { + padding-left: 20px; + } + +} + +nav > ul li:first-child { + padding-left: 15px; +} + +nav > ul li:last-child { + padding-right: 15px; +} + +nav > ul li a:link, +nav > ul li a:visited { + text-decoration: none; + color: rgba($header-title-color, 0.6); +} + +nav > ul li a:hover, +nav > ul li a:active { + text-decoration: none; + color: rgba($header-title-color, 1); +} + + +// Sub Page Header Styling +.subPageHeaderBackground .headerName { + color: #000; +} + +.subPageHeaderBackground nav > ul li a:link, +.subPageHeaderBackground nav > ul li a:visited { + color: rgba(#000, 0.6); +} + +.subPageHeaderBackground nav > ul li a:hover, +.subPageHeaderBackground nav > ul li a:active { + color: rgba(#000, 1); +} + + +// App Title, Description and Download Links + +.appInfo { + grid-area: i; + display: flex; + flex-wrap: wrap; + padding-top: 110px; + align-content: flex-start; +} + +@media only screen and (max-width: 992px) { + + .appInfo { + padding-top: 50px; + justify-content: center; + } + +} + +.appIconLarge { + width: 120px; + height: 120px; + padding: 12px; + border-radius: 28px; + background-color: $device-screen-color; + filter: $drop-shadow; +} + +.appNameContainer { + display: flex; + flex: 0 1 auto; + flex-direction: column; + align-items: start; + justify-content: center; + margin-left: 30px; +} + +.appName { + color: $app-title-color; + font-size: 4rem; +} + +@media only screen and (max-width: 768px) { + + .appNameContainer { + width: 100%; + margin-left: 0px; + align-items: center; + justify-content: center; + } + + .appName { + margin-top: 30px; + text-align: center; + } + +} + +.appDescriptionContainer { + width: 100%; + align-items: flex-start; + margin-top: 45px; + flex: 0 1 auto; +} + +.appDescription { + color: $app-description-color; + font-size: 2.5rem; + font-weight: normal; + line-height: 1.5; +} + +.appDescriptionSecondary { + color: rgba($app-description-color, 0.75); + font-size: 1.8rem; + font-weight: normal; + line-height: 1.6; + margin-top: 18px; +} + +@media only screen and (max-width: 992px) { + + // Centred and full width, a 960px line is far too long a measure to read comfortably. + .appDescriptionContainer { + max-width: 620px; + margin-left: auto; + margin-right: auto; + } + + .appDescription, + .appDescriptionSecondary { + text-align: center; + } + +} + +.downloadButtonsContainer { + display: flex; + flex-wrap: wrap; + align-items: center; + margin-top: 42px; +} + +@media only screen and (max-width: 992px) { + + .downloadButtonsContainer { + justify-content: center; + } + +} + +.playStoreLink { + display: block; + margin-right: 24px; + filter: $drop-shadow; +} + +.playStore { + height: 75px; + display: block; +} + +.secondaryButton { + display: inline-flex; + align-items: center; + height: 75px; + padding: 0px 30px; + border: 1px solid rgba(#fff, 0.45); + border-radius: 12px; + font-size: 2rem; + font-weight: 600; + white-space: nowrap; +} + +.secondaryButton > i { + margin-right: 14px; +} + +.downloadButtonsContainer .secondaryButton:link, +.downloadButtonsContainer .secondaryButton:visited { + color: rgba(#fff, 0.9); +} + +.downloadButtonsContainer .secondaryButton:hover, +.downloadButtonsContainer .secondaryButton:active { + color: #fff; + border-color: rgba(#fff, 0.9); + background-color: rgba(#fff, 0.08); +} + +// 600px, not 528px: between roughly 530 and 600 the two buttons no longer fit on one line +// and flex-wrap dropped the second one to a new row on its own. That silently added a row's +// height and pushed .downloadNote off the bottom of the cover. Stacking them deliberately +// across the whole range keeps the hero's height predictable. +@media only screen and (max-width: 600px) { + + .playStoreLink { + margin-right: 0px; + margin-bottom: 20px; + } + + .playStoreLink, + .secondaryButton { + width: 100%; + } + + .secondaryButton { + justify-content: center; + } + +} + +.downloadNote { + color: rgba($app-description-color, 0.65); + font-size: 1.5rem; + line-height: 1.6; + margin-top: 24px; + max-width: 480px; +} + +@media only screen and (max-width: 992px) { + + .downloadNote { + text-align: center; + } + +} + + +// Android Device Preview +// +// The upstream theme painted an iPhone body PNG behind the screenshot and clipped the +// image with a notched SVG path. Coil is Android only, so the body is drawn in CSS: +// a dark bezel with rounded corners, no notch, and no fixed aspect ratio of its own — +// the screenshot sets the height, so it can never be squashed. + +.devicePreview { + grid-area: p; + display: flex; + justify-content: flex-start; + margin-top: 68px; +} + +.deviceFrame { + width: 400px; + padding: 14px; + border-radius: 42px; + background-color: $device-bezel-color; + box-shadow: + inset 0px 0px 0px 1px rgba(#fff, 0.12), + 0px 24px 48px rgba(#000, 0.32), + 0px 4px 12px rgba(#000, 0.24); +} + +.deviceScreen { + display: block; + width: 100%; + height: auto; + border-radius: 30px; + background-color: $device-screen-color; +} + +@media only screen and (max-width: 1070px) { + + .deviceFrame { + width: 356px; + border-radius: 38px; + padding: 12px; + } + + .deviceScreen { + border-radius: 28px; + } + +} + +@media only screen and (max-width: 992px) { + + .devicePreview { + justify-content: center; + margin-top: 47px; + padding-bottom: 75px; + } + + .deviceFrame { + width: 300px; + border-radius: 34px; + padding: 11px; + } + + .deviceScreen { + border-radius: 24px; + } + +} + +@media only screen and (max-width: 375px) { + + .deviceFrame { + width: 260px; + border-radius: 30px; + padding: 10px; + } + + .deviceScreen { + border-radius: 21px; + } + +} + + +// Feature List + +.features { + grid-area: c; + display: flex; + flex: 0 1 auto; + align-content: flex-start; + justify-content: flex-start; + flex-grow: 1; + flex-wrap: wrap; + margin-top: 93px; +} + +.feature { + display: flex; + padding-top: 63px; + padding-left: 15px; + padding-right: 15px; + width: calc(100%/3); +} + +.feature:nth-child(-n+3) { + padding-top: 0px; +} + +.feature:nth-child(3n) { + padding-right: 0px; +} + +.feature:nth-child(3n+1) { + padding-left: 0px; +} + +.iconBack { + color: $feature-icons-background-color; +} + +.iconTop { + color: $feature-icons-foreground-color; +} + +.socialIconBack { + color: $social-icons-background-color; +} + +.socialIconTop { + color: $social-icons-foreground-color; +} + +.featureText { + margin-left: 18px; +} + +.featureText > h3 { + color: $feature-title-color; +} + +.featureText > p { + color: $feature-text-color; + margin-top: 8px; + line-height: 1.5; +} + +@media only screen and (max-width: 992px) { + + .features { + flex-grow: 1; + flex-direction: row; + flex-wrap: wrap; + margin-top: 11px; + } + + .feature { + display: flex; + padding-top: 41px; + padding-left: 15px; + padding-right: 15px; + width: 100%; + } + + .feature:nth-child(-n+3) { + padding-top: 41px; + } + + .feature:nth-child(1) { + padding-top: 0px; + } + + .feature:nth-child(3n) { + padding-right: 15px; + } + + .feature:nth-child(3n+1) { + padding-left: 15px; + } + +} + +@media only screen and (max-width: 375px) { + + .feature, + .feature:nth-child(3n), + .feature:nth-child(3n+1) { + padding-left: 0px; + padding-right: 0px; + } + +} + + +// Screenshot Gallery + +// Two strips, two grid areas. Without the per-variant rules both would land in area "g" and +// render on top of each other. +.gallery { + margin-top: 93px; +} + +.gallery--g { + grid-area: g; +} + +.gallery--t { + grid-area: t; +} + +.galleryHeading { + color: $feature-title-color; + font-size: 2.6rem; + margin-bottom: 34px; +} + +.galleryStrip { + display: flex; + list-style-type: none; + overflow-x: auto; + scroll-snap-type: x proximity; + -webkit-overflow-scrolling: touch; + padding-bottom: 20px; +} + +.galleryItem { + flex: 0 0 auto; + margin-right: 30px; + scroll-snap-align: start; +} + +.galleryItem:last-child { + margin-right: 0px; +} + +// Descendant selectors, not child: the thumbnails are wrapped in a .galleryZoom anchor for the +// lightbox, so an `.galleryItem > img` rule matches nothing and the images fall back to their +// natural size — 2560px wide, in the tablet strip's case. +.galleryItem img { + display: block; + border-radius: 18px; + border: 1px solid rgba(#000, 0.08); + box-shadow: 0px 8px 20px rgba(#000, 0.10); + background-color: $device-screen-color; +} + +// Phone shots are all one aspect, so a fixed card width lines the captions up. +.galleryStrip--phone .galleryItem { + width: 240px; +} + +.galleryStrip--phone .galleryItem img { + width: 100%; + height: auto; +} + +// The tablet strip mixes 2560×1600 landscape with 1200×1920 portrait. Sizing by height instead +// keeps them visually comparable — matching widths would make the portrait shot tower over the +// landscape ones. The anchor takes its width from the image so a portrait card hugs its shot +// rather than sitting in a landscape-shaped box; min-width is there for the caption's sake. +// width: min-content makes the card take its width from the image rather than from the caption +// text. Without it the caption sets the intrinsic width and a 182px-wide portrait shot ends up +// in a 530px-wide card, which reads as a landscape frame with the screenshot floating in it. +.galleryStrip--tablet .galleryItem { + width: min-content; + // A floor for the caption's measure, not the image's — at 200px the portrait card's caption + // ran to four lines against the landscape cards' two. + min-width: 240px; +} + +// Centres a shot narrower than its card, so the slack reads as deliberate padding rather than +// the image being stuck against the left edge. +.galleryStrip--tablet .galleryZoom { + width: fit-content; + margin-left: auto; + margin-right: auto; +} + +.galleryStrip--tablet .galleryItem img { + width: auto; + height: 290px; +} + +.galleryCaption > h3 { + color: $feature-title-color; + margin-top: 18px; +} + +.galleryCaption > p { + color: $feature-text-color; + font-size: 1.7rem; + line-height: 1.5; + margin-top: 8px; +} + +@media only screen and (max-width: 992px) { + + .gallery { + margin-top: 70px; + } + + .galleryItem { + margin-right: 20px; + } + + .galleryStrip--phone .galleryItem { + width: 200px; + } + + .galleryStrip--tablet .galleryItem img { + height: 230px; + } + +} + + +// Landing Page Prose, and the links beside it +// +// The prose is capped at a readable measure and sits in 8 of the 12 columns; the side links +// occupy the remaining 4 so that band is not just empty page. + +.landingProse { + grid-area: n; + max-width: 780px; + margin-top: 93px; +} + +.sideLinks { + grid-area: a; + margin-top: 93px; + align-self: start; +} + +.sideLinksHeading { + color: $feature-title-color; + font-size: 2.6rem; + margin-bottom: 24px; +} + +.sideLinksPanel { + border: 1px solid rgba(#000, 0.09); + border-radius: 18px; + overflow: hidden; // keeps the first and last row's hover fill inside the radius + background-color: #fff; + box-shadow: 0px 6px 18px rgba(#000, 0.05); +} + +.sideLink { + display: flex; + align-items: center; + padding: 18px 20px; + border-top: 1px solid rgba(#000, 0.07); + transition: background-color 120ms ease-out; +} + +.sideLink:first-child { + border-top: 0px; +} + +.sideLinksPanel .sideLink:hover, +.sideLinksPanel .sideLink:active { + background-color: rgba($feature-icons-foreground-color, 0.055); +} + +.sideLinkIcon { + flex: 0 0 auto; + display: flex; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; + margin-right: 16px; + border-radius: 50%; + background-color: $feature-icons-background-color; + color: $feature-icons-foreground-color; + font-size: 1.7rem; +} + +.sideLinkText { + flex: 1 1 auto; + min-width: 0px; // lets a long description wrap instead of widening the row +} + +.sideLinkTitle { + display: block; + color: $feature-title-color; + font-size: 1.8rem; + font-weight: 600; +} + +.sideLinkDescription { + display: block; + color: $feature-text-color; + font-size: 1.5rem; + line-height: 1.45; + margin-top: 4px; +} + +.sideLinkArrow { + flex: 0 0 auto; + margin-left: 14px; + color: rgba($feature-text-color, 0.5); + font-size: 1.4rem; +} + +.sideLink:hover .sideLinkArrow { + color: $feature-icons-foreground-color; +} + +@media only screen and (max-width: 992px) { + + .landingProse { + margin-top: 70px; + } + + .sideLinks { + margin-top: 60px; + } + +} + + +// Footer + +footer { + grid-area: f; + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.footerText { + color: $footer-text-color; + display: block; + line-height: 1.5; + width: 100%; + max-width: 780px; + text-align: center; + font-size: 1.7rem; + padding-top: 70px; + padding-bottom: 40px; + margin: 0px auto; +} + +.footerIcons { + padding-bottom: 40px; + display: flex; + flex: 0 0 100%; + justify-content: center; +} + +.footerLinks { + display: flex; + text-align: center; + padding-bottom: 70px; + font-size: 1.7rem; +} + +.footerLinks a { + margin-right: 30px; +} + +.footerLinks a:last-child { + margin-right: 0px; +} + +@media only screen and (max-width: 768px) { + + .footerLinks { + flex-direction: column; + } + + .footerLinks a { + justify-content: stretch; + margin-right: 0px; + margin-top: 20px; + } + + .footerLinks a:first-child { + margin-top: 0px; + } + +} + +@media only screen and (max-width: 992px) { + + .footerText { + padding-top: 54px; + padding-bottom: 34px; + } + +} + +// Lightbox +// +// Markup and behaviour in _includes/lightbox.html. Every thumbnail is a link to its own image +// file, so with no support or no JavaScript the click still opens the full-size image +// and none of this is reached. + +.galleryZoom { + display: block; + cursor: zoom-in; +} + +.galleryZoom:focus-visible { + outline: 3px solid $feature-icons-foreground-color; + outline-offset: 3px; +} + +.lightbox { + // A is display:none until opened, so the flex layout only applies when it is. + padding: 0px; + border: 0px; + max-width: 100vw; + max-height: 100vh; + width: 100%; + height: 100%; + background: transparent; + overflow: hidden; +} + +.lightbox[open] { + display: flex; + align-items: center; + justify-content: center; +} + +.lightbox::backdrop { + background-color: rgba(#05100e, 0.88); +} + +.lightboxFigure { + display: flex; + flex-direction: column; + align-items: center; + max-width: 92vw; + max-height: 94vh; + margin: 0px; +} + +.lightboxImage { + display: block; + max-width: 92vw; + // Leaves room for the caption beneath. + max-height: 84vh; + width: auto; + height: auto; + border-radius: 12px; + background-color: $device-screen-color; + box-shadow: 0px 24px 60px rgba(#000, 0.5); +} + +.lightboxCaption { + color: rgba(#fff, 0.85); + font-size: 1.7rem; + text-align: center; + margin-top: 18px; +} + +.lightboxButton { + position: fixed; + display: flex; + align-items: center; + justify-content: center; + width: 52px; + height: 52px; + border: 0px; + border-radius: 50%; + background-color: rgba(#fff, 0.12); + color: #fff; + font-size: 2rem; + cursor: pointer; + transition: background-color 120ms ease-out; +} + +.lightboxButton:hover { + background-color: rgba(#fff, 0.24); +} + +.lightboxButton:focus-visible { + outline: 3px solid #fff; + outline-offset: 2px; +} + +.lightboxButton[hidden] { + display: none; +} + +.lightboxClose { + top: 24px; + right: 24px; +} + +.lightboxPrev { + left: 24px; + top: 50%; + margin-top: -26px; +} + +.lightboxNext { + right: 24px; + top: 50%; + margin-top: -26px; +} + +@media only screen and (max-width: 600px) { + + // Side buttons would sit on top of the image at this width, so they move to the bottom + // corners where the caption area gives them room. + .lightboxPrev { + top: auto; + bottom: 20px; + left: 20px; + margin-top: 0px; + } + + .lightboxNext { + top: auto; + bottom: 20px; + right: 20px; + margin-top: 0px; + } + + .lightboxImage { + max-height: 74vh; + } + +} + +.hidden { + display: none; +} diff --git a/docs/pages/assets/coil-mark-header.svg b/docs/pages/assets/coil-mark-header.svg new file mode 100644 index 0000000..ed2b767 --- /dev/null +++ b/docs/pages/assets/coil-mark-header.svg @@ -0,0 +1,24 @@ + + + + + Coil + + + + diff --git a/docs/pages/assets/coil-mark.svg b/docs/pages/assets/coil-mark.svg new file mode 100644 index 0000000..760ea21 --- /dev/null +++ b/docs/pages/assets/coil-mark.svg @@ -0,0 +1,30 @@ + + + Coil + + + + + + + + + + + + + diff --git a/docs/pages/assets/playstore.png b/docs/pages/assets/playstore.png new file mode 100644 index 0000000..6307d36 Binary files /dev/null and b/docs/pages/assets/playstore.png differ diff --git a/docs/pages/assets/screenshots/tablet10/01_player.png b/docs/pages/assets/screenshots/tablet10/01_player.png new file mode 100644 index 0000000..6e1ec9a Binary files /dev/null and b/docs/pages/assets/screenshots/tablet10/01_player.png differ diff --git a/docs/pages/assets/screenshots/tablet10/02_library.png b/docs/pages/assets/screenshots/tablet10/02_library.png new file mode 100644 index 0000000..586adea Binary files /dev/null and b/docs/pages/assets/screenshots/tablet10/02_library.png differ diff --git a/docs/pages/assets/screenshots/tablet10/03_favourites.png b/docs/pages/assets/screenshots/tablet10/03_favourites.png new file mode 100644 index 0000000..ac428ea Binary files /dev/null and b/docs/pages/assets/screenshots/tablet10/03_favourites.png differ diff --git a/docs/pages/assets/screenshots/tablet10/04_search.png b/docs/pages/assets/screenshots/tablet10/04_search.png new file mode 100644 index 0000000..a58d95a Binary files /dev/null and b/docs/pages/assets/screenshots/tablet10/04_search.png differ diff --git a/docs/pages/assets/screenshots/tablet10/05_sleep_timer.png b/docs/pages/assets/screenshots/tablet10/05_sleep_timer.png new file mode 100644 index 0000000..3886cb4 Binary files /dev/null and b/docs/pages/assets/screenshots/tablet10/05_sleep_timer.png differ diff --git a/docs/pages/assets/screenshots/tablet7/01_player.png b/docs/pages/assets/screenshots/tablet7/01_player.png new file mode 100644 index 0000000..a40cf10 Binary files /dev/null and b/docs/pages/assets/screenshots/tablet7/01_player.png differ diff --git a/docs/pages/assets/screenshots/tablet7/02_library.png b/docs/pages/assets/screenshots/tablet7/02_library.png new file mode 100644 index 0000000..302a4b4 Binary files /dev/null and b/docs/pages/assets/screenshots/tablet7/02_library.png differ diff --git a/docs/pages/assets/screenshots/tablet7/03_favourites.png b/docs/pages/assets/screenshots/tablet7/03_favourites.png new file mode 100644 index 0000000..1ae51c4 Binary files /dev/null and b/docs/pages/assets/screenshots/tablet7/03_favourites.png differ diff --git a/docs/pages/assets/screenshots/tablet7/04_search.png b/docs/pages/assets/screenshots/tablet7/04_search.png new file mode 100644 index 0000000..5d05520 Binary files /dev/null and b/docs/pages/assets/screenshots/tablet7/04_search.png differ diff --git a/docs/pages/assets/screenshots/tablet7/05_sleep_timer.png b/docs/pages/assets/screenshots/tablet7/05_sleep_timer.png new file mode 100644 index 0000000..b161f97 Binary files /dev/null and b/docs/pages/assets/screenshots/tablet7/05_sleep_timer.png differ diff --git a/docs/pages/index.md b/docs/pages/index.md index 9ae4830..5bee703 100644 --- a/docs/pages/index.md +++ b/docs/pages/index.md @@ -1,29 +1,42 @@ --- -title: Coil +layout: default permalink: / --- -# Coil +## What Coil does not do -A native Android remote for [Phoniebox](https://github.com/MiczFlor/RPi-Jukebox-RFID). +Card management, system settings and shutdown stay in the Phoniebox web UI. Coil covers the +thing you do twenty times a day — putting something on — and deliberately leaves administration +alone. Beyond keeping the app focused, it means Coil never sends a command that could take the +box down. -Open it, see what is playing, pick something else, hand the phone back. +That applies to timers too. The box can shut itself down on a timer, or after being idle for a +while; Coil offers neither. Its sleep timer is the one that stops the player and leaves the box +on. - -
- The player screen, showing cover art, the track title and transport controls - Browsing the library by folder, with a mini player at the bottom - Saved favourites as a grid of covers - Searching the cached library, with folder, album and track results - The player with a sleep timer running, counting down to when playback stops -
+- A Phoniebox running **v3** (`future3/main`). Earlier versions are not supported +- The box and the phone on the **same local network** +- Android 8.0 or newer -- [Source on GitHub](https://github.com/EarMaster/coil) -- [Privacy Policy](/privacy/) +Coil talks to the box over its ZeroMQ interface. That interface is unauthenticated and +unencrypted, so Coil is built for local network use only. Don't forward those ports — use a VPN +if you need access from outside the house. + +## Open source + +Coil is free software under the [GPL-3.0](https://github.com/EarMaster/coil/blob/main/LICENSE), +and the [source is on GitHub](https://github.com/EarMaster/coil). Issues, pull requests and +translations are welcome — for anything substantial, please open an issue first, since direction +is still worth discussing. + +Testing against your own box is the most useful thing you can offer. Different Phoniebox +versions, library sizes and hardware turn up problems that no amount of reading the source will. + +## Relationship to Phoniebox + +Coil is an independent third-party client. It is **not affiliated with or endorsed by** the +Phoniebox project. Phoniebox is the work of +[MiczFlor and contributors](https://github.com/MiczFlor/RPi-Jukebox-RFID); questions about the +box itself belong there. diff --git a/docs/pages/main.scss b/docs/pages/main.scss new file mode 100644 index 0000000..d1271d1 --- /dev/null +++ b/docs/pages/main.scss @@ -0,0 +1,35 @@ +--- +# Front matter comment to ensure Jekyll properly reads file. +--- + +$body-color: {{ site.body_background_color }}; + +$cover-gradient-start: {{ site.cover_gradient_start }}; +$cover-gradient-end: {{ site.cover_gradient_end }}; + +$device-bezel-color: {{ site.device_bezel_color }}; +$device-screen-color: {{ site.device_screen_color }}; + +$accent-color: {{ site.link_color }}; + +$header-title-color: {{ site.topbar_title_color }}; +$app-title-color: {{ site.app_title_color }}; +$app-description-color: {{ site.app_description_color }}; + +$feature-title-color: {{ site.feature_title_color }}; +$feature-text-color: {{ site.feature_text_color }}; +$footer-text-color: {{ site.footer_text_color }}; + +$header-color: {{ site.topbar_color }}; +$header-transparency: {{ site.topbar_transparency }}; + +$feature-icons-foreground-color: {{ site.feature_icons_foreground_color }}; +$feature-icons-background-color: {{ site.feature_icons_background_color }}; + +$social-icons-foreground-color: {{ site.social_icons_foreground_color }}; +$social-icons-background-color: {{ site.social_icons_background_color }}; + +@import + "base", + "layout", + "github-markdown" diff --git a/docs/pages/privacy.md b/docs/pages/privacy.md index a6ad494..e25bdb9 100644 --- a/docs/pages/privacy.md +++ b/docs/pages/privacy.md @@ -1,6 +1,9 @@ --- +layout: page title: Privacy Policy permalink: /privacy/ +include_in_header: true +include_in_footer: true --- # Privacy Policy for Coil diff --git a/fastlane/metadata/android/de-DE/changelogs/3.txt b/fastlane/metadata/android/de-DE/changelogs/3.txt new file mode 100644 index 0000000..84663ca --- /dev/null +++ b/fastlane/metadata/android/de-DE/changelogs/3.txt @@ -0,0 +1,5 @@ +Die Steuerung in der Benachrichtigung lässt sich jetzt ganz abschalten — neben "nur solange Coil offen ist" und "immer wenn die Box spielt". + +Jede Box hat ihre eigene Seite unter "Boxen verwalten": umbenennen oder umadressieren, ohne vorher zu wechseln, und ein Link, der Coil mit dieser Box öffnet. + +Behoben: Cover blieben an einer echten Box leer. diff --git a/fastlane/metadata/android/en-US/changelogs/3.txt b/fastlane/metadata/android/en-US/changelogs/3.txt new file mode 100644 index 0000000..e93cfc4 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/3.txt @@ -0,0 +1,5 @@ +Media controls can now be switched off completely, next to the existing "only while Coil is open" and "whenever the box plays". + +Every box has its own page now, reached from "Manage boxes" — rename or re-address a box without switching to it first, and copy a link that opens Coil showing that box. + +Fixed: cover art stayed blank on a real box. diff --git a/fastlane/metadata/android/es-ES/changelogs/3.txt b/fastlane/metadata/android/es-ES/changelogs/3.txt new file mode 100644 index 0000000..2057585 --- /dev/null +++ b/fastlane/metadata/android/es-ES/changelogs/3.txt @@ -0,0 +1,5 @@ +Los controles de la notificación ya se pueden desactivar por completo, junto a "solo mientras Coil está abierto" y "siempre que la caja suene". + +Cada caja tiene su propia página en "Gestionar cajas": renombrarla o cambiar su dirección sin pasar a ella, y un enlace que abre Coil con esa caja. + +Corregido: las portadas quedaban vacías en una caja real. diff --git a/fastlane/metadata/android/fr-FR/changelogs/3.txt b/fastlane/metadata/android/fr-FR/changelogs/3.txt new file mode 100644 index 0000000..d368bab --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/3.txt @@ -0,0 +1,5 @@ +Les commandes dans la notification peuvent désormais être désactivées entièrement, en plus de "seulement quand Coil est ouvert" et "dès que la box joue". + +Chaque box a sa propre page sous "Gérer les box" : la renommer ou changer son adresse sans y basculer, et un lien qui ouvre Coil sur cette box. + +Corrigé : les pochettes restaient vides sur une vraie box. diff --git a/fastlane/metadata/android/nl-NL/changelogs/3.txt b/fastlane/metadata/android/nl-NL/changelogs/3.txt new file mode 100644 index 0000000..6d62757 --- /dev/null +++ b/fastlane/metadata/android/nl-NL/changelogs/3.txt @@ -0,0 +1,5 @@ +De bediening in de melding kan nu helemaal uit, naast "alleen zolang Coil open is" en "zodra de box speelt". + +Elke box heeft zijn eigen pagina onder "Boxen beheren": hernoemen of een ander adres geven zonder eerst te wisselen, en een link die Coil met die box opent. + +Opgelost: hoesjes bleven leeg bij een echte box. diff --git a/feature-media/src/main/kotlin/app/coilforphoniebox/media/MediaSessionBinder.kt b/feature-media/src/main/kotlin/app/coilforphoniebox/media/MediaSessionBinder.kt index c9a9083..49aa128 100644 --- a/feature-media/src/main/kotlin/app/coilforphoniebox/media/MediaSessionBinder.kt +++ b/feature-media/src/main/kotlin/app/coilforphoniebox/media/MediaSessionBinder.kt @@ -6,7 +6,15 @@ import android.content.ServiceConnection import android.os.IBinder import android.util.Log import androidx.media3.common.util.UnstableApi +import app.coilforphoniebox.domain.model.SessionMode +import app.coilforphoniebox.domain.repository.SettingsRepository import dagger.hilt.android.qualifiers.ApplicationContext +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.launch import javax.inject.Inject import javax.inject.Singleton @@ -17,11 +25,18 @@ import javax.inject.Singleton * This is what "only while Coil is open" means in practice (§8.3): a bound service exists * as long as the screen does and posts no notification of its own, and media3 turns it * into a foreground service with a media notification the moment the box starts playing. + * + * It is also where [SessionMode.OFF] is enforced. The service cannot enforce it alone: a + * bound service survives its own `stopSelf`, so as long as the UI holds a binding media3 + * would still put a notification up the moment the box starts playing. Binding is + * therefore reconciled from two facts — whether the UI wants a session, and whether the + * setting allows one — and either one changing re-runs the decision. */ @androidx.annotation.OptIn(UnstableApi::class) @Singleton class MediaSessionBinder @Inject constructor( @ApplicationContext private val context: Context, + settings: SettingsRepository, ) { private val connection = object : ServiceConnection { override fun onServiceConnected(name: ComponentName?, service: IBinder?) = Unit @@ -29,9 +44,46 @@ class MediaSessionBinder @Inject constructor( override fun onServiceDisconnected(name: ComponentName?) = Unit } + private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) + + /** Whether the UI is on screen, as reported by [bind] and [unbind]. */ + private var wanted = false + + /** + * Whether the setting permits a session. It starts out false and is only ever set from + * the setting itself, so a launch in [SessionMode.OFF] never briefly binds: the first + * value arrives before there is anything for a session to show. + */ + private var allowed = false private var bound = false + init { + scope.launch { + settings.settings + .map { it.sessionMode != SessionMode.OFF } + .distinctUntilChanged() + .collect { permitted -> + allowed = permitted + reconcile() + } + } + } + fun bind() { + wanted = true + reconcile() + } + + fun unbind() { + wanted = false + reconcile() + } + + private fun reconcile() { + if (wanted && allowed) bindNow() else unbindNow() + } + + private fun bindNow() { if (bound) return bound = runCatching { context.bindService( @@ -43,7 +95,7 @@ class MediaSessionBinder @Inject constructor( .getOrDefault(false) } - fun unbind() { + private fun unbindNow() { if (!bound) return runCatching { context.unbindService(connection) } bound = false diff --git a/feature-media/src/main/kotlin/app/coilforphoniebox/media/PhonieboxMediaService.kt b/feature-media/src/main/kotlin/app/coilforphoniebox/media/PhonieboxMediaService.kt index cbf2ea8..5d82065 100644 --- a/feature-media/src/main/kotlin/app/coilforphoniebox/media/PhonieboxMediaService.kt +++ b/feature-media/src/main/kotlin/app/coilforphoniebox/media/PhonieboxMediaService.kt @@ -40,7 +40,9 @@ import javax.inject.Inject * lives exactly as long as the UI and posts a notification only once the box actually * plays — media3 handles that transition. In automatic mode the service is started * outright and keeps a low-priority notification up while it waits, because a foreground - * service has to be visible (§8.3). + * service has to be visible (§8.3). When controls are switched off entirely the service is + * not meant to exist at all: nothing binds or starts it, and it stops itself if it is + * already running when the setting changes. */ @androidx.annotation.OptIn(UnstableApi::class) @AndroidEntryPoint @@ -159,16 +161,31 @@ class PhonieboxMediaService : MediaSessionService() { stopSelf() } - /** Turning the automatic mode off in settings should stop the service, not wait for a reboot. */ + /** + * Turning a mode off in settings should stop the service, not wait for a reboot. + * + * [SessionMode.OFF] ends the service whatever it is doing, including mid-playback: + * that mode's promise is that no notification exists, and this service's notification + * is the one thing that would break it. `stopSelf` alone cannot deliver that while the + * UI is bound — `MediaSessionBinder` drops the binding for the same setting, and the + * two together are what actually takes the notification down. + */ private fun observeSessionModeSetting() { scope.launch { settingsRepository.settings .map { it.sessionMode } .distinctUntilChanged() .collect { mode -> - if (automatic && mode == SessionMode.APP_ONLY) { - Log.i(TAG, "Automatic mode switched off; stopping") - stopSelf() + when { + mode == SessionMode.OFF -> { + Log.i(TAG, "Controls switched off entirely; stopping") + stopSelf() + } + + automatic && mode == SessionMode.APP_ONLY -> { + Log.i(TAG, "Automatic mode switched off; stopping") + stopSelf() + } } } } diff --git a/feature-shortcuts/src/main/kotlin/app/coilforphoniebox/shortcuts/OpenDeepLink.kt b/feature-shortcuts/src/main/kotlin/app/coilforphoniebox/shortcuts/OpenDeepLink.kt new file mode 100644 index 0000000..998a1e3 --- /dev/null +++ b/feature-shortcuts/src/main/kotlin/app/coilforphoniebox/shortcuts/OpenDeepLink.kt @@ -0,0 +1,56 @@ +package app.coilforphoniebox.shortcuts + +import android.content.Intent +import android.net.Uri + +/** + * `coil://open` — open the app, and `coil://open?box=` — open it showing that box. + * + * The counterpart to [PlayDeepLink], and deliberately a separate host rather than a `play` + * link with the target left off: the two do different things and are worth being able to tell + * apart at a glance, in a note or an automation app. A `play` link reaches the box; this one + * does not touch it at all. + * + * That makes this the *less* privileged of the two. All an outside caller can ask for here is + * the thing tapping the launcher icon already does, plus which of the user's own boxes the app + * comes up on. It sends no command, so it cannot start, stop or change what is playing — + * which is the line the RPC surface observes as well (§16). + * + * [boxId] is optional, unlike in a `play` link where it is required. A folder path means + * nothing without the box it came from, so `play` cannot do without one; "just open the app" + * is a perfectly complete request on its own. + */ +object OpenDeepLink { + + const val SCHEME = "coil" + const val HOST = "open" + + private const val PARAM_BOX = "box" + + /** [boxId] is null when the link names no box, which means "leave the active box alone". */ + data class Request(val boxId: String?) + + fun uriFor(boxId: String? = null): Uri = Uri.Builder() + .scheme(SCHEME) + .authority(HOST) + .apply { boxId?.takeIf { it.isNotBlank() }?.let { appendQueryParameter(PARAM_BOX, it) } } + .build() + + /** + * An implicit VIEW intent limited to this package, for the same reason as + * [PlayDeepLink.intentFor]: a library module cannot name an activity in the app module, and + * restricting the package keeps the link from being answerable by anything else. + */ + fun intentFor(packageName: String, boxId: String? = null): Intent = + Intent(Intent.ACTION_VIEW, uriFor(boxId)).setPackage(packageName) + + /** + * Returns null for anything that is not one of these links, so a caller can hand it every + * intent it receives. A blank `box` is treated as absent rather than as an error: a link + * built by hand with an empty parameter still means "open the app". + */ + fun parse(uri: Uri?): Request? { + if (uri == null || uri.scheme != SCHEME || uri.host != HOST) return null + return Request(boxId = uri.getQueryParameter(PARAM_BOX)?.takeIf { it.isNotBlank() }) + } +}