Documentation
¶
Overview ¶
Package popup holds cdnscli UI elements for editing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelMsg ¶
type CancelMsg struct{}
CancelMsg is a tea.Msg signaling that editing was canceled.
type ConfirmDeleteMsg ¶
type ConfirmDeleteMsg struct{}
ConfirmDeleteMsg is a tea.Msg signaling that deletion was confirmed.
type Model ¶
type Model struct {
ColumnNames []string // Названия столбцов
Fields []string // Поля для редактирования
Cursor int // Текущий индекс поля
CharPos int // Позиция курсора в текущем поле
IsActive bool // Активно ли окно
Title string // Заголовок окна
SaveAction func([]string) tea.Msg // Действие при сохранении
CancelMsg tea.Msg // Сообщение при отмене
// Mode-specific state: NameServers list editor
Mode string // "default" | "nslist" | "confirm"
ListValues []string // values for list mode
ListCursor int // cursor for list mode
// Confirm dialog state
ConfirmIndex int // 0 => Yes, 1 => No
// contains filtered or unexported fields
}
Model implements tea.Model and represents the popup editor state.
func New ¶
func New(columnNames []string, fields []string, title string, saveAction func([]string) tea.Msg, cancelMsg tea.Msg) *Model
New constructs a popup editor Model.
func NewConfirmDialog ¶
NewConfirmDialog constructs popup Model in confirmation mode.
func NewNameServersEditor ¶
NewNameServersEditor constructs popup Model in list-edit mode for NS values.
type SaveActionMsg ¶
type SaveActionMsg struct {
Fields []string // Поля, которые были отредактированы
}
SaveActionMsg is a tea.Msg signaling that edited fields should be saved.
type SaveNameServersMsg ¶
type SaveNameServersMsg struct {
Servers []string
}
SaveNameServersMsg is a tea.Msg signaling that NS list should be saved.
Click to show internal directories.
Click to hide internal directories.