profileui

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateProfile = "CreateProfile"
	EditProfile   = "EditProfile"
	RenameProfile = "RenameProfile"
	DeleteProfile = "DeleteProfile"
	CopyProfile   = "CopyProfile"
)
View Source
const (
	CreateProfileLabel = "" /* 293-byte string literal not displayed */
	RenameProfileLabel = "Rename your profile"
	CopyProfileLabel   = "Choose a name to your profile"
)

Variables

This section is empty.

Functions

func CreateChangeCmd

func CreateChangeCmd() tea.Cmd

func InitStyle

func InitStyle(theme *styles.Theme, commonStyles *styles.CommonStyle)

Types

type ActiveView

type ActiveView int
const (
	List ActiveView = iota
	Prompt
	Preview
)

type CopyProfileMsg

type CopyProfileMsg struct {
	Profile Profile
}

type CreateProfileFinishedMsg

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

type CreateProfileMsg

type CreateProfileMsg struct{}

type DeleteProfileMsg

type DeleteProfileMsg struct {
	Profile Profile
}

type EditProfileFinishedMsg

type EditProfileFinishedMsg struct {
	Profile Profile
	// contains filtered or unexported fields
}

type EditProfileMsg

type EditProfileMsg struct {
	Profile Profile
}

type Mode

type Mode int
const (
	Normal Mode = iota
	Embedded
)

type Model

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

func New

func New(loadedProfiles []*model.Profile) Model

func NewEmbedded

func NewEmbedded(loadedProfiles []*model.Profile, winWidth, winHeight int, wPercent, hPercent float64) Model

func (*Model) GetHelpKeys added in v1.3.0

func (m *Model) GetHelpKeys() help.KeyMap

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetSize

func (m *Model) SetSize(w, h int)

func (Model) Update

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

func (Model) View

func (m Model) View() string

type PreviewProfileMsg

type PreviewProfileMsg struct {
	Profile Profile
}

type Profile

type Profile struct {
	Name             string
	Variables        int
	PrivateVariables int
	OsEnvVariables   int
	ProfileModel     *model.Profile
}

func (Profile) Description

func (i Profile) Description() string

func (Profile) FilterValue

func (i Profile) FilterValue() string

func (Profile) Title

func (i Profile) Title() string

type ProfileSelectCancelledMsg

type ProfileSelectCancelledMsg struct{}

type ProfileSelectedMsg

type ProfileSelectedMsg struct {
	Profile Profile
}

type ProfilesChangedMsg

type ProfilesChangedMsg struct{}

type RenameProfileMsg

type RenameProfileMsg struct {
	Profile Profile
}

type Styles

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

Jump to

Keyboard shortcuts

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