Documentation
¶
Index ¶
- Constants
- func NewKeymapChangesModel(changes *importapi.KeymapChanges, confirm *bool) tea.Model
- func NewKeymapViewModel(setting *keymapv1.Keymap, mc *mappings.MappingConfig, filePath string) tea.Model
- type ActionDetailsViewModel
- type ExportFormModel
- type FileChangedMsg
- type FileErrorMsg
- type ImportFormModel
- type KeymapViewModel
- type MigrateFormModel
- type TelemetryPromptModel
- type ValidationReportModel
Constants ¶
View Source
const ( IssuePaddingLeft = 2 OptionPadding = 2 )
Color constants used across TUI components
Variables ¶
This section is empty.
Functions ¶
func NewKeymapChangesModel ¶
func NewKeymapChangesModel(changes *importapi.KeymapChanges, confirm *bool) tea.Model
func NewKeymapViewModel ¶
Types ¶
type ActionDetailsViewModel ¶ added in v0.3.0
type ActionDetailsViewModel struct {
// contains filtered or unexported fields
}
func (*ActionDetailsViewModel) View ¶ added in v0.3.0
func (d *ActionDetailsViewModel) View() string
type ExportFormModel ¶ added in v0.2.0
type ExportFormModel struct {
Editor *string
OnekeymapConfigInput *string
EditorKeymapConfigOutput *string
OnekeymapConfigPlaceHolder string
// contains filtered or unexported fields
}
ExportFormModel collects inputs for exporting onekeymap.json to a target editor.
func NewOutputFormModel ¶
func (*ExportFormModel) Init ¶ added in v0.2.0
func (m *ExportFormModel) Init() tea.Cmd
func (*ExportFormModel) View ¶ added in v0.2.0
func (m *ExportFormModel) View() string
type FileChangedMsg ¶ added in v0.4.0
type FileChangedMsg struct {
Path string
}
FileChangedMsg is sent when the watched file changes
type FileErrorMsg ¶ added in v0.4.0
type FileErrorMsg struct {
Err error
}
FileErrorMsg is sent when there's an error watching the file
type ImportFormModel ¶ added in v0.2.0
type ImportFormModel struct {
Editor *string
EditorKeymapConfigInput *string
OnekeymapConfigOutput *string
OnekeymapConfigPlaceHolder string
// contains filtered or unexported fields
}
ImportFormModel represents the import form UI model.
func NewImportFormModel ¶
func (*ImportFormModel) Init ¶ added in v0.2.0
func (m *ImportFormModel) Init() tea.Cmd
Init initializes the import form model.
func (*ImportFormModel) View ¶ added in v0.2.0
func (m *ImportFormModel) View() string
type KeymapViewModel ¶
type KeymapViewModel struct {
// contains filtered or unexported fields
}
KeymapViewModel is a read-only TUI model to present current OneKeymapSetting.
func (*KeymapViewModel) Init ¶
func (m *KeymapViewModel) Init() tea.Cmd
func (*KeymapViewModel) View ¶
func (m *KeymapViewModel) View() string
type MigrateFormModel ¶
type MigrateFormModel struct {
EditorFrom *string
EditorTo *string
Input *string
Output *string
// contains filtered or unexported fields
}
func NewMigrateFormModel ¶
func NewMigrateFormModel(registry *plugins.Registry, from, to, input, output *string) *MigrateFormModel
func (*MigrateFormModel) Init ¶
func (m *MigrateFormModel) Init() tea.Cmd
func (*MigrateFormModel) View ¶
func (m *MigrateFormModel) View() string
type TelemetryPromptModel ¶ added in v0.5.0
type TelemetryPromptModel struct {
// contains filtered or unexported fields
}
TelemetryPromptModel represents the telemetry consent prompt
func NewTelemetryPrompt ¶ added in v0.5.0
func NewTelemetryPrompt() TelemetryPromptModel
NewTelemetryPrompt creates a new telemetry prompt model
func (TelemetryPromptModel) GetChoice ¶ added in v0.5.0
func (m TelemetryPromptModel) GetChoice() bool
GetChoice returns the user's choice: true for enabled, false for disabled
func (TelemetryPromptModel) Init ¶ added in v0.5.0
func (m TelemetryPromptModel) Init() tea.Cmd
func (TelemetryPromptModel) View ¶ added in v0.5.0
func (m TelemetryPromptModel) View() string
func (TelemetryPromptModel) WasSelected ¶ added in v0.5.0
func (m TelemetryPromptModel) WasSelected() bool
WasSelected returns whether the user made a selection (vs quitting)
type ValidationReportModel ¶
type ValidationReportModel struct {
// contains filtered or unexported fields
}
func NewValidationReportModel ¶
func NewValidationReportModel(report *keymapv1.ValidationReport) ValidationReportModel
func (ValidationReportModel) Init ¶
func (m ValidationReportModel) Init() tea.Cmd
func (ValidationReportModel) View ¶
func (m ValidationReportModel) View() string
Click to show internal directories.
Click to hide internal directories.