ui

package
v1.158.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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

func Favicon(logoURL string) http.Handler

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

func Handler() http.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

func MountSiteFiles(mux *http.ServeMux, logos ...string)

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.

Jump to

Keyboard shortcuts

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