mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2025-12-06 10:58:29 +01:00
Compare commits
1 Commits
8604a8f365
...
f28b2656e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f28b2656e2 |
@ -152,12 +152,6 @@ func RunInteractiveMode(hosts []config.SSHHost, configFile, currentVersion strin
|
|||||||
|
|
||||||
// Start the application in alt screen mode for clean output
|
// Start the application in alt screen mode for clean output
|
||||||
p := tea.NewProgram(m, tea.WithAltScreen())
|
p := tea.NewProgram(m, tea.WithAltScreen())
|
||||||
|
|
||||||
// Send initial command to start auto-ping when the program starts
|
|
||||||
go func() {
|
|
||||||
p.Send(autoPingMsg{})
|
|
||||||
}()
|
|
||||||
|
|
||||||
_, err := p.Run()
|
_, err := p.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error running TUI: %w", err)
|
return fmt.Errorf("error running TUI: %w", err)
|
||||||
|
|||||||
@ -20,7 +20,6 @@ type (
|
|||||||
versionCheckMsg *version.UpdateInfo
|
versionCheckMsg *version.UpdateInfo
|
||||||
versionErrorMsg error
|
versionErrorMsg error
|
||||||
errorMsg string
|
errorMsg string
|
||||||
autoPingMsg struct{}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// startPingAllCmd creates a command to ping all hosts concurrently
|
// startPingAllCmd creates a command to ping all hosts concurrently
|
||||||
@ -146,10 +145,6 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
}
|
}
|
||||||
return m, nil
|
return m, nil
|
||||||
|
|
||||||
case autoPingMsg:
|
|
||||||
// Handle auto-ping on startup - start pinging all hosts
|
|
||||||
return m, m.startPingAllCmd()
|
|
||||||
|
|
||||||
case versionCheckMsg:
|
case versionCheckMsg:
|
||||||
// Handle version check result
|
// Handle version check result
|
||||||
if msg != nil {
|
if msg != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user