view

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeViewCmd

func ChangeViewCmd(i int) tea.Cmd

func NewItemCreatedCmd

func NewItemCreatedCmd(i *Item) tea.Cmd

func NewNewItemView

func NewNewItemView(c *cfg.Cfg) newItemModel

Types

type BackupConfigView

type BackupConfigView struct {
	// contains filtered or unexported fields
}

func NewBackupConfigView

func NewBackupConfigView(c *cfg.Cfg) BackupConfigView

func (BackupConfigView) Init

func (m BackupConfigView) Init() tea.Cmd

func (BackupConfigView) Update

func (m BackupConfigView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (BackupConfigView) UpdateView

func (m BackupConfigView) UpdateView(msg tea.Msg) (BackupConfigView, tea.Cmd)

func (BackupConfigView) View

func (m BackupConfigView) View() string

type ChangeViewMsg

type ChangeViewMsg int

type Item

type Item struct {
	IsSelected bool
	// contains filtered or unexported fields
}

func NewItem

func NewItem(c *api.Config, info os.FileInfo, title, desc string) *Item

func (Item) Description

func (i Item) Description() string

func (Item) FilterValue

func (i Item) FilterValue() string

func (Item) Title

func (i Item) Title() string

type MainView

type MainView struct {
	List  list.Model
	Input textinput.Model
	// contains filtered or unexported fields
}

func NewMainView

func NewMainView(c *cfg.Cfg) MainView

func (*MainView) AddItem

func (r *MainView) AddItem(i *Item)

func (MainView) Init

func (r MainView) Init() tea.Cmd

func (*MainView) ListItems

func (r *MainView) ListItems() []list.Item

func (*MainView) ListItemsStr

func (r *MainView) ListItemsStr() []string

func (*MainView) SelectItem

func (r *MainView) SelectItem(i int)

func (MainView) Update

func (r MainView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (MainView) UpdateView

func (r MainView) UpdateView(ms tea.Msg) (MainView, tea.Cmd)

func (MainView) View

func (r MainView) View() string

type NewItemCreatedMsg

type NewItemCreatedMsg struct {
	Item *Item
}

Jump to

Keyboard shortcuts

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