pwa

package
v0.14.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pwa hosts Progressive Web App glue — the dynamic web app manifest plus future hooks (service worker registration, push subscription endpoints). Kept separate from internal/pkg/api so server.go stays a wiring file and doesn't accumulate PWA logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManifestHandler

func ManifestHandler(w http.ResponseWriter, r *http.Request)

ManifestHandler serves /public/manifest.json with the configured app name + description baked in, so downstream wick deployments install as their own brand instead of "wick". The agents shortcut name follows suit — "MyApp Agent" rather than a static fallback. Icons and theme colour stay shared from the embedded SVGs under /public/img.

Reads everything from the request context. The caller is expected to chain the existing appNameHandler middleware before this handler so ui.AppNameFromContext / ui.AppDescFromContext are populated.

func ServiceWorkerHandler added in v0.14.19

func ServiceWorkerHandler(w http.ResponseWriter, r *http.Request)

ServiceWorkerHandler serves /sw.js. It must be registered at the root path (not under /public/) so the default scope is "/". no-cache lets the browser pick up a new worker on each deploy.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL