content

package
v0.0.0-...-dbf0fce Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMorenotesToListItems

func ConvertMorenotesToListItems(notes []models.Morenote) []list.Item

func ConvertNotesToListItems

func ConvertNotesToListItems(notes []models.Note) []list.Item

Helper function to get the list items from our notes list

func GetMorenotesCreationForm

func GetMorenotesCreationForm() *huh.Form

func GetMorenotesEditForm

func GetMorenotesEditForm(title *string, content *string) *huh.Form

func GetMorenotesRemoveForm

func GetMorenotesRemoveForm() *huh.Form

func GetNotesCreationForm

func GetNotesCreationForm() *huh.Form

func GetNotesEditForm

func GetNotesEditForm(title *string, content *string) *huh.Form

func GetNotesRemoveForm

func GetNotesRemoveForm() *huh.Form

Types

type CredCardModel

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

func NewCreditCardModel

func NewCreditCardModel(pubKey ssh.PublicKey, style lipgloss.Style, width int, explanation string) CredCardModel

func (CredCardModel) Init

func (m CredCardModel) Init() tea.Cmd

func (CredCardModel) Update

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

func (CredCardModel) View

func (m CredCardModel) View() string

type MorenotesModel

type MorenotesModel struct {
	PubKey        ssh.PublicKey
	List          list.Model
	MorenotesList []models.Morenote
	DocStyle      lipgloss.Style
	HelpStyle     lipgloss.Style
	Width         int
	IsFormMode    bool
	IsCreating    bool
	IsRemoving    bool
	IsEditing     bool
	ActiveForm    *huh.Form
	// contains filtered or unexported fields
}

func (MorenotesModel) HandleForms

func (m MorenotesModel) HandleForms(commands []tea.Cmd, msg tea.Msg) (MorenotesModel, tea.Cmd)

func (MorenotesModel) Init

func (m MorenotesModel) Init() tea.Cmd

func (MorenotesModel) Update

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

func (MorenotesModel) View

func (m MorenotesModel) View() string
type NavBarModel struct {
	NavKey           string
	ActiveTab        int
	NavItems         []NavItem
	AllNavItems      []NavItem
	NavBarStyle      lipgloss.Style
	CommandStyle     lipgloss.Style
	NavTextStyle     lipgloss.Style
	ActiveStyle      lipgloss.Style
	InactiveStyle    lipgloss.Style
	Width            int
	Height           int
	NavItemWidth     int
	UseActiveScaling bool
	CommandLookup    []string
	AllCommandLookup []string
}
func (m NavBarModel) Init() tea.Cmd
func (m NavBarModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (m NavBarModel) UpdateNav(indices []int) NavBarModel

We hold all available content If something changes need to be able to update what we can see in the nav

func (m NavBarModel) View() string
type NavItem struct {
	Command string
	NavText string
}

type NotesModel

type NotesModel struct {
	PubKey     ssh.PublicKey
	List       list.Model
	NotesList  []models.Note
	DocStyle   lipgloss.Style
	HelpStyle  lipgloss.Style
	Width      int
	IsFormMode bool
	IsCreating bool
	IsRemoving bool
	IsEditing  bool
	ActiveForm *huh.Form
	// contains filtered or unexported fields
}

func (NotesModel) HandleForms

func (m NotesModel) HandleForms(commands []tea.Cmd, msg tea.Msg) (NotesModel, tea.Cmd)

Our logic related to the form update

func (NotesModel) Init

func (m NotesModel) Init() tea.Cmd

func (NotesModel) Update

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

func (NotesModel) View

func (m NotesModel) View() string

type RegisterModel

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

func NewRegisterModel

func NewRegisterModel(pubKey ssh.PublicKey, style lipgloss.Style, width int, explanation string) RegisterModel

func (RegisterModel) Init

func (m RegisterModel) Init() tea.Cmd

func (RegisterModel) Update

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

func (RegisterModel) View

func (m RegisterModel) View() string

type TextModel

type TextModel struct {
	User     models.User
	Width    int
	Text     string
	TxtStyle lipgloss.Style
}

func (TextModel) Init

func (m TextModel) Init() tea.Cmd

func (TextModel) Update

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

func (TextModel) View

func (m TextModel) View() string

Jump to

Keyboard shortcuts

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