mirror of
https://github.com/narrrl/pl8list-rewind.git
synced 2026-11-03 16:41:26 +01:00
Draw a clean play/pause on the drop and make the app installable
The raised icon was cut into a mesh too coarse for its edges and did not line up with the icon painted over it, so it came out doubled and jagged, and melting one shape into the other went through blobby in-betweens. The icon is now only painted: crisp and white on a dark disc like the page's round buttons, still turning with the drop, and pause and play fade into each other as the new one grows in. Some browsers only offer to install an app with a service worker. A minimal one at /sw.js (served from the root so it covers the whole app) caches nothing and only shows a short offline note instead of the browser's error page. The manifest gets an id.
This commit is contained in:
1 parent
ca23cf5b7c
commit
065c9980dc
6 files changed
+59
-23
No files matched your search
@@ -294,6 +294,11 @@ async fn static_route(Path(path): Path<String>) -> Response {
|
||||
static_file(&path)
|
||||
}
|
||||
|
||||
/// The service worker, at the root so its scope covers the whole app.
|
||||
async fn service_worker() -> Response {
|
||||
static_file("sw.js")
|
||||
}
|
||||
|
||||
async fn healthz() -> Response {
|
||||
(no_store(), Json(json!({ "ok": true }))).into_response()
|
||||
}
|
||||
@@ -305,6 +310,7 @@ pub fn router(app: Arc<App>) -> Router {
|
||||
Router::new()
|
||||
.route("/", get(index))
|
||||
.route("/static/{*path}", get(static_route))
|
||||
.route("/sw.js", get(service_worker))
|
||||
.route("/healthz", get(healthz))
|
||||
.route("/impressum", get(legal::impressum))
|
||||
.route("/datenschutz", get(legal::datenschutz))
|
||||
|
||||
Reference in new issue
Block a user