ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IconArchive           = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-archive"><rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/></svg>`)
	IconClose             = e.Raw(`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">`)
	IconCog               = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cog"><path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"/><path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/><path d="M12 2v2"/><path d="M12 22v-2"/><path d="m17 20.66-1-1.73"/><path d="M11 10.27 7 3.34"/><path d="m20.66 17-1.73-1"/><path d="m3.34 7 1.73 1"/><path d="M14 12h8"/><path d="M2 12h2"/><path d="m20.66 7-1.73 1"/><path d="m3.34 17 1.73-1"/><path d="m17 3.34-1 1.73"/><path d="m11 13.73-4 6.93"/></svg>`)
	IconCopy              = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`)
	IconDialogClose       = e.Raw(`<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4"><path d="M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>`)
	IconFiles             = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-files"><path d="M20 7h-3a2 2 0 0 1-2-2V2"/><path d="M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z"/><path d="M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8"/></svg>`)
	IconGauge             = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gauge"><path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/></svg>`)
	IconKeyRound          = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round"><path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"/><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"/></svg>`)
	IconPlus              = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`)
	IconSlidersHorizontal = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sliders-horizontal"><line x1="21" x2="14" y1="4" y2="4"/><line x1="10" x2="3" y1="4" y2="4"/><line x1="21" x2="12" y1="12" y2="12"/><line x1="8" x2="3" y1="12" y2="12"/><line x1="21" x2="16" y1="20" y2="20"/><line x1="12" x2="3" y1="20" y2="20"/><line x1="14" x2="14" y1="2" y2="6"/><line x1="8" x2="8" y1="10" y2="14"/><line x1="16" x2="16" y1="18" y2="22"/></svg>`)
	IconTrash             = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-2"><path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>`)
	IconUsersRound        = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users-round"><path d="M18 21a8 8 0 0 0-16 0"/><circle cx="10" cy="8" r="5"/><path d="M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3"/></svg>`)
	IconUserRound         = e.Raw(`<svg class="h-4"xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user-round-icon lucide-user-round"><circle cx="12" cy="8" r="5"/><path d="M20 21a8 8 0 0 0-16 0"/></svg>`)
	IconX                 = e.Raw(`<svg class="h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`)
)

Functions

func AdminPageLayout added in v0.4.0

func AdminPageLayout(active string, children ...e.Node) e.Node

func ApiKeyCreatedDialog added in v0.4.0

func ApiKeyCreatedDialog(k *apikey.ApiKey, plain string) e.Node

func ApiKeySheet added in v0.4.0

func ApiKeySheet(key *apikey.ApiKey) e.Node

func ApiKeysEmptyState added in v0.4.0

func ApiKeysEmptyState() e.Node

func ApiKeysPage added in v0.4.0

func ApiKeysPage(data *ApiKeysPageData) e.Node

func ApiKeysTable added in v0.4.0

func ApiKeysTable(keys []*apikey.ApiKey) e.Node

func ApiKeysTableRow added in v0.4.0

func ApiKeysTableRow(key *apikey.ApiKey) e.Node

func AuthLayout added in v0.4.0

func AuthLayout(children ...e.Node) e.Node

func BootstrapForm added in v0.4.0

func BootstrapForm(f *BootstrapFormData) e.Node

func BootstrapPage added in v0.4.0

func BootstrapPage() e.Node
func Breadcrumbs(crumbs ...Breadcrumb) e.Node

func BucketEmptyState added in v0.4.0

func BucketEmptyState() e.Node

func BucketNavTabs added in v0.4.0

func BucketNavTabs(links *BucketLinks, active string) e.Node

func BucketObjectsPage added in v0.4.0

func BucketObjectsPage(d BucketObjectsPageData) e.Node

func BucketPage added in v0.4.0

func BucketPage(links *BucketLinks, activeTab string, breadcrumbs, pageTitle e.Node, children ...e.Node) e.Node

func BucketPropertiesPage added in v0.4.0

func BucketPropertiesPage(b *bucket.Bucket) e.Node

func BucketSettingsPage added in v0.4.0

func BucketSettingsPage(b *bucket.Bucket) e.Node

func BucketsEmptyState added in v0.4.0

func BucketsEmptyState() e.Node

func BucketsPage added in v0.4.0

