Documentation
¶
Overview ¶
Package ui embeds and serves the unified portal SPA frontend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available returns true when the embedded dist directory contains frontend assets (i.e., the frontend was built before the Go binary was compiled).
func Favicon ¶ added in v1.153.0
Favicon answers /favicon.ico, the address a browser asks for a site's icon when the page names none and the address every server-rendered page and the portal shell name (#2460). It is served without a session: the share viewer is read signed out, and an icon request that answers 401 leaves the tab blank and logs an error on every page.
A deployment's configured logo is the icon, by redirect, so the tab carries the deployment's mark before the portal's own script has run; otherwise the bundled mark is served. With neither (a build without the portal) the address is not found.
func Handler ¶
Handler returns an http.Handler that serves the embedded SPA. It tries to serve the exact file first; if not found, it falls back to index.html for client-side routing.
func MountSiteFiles ¶ added in v1.153.0
MountSiteFiles registers the two files a browser or crawler asks a site for without a session: robots.txt, which keeps search engines from indexing the portal, and /favicon.ico (Favicon), whose logo is the first of logos that is set.
Types ¶
This section is empty.