Documentation
¶
Overview ¶
Package tui provides the terminal user interface for the Wits application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
"➕ Add Device",
"📋 View Devices",
"✏️ Edit Device",
"❌ Remove Device"}
DevicesSubmenu is a list of options for the devices submenu.
var MainMenu = []string{
"🌿 Strains",
"🚀 Devices",
"🔧 Settings",
"📊 Stats"}
MainMenu is a list of options for the main menu.
"🎨 Appearance",
"⌨️ Keybindings",
"🌍 Localization",
"💾 Backup & Restore"}
SettingsSubmenu is a list of options for the settings submenu.
"📅 Usage History",
"📈 Trends",
"🔢 Dosage Tracker"}
StatsSubmenu is a list of options for the stats submenu.
"➕ Add Strain",
"📋 View Strains",
"✏️ Edit Strain",
"❌ Remove Strain"}
StrainsSubmenu is a list of options for the strains submenu.
Functions ¶
Types ¶
type MenuModel ¶
MenuModel is the model for the main menu.
func InitialMenuModel ¶
func InitialMenuModel(sSvc service.StrainService, sStr storage.StrainStore) MenuModel
InitialMenuModel returns the initial model for the main menu.
func (MenuModel) Init ¶
Init is the first function that will be called. It returns an optional initial command. To not perform an initial command return nil.
type StrainsListItem ¶
type StrainsListItem struct {
// contains filtered or unexported fields
}
StrainsListItem is a list item for strains.
func (StrainsListItem) Description ¶
func (sli StrainsListItem) Description() string
Description returns the description for the list item.
func (StrainsListItem) FilterValue ¶
func (sli StrainsListItem) FilterValue() string
FilterValue returns the filter value for the list item.
func (StrainsListItem) Title ¶
func (sli StrainsListItem) Title() string
Title returns the title for the list item.
type StrainsListModel ¶
type StrainsListModel struct {
// contains filtered or unexported fields
}
StrainsListModel is a model for the strains list.
func ListStrains ¶
func ListStrains(svc service.StrainService) *StrainsListModel
ListStrains creates a new model for the strains list.
func (StrainsListModel) Init ¶
func (slm StrainsListModel) Init() tea.Cmd
Init initializes the strains list model.
func (StrainsListModel) View ¶
func (slm StrainsListModel) View() string
View renders the strains list model.