Configure full Docker setup and confirm consequential actions

This commit is contained in:
2026-10-09 21:34:47 +01:00
parent f60599230c
commit f700d1beb2
31 changed files with 587 additions and 49 deletions
+8 -3
View File
@@ -132,6 +132,7 @@ type Model struct {
versionsOpen bool
versionIndex int
confirmOpen bool
actionConfirm *protocol.Message
pendingDraft *editedMsg
submitID string
submitNotice string
@@ -192,7 +193,7 @@ func New(ctx context.Context, url string) Model {
enter: key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "continue")),
cancel: key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "cancel")),
ping: key.NewBinding(key.WithKeys("t"), key.WithHelp("t", "test ping")),
quit: key.NewBinding(key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit")),
quit: key.NewBinding(key.WithKeys(":quit"), key.WithHelp(":quit", "quit")),
},
}
}
@@ -486,6 +487,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if msg.String() == "ctrl+c" {
return m, tea.Quit
}
if m.actionConfirm != nil {
return m.updateActionConfirm(msg)
}
if m.editorChecking {
return m, nil
}
@@ -547,8 +551,6 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.commandInput.SetValue(":")
}
return m, m.commandInput.Focus()
case m.homePage() && key.Matches(msg, m.keys.quit):
return m, tea.Quit
case m.homePage() && key.Matches(msg, m.keys.create):
if m.conn == nil {
m.appendLine("not connected")
@@ -712,6 +714,9 @@ func (m Model) View() string {
if m.statusOpen {
content = m.statusView(bodyHeight)
}
if m.actionConfirm != nil {
content = m.actionConfirmView(bodyHeight)
}
if m.editorChecking {
content = popup(m.width, bodyHeight, 76, []string{"Checking published edits", m.loading("Refreshing pipeline information…"), "Local draft remains retained."})
}