func BucketsPage(buckets []*bucket.Bucket) e.Node

func BucketsTable added in v0.4.0

func BucketsTable(buckets []*bucket.Bucket) e.Node

func ConfirmationDialog added in v0.4.0

func ConfirmationDialog(d *ConfirmationDialogData) e.Node

func CreateApiKeyDialog added in v0.4.0

func CreateApiKeyDialog() e.Node

func CreateBucketDialog added in v0.4.0

func CreateBucketDialog() e.Node

func DashboardMetrics added in v0.4.0

func DashboardMetrics(d DashboardData) e.Node

func DashboardPage added in v0.4.0

func DashboardPage(d DashboardData) e.Node

func DeleteApiKeyDialog added in v0.4.0

func DeleteApiKeyDialog(key *apikey.ApiKey) e.Node

func DeleteBucketDialog added in v0.5.0

func DeleteBucketDialog(b *bucket.Bucket) e.Node

func Detail added in v0.4.0

func Detail(title, value string) e.Node

func Details added in v0.4.0

func Details(title string, details ...e.Node) e.Node

func Dialog added in v0.4.0

func Dialog(id string, children ...e.Node) e.Node

func DialogBackdrop added in v0.4.0

func DialogBackdrop() e.Node

func DialogContent added in v0.4.0

func DialogContent(children ...e.Node) e.Node

func DialogTitle added in v0.4.0

func DialogTitle(children ...e.Node) e.Node
func DownloadObjectLink(bucket, key string) string

func EmptyBucketDialog added in v0.5.0

func EmptyBucketDialog(b *bucket.Bucket) e.Node

func FormLabel added in v0.4.0

func FormLabel(htmlFor, text string) e.Node

func ListPageLayout added in v0.4.0

func ListPageLayout(title string, sidebar e.Node, children ...e.Node) e.Node

func LoggedInLayout added in v0.4.0

func LoggedInLayout(sidebar e.Node, children ...e.Node) e.Node

func LoginForm added in v0.4.0

func LoginForm(d LoginFormData) e.Node

func LoginPage added in v0.4.0

func LoginPage() e.Node

func MetricCard added in v0.4.0

func MetricCard(title string, icon e.Node, value, lead string) e.Node
func NavTabs(links ...*NavLink) e.Node

func NotFoundPage added in v0.4.0

func NotFoundPage() e.Node

func ObjectPropertiesPage added in v0.4.0

func ObjectPropertiesPage(b *bucket.Bucket, o *object.Object) e.Node

func ObjectsTable added in v0.4.0

func ObjectsTable(objects []ObjectData) e.Node
func OpenObjectLink(bucket, key string) string
func PageHeader(title, closeLink string) e.Node

func PageTitle added in v0.4.0

func PageTitle(title string) e.Node

func PathBreadcrumbs added in v0.4.0

func PathBreadcrumbs(links *BucketLinks, b *bucket.Bucket, key string) e.Node

func ProfilePage added in v0.5.0

func ProfilePage(d *ProfilePageData) e.Node

func ProfilePasswordSection added in v0.5.0

func ProfilePasswordSection(d *ProfilePasswordSectionData) e.Node

func ProfileSection added in v0.5.0

func ProfileSection(title string, children ...e.Node) e.Node

func ProfileSessionsSection added in v0.5.0

func ProfileSessionsSection(d *ProfileSessionsSectionData) e.Node

func RenderCss

func RenderCss(name string) *srv.Response

func RenderImg

func RenderImg(name string) *srv.Response

func RenderJs

func RenderJs(name string) *srv.Response

func Sheet added in v0.4.0

func Sheet(m sheetModel, children ...e.Node) e.Node

func Shell added in v0.4.0

func Shell(title string, children ...e.Node) e.Node
func Sidebar(items ...SidebarItem) e.Node

func TabbedPageLayout added in v0.4.0

func TabbedPageLayout(sidebar, pageHeader, navTabs e.Node, children ...e.Node) e.Node

func Table added in v0.4.0

func Table(children ...e.Node) e.Node

func TableBody added in v0.4.0

func TableBody(children ...e.Node) e.Node

func TableCell added in v0.4.0

func TableCell(children ...e.Node) e.Node

func TableCellC added in v0.4.0

func TableCellC(className string, children ...e.Node) e.Node

