Documentation
¶
Index ¶
- Variables
- func NewAddForm(hostname string, styles Styles, width, height int, configFile string) *addFormModel
- func NewEditForm(hostName string, styles Styles, width, height int, configFile string) (*editFormModel, error)
- func NewFileSelector(title string, styles Styles, width, height int) (*fileSelectorModel, error)
- func NewFileSelectorFromBase(title string, styles Styles, width, height int, baseConfigFile string) (*fileSelectorModel, error)
- func NewHelpForm(styles Styles, width, height int) *helpModel
- func NewInfoForm(hostName string, styles Styles, width, height int, configFile string) (*infoFormModel, error)
- func NewMoveForm(hostName string, styles Styles, width, height int, configFile string) (*moveFormModel, error)
- func NewPortForwardForm(hostName string, styles Styles, width, height int, configFile string, ...) *portForwardModel
- func RunAddForm(hostname string, configFile string) error
- func RunEditForm(hostName string, configFile string) error
- func RunInfoForm(hostName string, configFile string) error
- func RunInteractiveMode(hosts []config.SSHHost, configFile string, searchMode bool, ...) error
- func RunMoveForm(hostName string, configFile string) error
- type Model
- type PortForwardType
- type SortMode
- type Styles
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
var ( // Primary interface color - easily modifiable PrimaryColor = "#00ADD8" // Official Go logo blue color // Secondary colors SecondaryColor = "240" // Gray ErrorColor = "1" // Red SuccessColor = "36" // Green (for reference if needed) )
Theme colors
Functions ¶
func NewAddForm ¶
NewAddForm creates a new add form model
func NewEditForm ¶
func NewEditForm(hostName string, styles Styles, width, height int, configFile string) (*editFormModel, error)
NewEditForm creates a new edit form model that supports both single and multi-host editing
func NewFileSelector ¶
NewFileSelector creates a new file selector for choosing config files
func NewFileSelectorFromBase ¶
func NewFileSelectorFromBase(title string, styles Styles, width, height int, baseConfigFile string) (*fileSelectorModel, error)
NewFileSelectorFromBase creates a new file selector starting from a specific base config file
func NewHelpForm ¶
NewHelpForm creates a new help form model
func NewInfoForm ¶
func NewInfoForm(hostName string, styles Styles, width, height int, configFile string) (*infoFormModel, error)
NewInfoForm creates a new info form model for displaying host details in read-only mode
func NewMoveForm ¶
func NewMoveForm(hostName string, styles Styles, width, height int, configFile string) (*moveFormModel, error)
NewMoveForm creates a new move form for moving a host to another config file
func NewPortForwardForm ¶
func NewPortForwardForm(hostName string, styles Styles, width, height int, configFile string, historyManager *history.HistoryManager) *portForwardModel
NewPortForwardForm creates a new port forward form model
func RunAddForm ¶
RunAddForm provides backward compatibility for standalone add form
func RunEditForm ¶
RunEditForm runs the edit form as a standalone program
func RunInfoForm ¶
RunInfoForm provides a standalone info form for testing
func RunInteractiveMode ¶
func RunInteractiveMode(hosts []config.SSHHost, configFile string, searchMode bool, currentVersion string, noUpdateCheck bool) error
RunInteractiveMode starts the interactive TUI interface
func RunMoveForm ¶
RunMoveForm provides backward compatibility for standalone move form
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the state of the user interface
func NewModel ¶
func NewModel(hosts []config.SSHHost, configFile string, searchMode bool, currentVersion string, noUpdateCheck bool) Model
NewModel creates a new TUI model with the given SSH hosts
type PortForwardType ¶
type PortForwardType int
PortForwardType defines the type of port forwarding
const ( LocalForward PortForwardType = iota RemoteForward DynamicForward )
func (PortForwardType) String ¶
func (p PortForwardType) String() string
type Styles ¶
type Styles struct {
// Layout
App lipgloss.Style
Header lipgloss.Style
// Search styles
SearchFocused lipgloss.Style
SearchUnfocused lipgloss.Style
// Table styles
TableFocused lipgloss.Style
TableUnfocused lipgloss.Style
Selected lipgloss.Style
// Info and help styles
SortInfo lipgloss.Style
HelpText lipgloss.Style
// Error and confirmation styles
Error lipgloss.Style
ErrorText lipgloss.Style
// Form styles (for add/edit forms)
FormTitle lipgloss.Style
FormField lipgloss.Style
FormHelp lipgloss.Style
FormContainer lipgloss.Style
Label lipgloss.Style
FocusedLabel lipgloss.Style
HelpSection lipgloss.Style
}
Styles struct centralizes all lipgloss styles