pages

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Overview

Package pages provides ForgeUI-based page templates for the multisession plugin dashboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackLink(href, text string) g.Node

BackLink renders a back navigation link.

func ConfirmDialog

func ConfirmDialog(xShowVar, title, message, confirmText, onConfirm string) g.Node

ConfirmDialog renders a confirmation dialog with Alpine.js.

func DangerButton

func DangerButton(onclick, text string, icon g.Node) g.Node

DangerButton creates a danger/destructive action button.

func DetailCard

func DetailCard(title string, icon g.Node, content ...g.Node) g.Node

DetailCard renders a card with a header icon and content.

func DetailRow

func DetailRow(label, xTextValue string, icon g.Node) g.Node

DetailRow renders a label-value pair with an icon.

func DeviceBadge

func DeviceBadge(deviceType string) g.Node

DeviceBadge renders a device type badge.

func DeviceIcon

func DeviceIcon(xDeviceType string) g.Node

DeviceIcon returns an icon based on device type.

func DynamicStatusBadge

func DynamicStatusBadge() g.Node

DynamicStatusBadge renders a status badge that changes based on Alpine.js data.

func EmptyState

func EmptyState(icon g.Node, title, description string) g.Node

EmptyState renders an empty state message.

func ErrorMessage

func ErrorMessage(xShowCondition string) g.Node

ErrorMessage renders an error message.

func FilterSelect

func FilterSelect(label, xModel, onChange string, options []FilterOption) g.Node

FilterSelect renders a select dropdown for filtering.

func LoadingSpinner

func LoadingSpinner() g.Node

LoadingSpinner renders a loading spinner.

func PageHeader(title, description string, actions ...g.Node) g.Node

PageHeader renders a standard page header with title, description, and optional actions.

func PageHeaderWithBack

func PageHeaderWithBack(backHref, backText, title, description string, actions ...g.Node) g.Node

PageHeaderWithBack renders a page header with back navigation.

func Pagination

func Pagination(goToPageFn string) g.Node

Pagination renders pagination controls with Alpine.js.

func PrimaryButton

func PrimaryButton(href, text string, icon g.Node) g.Node

PrimaryButton creates a primary action button using ForgeUI.

func RefreshButton

func RefreshButton(loadFn string) g.Node

RefreshButton creates a refresh button with loading state.

func SearchInput

func SearchInput(placeholder, xModel, debounceAction string) g.Node

SearchInput renders a search input with Alpine.js binding.

func SecondaryButton

func SecondaryButton(href, text string, icon g.Node) g.Node

SecondaryButton creates a secondary action button.

func SessionDetailPage

func SessionDetailPage(currentApp *app.App, sessionID, basePath string) g.Node

SessionDetailPage renders the session detail page with dynamic data loading.

func SessionsListPage

func SessionsListPage(currentApp *app.App, basePath string) g.Node

SessionsListPage renders the sessions list page with dynamic data loading.

func SettingsPage

func SettingsPage(currentApp *app.App, basePath string) g.Node

SettingsPage renders the multisession settings page.

func StaticDetailRow

func StaticDetailRow(label, value string, icon g.Node) g.Node

StaticDetailRow renders a static label-value pair with an icon.

func StatsCard

func StatsCard(label, xDataValue, colorClass string, icon g.Node) g.Node

StatsCard renders a statistics card with dynamic value.

func StatusBadge

func StatusBadge(xShowCondition, status string) g.Node

StatusBadge renders a session status badge (active, expiring, expired).

func UserSessionsPage

func UserSessionsPage(currentApp *app.App, userID, basePath string) g.Node

UserSessionsPage renders all sessions for a specific user.

func ViewToggle

func ViewToggle(xModel string) g.Node

ViewToggle renders a grid/list view toggle.

Types

type FilterOption

type FilterOption struct {
	Value string
	Label string
}

FilterOption represents an option for a filter select.

Jump to

Keyboard shortcuts

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