views

package
v0.0.0-...-5c9b693 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MaxAutoJoinNetworkLength = 64
View Source
const MaxRemarkLength = 64

Variables

This section is empty.

Functions

func CreateActionListView

func CreateActionListView() list.Model

func CreatePlanetListView

func CreatePlanetListView(cfg *configs.ZerotierSwitcherProfile) list.Model

func CreateRemarkInput

func CreateRemarkInput(placeholder string, textLimit int) textinput.Model

func RenderActionListItem

func RenderActionListItem(pItem PlanetItem, deleteAble bool) []list.Item

func RenderPlanetListItem

func RenderPlanetListItem(planets []configs.ZerotierPlanetFile) []list.Item

Types

type ActionItem

type ActionItem struct {
	Id   string
	Name string
	Desc string
}

func (ActionItem) Description

func (i ActionItem) Description() string

func (ActionItem) FilterValue

func (i ActionItem) FilterValue() string

func (ActionItem) Title

func (i ActionItem) Title() string

type AppViewModel

type AppViewModel struct {
	IsRunAsRoot bool
	Program     *tea.Program
	// contains filtered or unexported fields
}

func (AppViewModel) Init

func (m AppViewModel) Init() tea.Cmd

func (AppViewModel) Update

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

func (AppViewModel) View

func (m AppViewModel) View() string

type PlanetItem

type PlanetItem struct {
	Planet    *configs.ZerotierPlanetFile
	Id        string
	Name      string
	Desc      string
	IsCurrent bool
}

func (PlanetItem) Description

func (i PlanetItem) Description() string

func (PlanetItem) FilterValue

func (i PlanetItem) FilterValue() string

func (PlanetItem) Title

func (i PlanetItem) Title() string

Jump to

Keyboard shortcuts

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