Documentation
¶
Overview ¶
Package ui renders the shared browser pages. Pages are script-free except those that define a "scripts" block (passkey ceremonies and the approval inbox), which load only a same-origin script under a matching Content-Security-Policy.
Index ¶
Constants ¶
const AppSource = "manifest-src 'self'"
AppSource is the CSP directive pages need to link the install manifest.
const ImageSource = "img-src data:"
ImageSource is the CSP directive pages need for the inline icon. Inline data keeps pages free of extra routes that proxies would have to forward.
Variables ¶
This section is empty.
Functions ¶
func EnableApp ¶ added in v0.7.0
func EnableApp()
EnableApp makes every page link the approval inbox's install manifest and icon. iPhone delivers Web Push only to apps added to the Home Screen, and people often add the page they are on, such as an approval or sign-in page.
func Icon ¶ added in v0.4.0
func Icon(w http.ResponseWriter, _ *http.Request)
Icon serves the shared application icon for installed approval inboxes.
func Message ¶
func Message(w http.ResponseWriter, status int, title, message string)
Message renders a short informational or error page in the shared layout.
func NewTemplate ¶
NewTemplate adds trusted title and content definitions to the shared layout. All request data must be passed to Execute, never interpolated into source.
Types ¶
This section is empty.