seperate dns retrieval into its own model
This commit is contained in:
parent
ef2dbcede5
commit
a6bcb9be38
5 changed files with 179 additions and 72 deletions
|
|
@ -51,10 +51,9 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
if !m.loading && msg.String() == "esc" {
|
||||
m.loading = false
|
||||
m.domains = nil
|
||||
return m, func() tea.Msg {
|
||||
m.loading = false
|
||||
m.domains = nil
|
||||
m.client = nil
|
||||
return messages.SwitchPageMsg{Page: messages.PageMenu}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue