views

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeymapChangesModel

func NewKeymapChangesModel(changes *importapi.KeymapChanges, confirm *bool) tea.Model

func NewKeymapViewModel

func NewKeymapViewModel(setting *keymapv1.Keymap, mc *mappings.MappingConfig) tea.Model

Types

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 NewOutputFormModel(
	registry *plugins.Registry,
	needSelectEditor, needInput, needOutput bool,
	editor, onekeymapConfigInput, editorKeymapConfigOutput *string,
	onekeymapConfigPlaceHolder string,
) (*ExportFormModel, error)

func (*ExportFormModel) Init added in v0.2.0

func (m *ExportFormModel) Init() tea.Cmd

func (*ExportFormModel) Update added in v0.2.0

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

func (*ExportFormModel) View added in v0.2.0

func (m *ExportFormModel) View() string

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 NewImportFormModel(
	registry *plugins.Registry,
	needSelectEditor, needInput, needOutput bool,
	editor, editorKeymapConfigInput, onekeymapConfigOutput *string,
	onekeymapConfigPlaceHolder string,
) (*ImportFormModel, error)

func (*ImportFormModel) Init added in v0.2.0

func (m *ImportFormModel) Init() tea.Cmd

Init initializes the import form model.

func (*ImportFormModel) Update added in v0.2.0

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

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) Update

func (m *KeymapViewModel) Update(msg tea.Msg) (tea.Model, 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) Update

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

func (*MigrateFormModel) View

func (m *MigrateFormModel) View() string

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) Update

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

func (ValidationReportModel) View

func (m ValidationReportModel) View() string

Jump to

Keyboard shortcuts

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