frontend

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 8 Imported by: 0

README

Notifiarr Client Frontend

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Root   fs.FS
	Locale fs.FS
)
View Source
var URLBase = "/"

URLBase is the base URL of the application. It is set by the server and injected into the frontend using a cookie.

Functions

func IndexHandler

func IndexHandler(resp http.ResponseWriter, req *http.Request)

IndexHandler returns an asset from the file system if it exists, otherwise the index page. Useful for a single page app.

Types

type Languages

type Languages map[string]map[string]LocalizedLanguage

Languages is a map of the available languages and their display names localized to the parent language. The key is the parent language, and the value is a map of the available languages and their display names localized to the parent language.

func Translations

func Translations() Languages

Translations returns all the configured frontend languages. The frontend uses this to populate the language dropdown localized to the currently selected language.

type LocalizedLanguage

type LocalizedLanguage struct {
	// Lang is the parent language code this language Name is localized to.
	Lang string `json:"lang"`
	// Code is the language code of the language.
	Code string `json:"code"`
	// Name is the display name of the language localized to the parent (Lang) language.
	Name string `json:"name"`
	// Self is the display name of the language localized in its own language.
	Self string `json:"self"`
}

LocalizedLanguage is a language and its display name localized to itself and another (parent) language.

Directories

Path Synopsis
src
api command
Package main is used to generate the backend data model as typescript interfaces.
Package main is used to generate the backend data model as typescript interfaces.

Jump to

Keyboard shortcuts

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