Documentation
¶
Index ¶
- Constants
- Variables
- type ModalFormData
- type Styles
- func (s *Styles) RenderAddHostModal(width, height int, form *ModalFormData, isEdit bool) string
- func (s *Styles) RenderDeleteGroupModal(width, height int, groupName string, hostCount int, deleteFocused bool) string
- func (s *Styles) RenderDeleteModal(width, height int, hostname, username string, confirmed bool) string
- func (s *Styles) RenderFooter(width int, err error) string
- func (s *Styles) RenderFooterWithSync(width int, err error, syncStatus string, syncActivity *SyncActivity) string
- func (s *Styles) RenderGroupInputModal(width, height int, title string, input textinput.Model, submitLabel string, ...) string
- func (s *Styles) RenderHeader(width int, searchQuery string, isSearching bool) string
- func (s *Styles) RenderHelpView(width, height int) string
- func (s *Styles) RenderHostDetails(hostsInterface []interface{}, selectedIdx int, width int, height int) string
- func (s *Styles) RenderHostList(hostsInterface []interface{}, selectedIdx int, width int, height int) string
- func (s *Styles) RenderListView(width, height int, hostsInterface interface{}, selectedIdx int, ...) string
- func (s *Styles) RenderListViewWithSync(width, height int, hostsInterface interface{}, selectedIdx int, ...) string
- func (s *Styles) RenderLoginView(width, height int, input textinput.Model, err error) string
- func (s *Styles) RenderQuitModal(width, height int, mounts []string, focus int) string
- func (s *Styles) RenderSettingsView(width, height int, cfg config.Config, updateState UpdateSettingsState, ...) string
- func (s *Styles) RenderSetupView(width, height int, passwordInput, confirmInput textinput.Model, focus int, ...) string
- func (s *Styles) RenderSpotlight(width, height int, input textinput.Model, results []interface{}, ...) string
- func (s *Styles) RenderTokenManagerView(width, height int, tokens []TokenManagerTokenRow, hosts []TokenManagerHostRow, ...) string
- func (s *Styles) RenderView(viewMode string, width, height int, hosts interface{}, selectedIdx int, ...) string
- type SyncActivity
- type TokenManagerHostRow
- type TokenManagerTokenRow
- type UpdateSettingsState
Constants ¶
const ( FieldLabel = iota FieldGroup FieldTags FieldHostname FieldPort // Moved Port up FieldUsername FieldAuthMethod FieldAuthDetails // Password or Key details FieldSubmit FieldCancel // Legacy constants for compatibility if needed, but we reordered FieldKeyOption = 99 FieldKeyType = 100 FieldPastedKey = 101 )
FormField represents individual form fields
const ( AuthPassword = iota AuthKeyPaste AuthKeyGen )
Auth Methods
Variables ¶
var ( // Primary colors ColorPrimary = lipgloss.Color("#7C3AED") // Purple ColorSecondary = lipgloss.Color("#06B6D4") // Cyan ColorAccent = lipgloss.Color("#10B981") // Green ColorDanger = lipgloss.Color("#EF4444") // Red ColorWarning = lipgloss.Color("#F59E0B") // Amber // Neutral colors ColorText = lipgloss.Color("#E5E7EB") // Light gray ColorTextDim = lipgloss.Color("#9CA3AF") // Medium gray ColorBorder = lipgloss.Color("#4B5563") // Dark gray ColorBg = lipgloss.Color("#1F2937") // Very dark gray ColorBgAlt = lipgloss.Color("#111827") // Almost black )
Color palette
Functions ¶
This section is empty.
Types ¶
type ModalFormData ¶
type ModalFormData struct {
Label textinput.Model
Group textinput.Model
Tags textinput.Model
GroupOptions []string
GroupIndex int
Hostname textinput.Model
Username textinput.Model
Port textinput.Model
AuthMethod int // 0=Password, 1=Key File, 2=Generate
Password textinput.Model
KeyOption string // Legacy
KeyType string // "ed25519", "rsa", "ecdsa"
PastedKey textarea.Model
FocusedField int
TitleSuffix string // Debug or status info
}
ModalFormData holds the form state for add/edit modals
type Styles ¶
type Styles struct {
// Layout
App lipgloss.Style
Header lipgloss.Style
Panel lipgloss.Style
PanelBorder lipgloss.Style
// List
ListItem lipgloss.Style
ListItemSelected lipgloss.Style
ListHeader lipgloss.Style
// Details
DetailLabel lipgloss.Style
DetailValue lipgloss.Style
DetailRow lipgloss.Style
// Status indicators
StatusReady lipgloss.Style
StatusWarning lipgloss.Style
StatusError lipgloss.Style
// Help/Keybindings
HelpKey lipgloss.Style
HelpValue lipgloss.Style
HelpSep lipgloss.Style
// Modal
Modal lipgloss.Style
ModalTitle lipgloss.Style
ModalOverlay lipgloss.Style
// Spotlight
Spotlight lipgloss.Style
SpotlightInput lipgloss.Style
SpotlightItem lipgloss.Style
SpotlightSelected lipgloss.Style
// Login
LoginBox lipgloss.Style
// Form
FormLabel lipgloss.Style
FormInput lipgloss.Style
FormInputFocused lipgloss.Style
FormButton lipgloss.Style
FormButtonFocused lipgloss.Style
// General
Title lipgloss.Style
Subtitle lipgloss.Style
Error lipgloss.Style
Success lipgloss.Style
Info lipgloss.Style
Warning lipgloss.Style
}
Styles defines all UI styles
func NewStyles ¶
func NewStyles() *Styles
NewStyles creates a new Styles instance with default styling
func (*Styles) RenderAddHostModal ¶
func (s *Styles) RenderAddHostModal(width, height int, form *ModalFormData, isEdit bool) string
RenderAddHostModal renders the add/edit host modal
func (*Styles) RenderDeleteGroupModal ¶ added in v1.0.2
func (s *Styles) RenderDeleteGroupModal(width, height int, groupName string, hostCount int, deleteFocused bool) string
RenderDeleteGroupModal renders group delete confirmation.
func (*Styles) RenderDeleteModal ¶
func (s *Styles) RenderDeleteModal(width, height int, hostname, username string, confirmed bool) string
RenderDeleteModal renders the delete confirmation modal
func (*Styles) RenderFooter ¶
RenderFooter renders the footer with keybindings
func (*Styles) RenderFooterWithSync ¶
func (s *Styles) RenderFooterWithSync(width int, err error, syncStatus string, syncActivity *SyncActivity) string
RenderFooterWithSync renders the footer with keybindings and optional sync status
func (*Styles) RenderGroupInputModal ¶ added in v1.0.2
func (s *Styles) RenderGroupInputModal(width, height int, title string, input textinput.Model, submitLabel string, focus int) string
RenderGroupInputModal renders a simple text-input modal for creating/renaming groups. focus: 0=input, 1=submit, 2=cancel
func (*Styles) RenderHeader ¶
RenderHeader renders the header bar
func (*Styles) RenderHelpView ¶
RenderHelpView renders the help screen
func (*Styles) RenderHostDetails ¶
func (s *Styles) RenderHostDetails(hostsInterface []interface{}, selectedIdx int, width int, height int) string
RenderHostDetails renders the right panel with selected host details
func (*Styles) RenderHostList ¶
func (s *Styles) RenderHostList(hostsInterface []interface{}, selectedIdx int, width int, height int) string
RenderHostList renders the left panel with the list of hosts
func (*Styles) RenderListView ¶
func (s *Styles) RenderListView(width, height int, hostsInterface interface{}, selectedIdx int, searchQuery string, isSearching bool, err error) string
RenderListView renders the main two-panel layout
func (*Styles) RenderListViewWithSync ¶
func (s *Styles) RenderListViewWithSync(width, height int, hostsInterface interface{}, selectedIdx int, searchQuery string, isSearching bool, err error, syncStatus string, syncActivity *SyncActivity) string
RenderListViewWithSync renders the main two-panel layout with sync status
func (*Styles) RenderLoginView ¶
RenderLoginView renders the master password login screen
func (*Styles) RenderQuitModal ¶
RenderQuitModal renders a quit confirmation modal when mounts are active. focus: 0=Unmount&Quit, 1=Leave Mounted&Quit, 2=Cancel
func (*Styles) RenderSettingsView ¶
func (*Styles) RenderSetupView ¶
func (s *Styles) RenderSetupView(width, height int, passwordInput, confirmInput textinput.Model, focus int, err error) string
RenderSetupView renders the first-run password setup screen
func (*Styles) RenderSpotlight ¶
func (s *Styles) RenderSpotlight(width, height int, input textinput.Model, results []interface{}, selectedIdx int, armedSFTP bool, armedMount bool, armedUnmount bool) string
RenderSpotlight renders the Raycast-like search overlay
func (*Styles) RenderTokenManagerView ¶ added in v1.0.5
func (s *Styles) RenderTokenManagerView(width, height int, tokens []TokenManagerTokenRow, hosts []TokenManagerHostRow, tokenIdx int, hostIdx int, createNameMode bool, createScopeMode bool, selectedHostIDs map[int]bool, nameInput textinput.Model, revealOpen bool, revealValue string, revealCopied bool, err error) string