ui

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

View Source
const (
	KikoRepoURL = "https://github.com/hrodrig/kiko"
	KUIRepoURL  = "https://github.com/hrodrig/kui"
)

Variables

This section is empty.

Functions

func Account2FAPage

func Account2FAPage(user *store.User, data Account2FAData) templ.Component

func ChannelsTable

func ChannelsTable(sh Shell, channels []kikoclient.Row) templ.Component

func ConfirmModal

func ConfirmModal(sh Shell) templ.Component

func DashboardChartJSON

func DashboardChartJSON(data DashboardData, sh Shell) string

func DashboardCharts

func DashboardCharts(data DashboardData) templ.Component

func DashboardPage

func DashboardPage(user *store.User, data DashboardData) templ.Component

func KUIVersionLabel

func KUIVersionLabel() string

func KikoVersionLabel

func KikoVersionLabel() string

func KpiCard

func KpiCard(label, value, tag string) templ.Component

func Layout

func Layout(sh Shell, title string, user *store.User, active string) templ.Component

func LocalePicker

func LocalePicker(sh Shell) templ.Component

func Login2FAPage

func Login2FAPage(sh Shell, errorMsg string) templ.Component

func LoginPage

func LoginPage(form LoginFormData) templ.Component

func PasswordField

func PasswordField(sh Shell, id, name, autocomplete string, required bool, minlength int) templ.Component

func PathsTable

func PathsTable(sh Shell, paths []kikoclient.PathRow) templ.Component

func RefsTable

func RefsTable(sh Shell, refs []kikoclient.RefRow) templ.Component

func SetKikoVersion

func SetKikoVersion(v string)

func ShowVersionTags

func ShowVersionTags() bool

func ThemeToggle

func ThemeToggle(sh Shell) templ.Component

func UserFormPage

func UserFormPage(user *store.User, form UserFormData) templ.Component

func UsersPage

func UsersPage(sh Shell, user *store.User, users []store.UserWithHosts, flash string) templ.Component

func VersionTags

func VersionTags(sh Shell) templ.Component

Types

type Account2FAData

type Account2FAData struct {
	Shell        Shell
	Enabled      bool
	SetupPending bool
	QRDataURI    string
	ManualSecret string
	Error        string
}

type DashboardData

type DashboardData struct {
	Shell     Shell
	Hosts     []string
	Host      string
	Range     string
	Summary   *DashboardSummary
	Timeline  []kikoclient.TimelinePoint
	Paths     []kikoclient.PathRow
	Refs      []kikoclient.RefRow
	Channels  []kikoclient.Row
	ChartJSON string
	KikoErr   string
}

type DashboardSummary

type DashboardSummary struct {
	Hits        int64
	Uniques     int64
	TopPath     string
	TopPathHits int64
	Since       string
	Until       string
}

type I18n

type I18n struct {
	Locale string
	Lang   string
	T      func(string) string
	Tfmt   func(string, map[string]string) string
}
type LocaleLink struct {
	Code   string
	Label  string
	URL    string
	Active bool
}

type LoginFormData

type LoginFormData struct {
	Shell    Shell
	Error    string
	Email    string
	Remember bool
}

type Shell

type Shell struct {
	I18n
	Links  []LocaleLink
	JSI18n string
}

type UserFormData

type UserFormData struct {
	Shell       Shell
	ID          int64
	Email       string
	Password    string
	Role        store.Role
	HostsText   string
	Error       string
	Success     string
	TOTPEnabled bool
	IsNew       bool
}

Jump to

Keyboard shortcuts

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