func TableHead added in v0.4.0

func TableHead(className string, children ...e.Node) e.Node

func TableHeader added in v0.4.0

func TableHeader(children ...e.Node) e.Node

func TableRow added in v0.4.0

func TableRow(children ...e.Node) e.Node

func ToastContainer added in v0.4.0

func ToastContainer() e.Node

func UsersPage added in v0.4.0

func UsersPage(d *UsersPageData) e.Node

func UsersTable added in v0.4.0

func UsersTable(users []*user.User) e.Node

func UsersTableRow added in v0.4.0

func UsersTableRow(u *user.User) e.Node

Types

type ApiKeysPageData

type ApiKeysPageData struct {
	Keys []*apikey.ApiKey
}

type BootstrapFormData added in v0.4.0

type BootstrapFormData struct {
	Email        string
	ErrorMessage string
}
type Breadcrumb struct {
	Separator bool
	Link      string
	Title     string
}
type BreadcrumbModel struct {
	Separator bool
	Title     string
	Link      string
}
type BreadcrumbsModel struct {
	Crumbs []*BreadcrumbModel
}

func NewBreadcrumbs added in v0.2.0

func NewBreadcrumbs() *BreadcrumbsModel
func (m *BreadcrumbsModel) AddLink(title, link string) *BreadcrumbsModel
func (m *BreadcrumbsModel) AddTitle(title string) *BreadcrumbsModel
func (m *BreadcrumbsModel) Last() *BreadcrumbModel
type BucketLinks struct {
	Objects    string
	Properties string
	Settings   string
	// contains filtered or unexported fields
}
func NewBucketLinks(bucketName string) *BucketLinks

func (*BucketLinks) Folder added in v0.2.0

func (l *BucketLinks) Folder(prefix string) string

func (*BucketLinks) Object added in v0.2.0

func (l *BucketLinks) Object(key string) string

type BucketObjectsPageData added in v0.2.0

type BucketObjectsPageData struct {
	Bucket  *bucket.Bucket
	Prefix  string
	Objects []ObjectData
}

type ConfirmationDialogData added in v0.4.0

type ConfirmationDialogData struct {
	ID           string
	Title        string
	Description  string
	CancelTitle  string
	Destructive  bool
	HxPost       string
	HxDelete     string
	HxTarget     string
	HxSwap       string
	ConfirmTitle string
}

type DashboardData

type DashboardData struct {
	DiskInfo    disk.Info
	StorageSize uint64
	BucketStats bucket.Stats
}

type DetailModel

type DetailModel struct {
	Title string
	Value string
}

type DetailsModel

type DetailsModel struct {
	Title   string
	Details []DetailModel
}

type LoginFormData added in v0.4.0

type LoginFormData struct {
	Email        string
	ErrorMessage string
}
type NavLink struct {
	Active bool
	Link   string
	Title  string
	Icon   e.Node
}

func ObjectsNavTab added in v0.4.0

func ObjectsNavTab(link string, active bool) *NavLink

func PropertiesNavTab added in v0.4.0

func PropertiesNavTab(link string, active bool) *NavLink

func SettingsNavTab added in v0.4.0

func SettingsNavTab(link string, active bool) *NavLink
type NavTabsModel struct {
	Tabs []*NavLink
}

func NewNavTabsModel added in v0.2.0

func NewNavTabsModel() *NavTabsModel

type ObjectData added in v0.2.0

type ObjectData struct {
	Key  string
	Size int64
	Href string
}

type ProfilePageData added in v0.5.0

type ProfilePageData struct {
	User                 *user.User
	AuthenticatedSession *session.Session
	Sessions             []*session.Session
}

type ProfilePasswordSectionData added in v0.5.0

type ProfilePasswordSectionData struct {
	Message string
}

type ProfileSessionsSectionData added in v0.5.0

type ProfileSessionsSectionData struct {
	AuthenticatedSession *session.Session
	Sessions             []*session.Session
}

type SidebarItem added in v0.4.0

type SidebarItem struct {
	Active bool
	Icon   e.Node
	Title  string
	Link   string
}

type SidebarModel

type SidebarModel struct {
	Items []NavLink
}

type UsersPageData

type UsersPageData struct {
	Users []*user.User
}

Jump to

Keyboard shortcuts

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