mirror of
https://github.com/Adembc/lazyssh.git
synced 2026-07-14 12:13:34 +02:00
feat(ui): remove splash screen and confirm ssh modal (#23)
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@@ -65,7 +63,8 @@ func (t *tui) Run() error {
|
||||
}
|
||||
}()
|
||||
t.app.EnableMouse(true)
|
||||
t.initializeTheme().buildComponents().buildLayout().bindEvents().loadInitialData().loadSplashScreen()
|
||||
t.initializeTheme().buildComponents().buildLayout().bindEvents().loadInitialData()
|
||||
t.app.SetRoot(t.root, true)
|
||||
t.logger.Infow("starting TUI application", "version", t.version, "commit", t.commit)
|
||||
if err := t.app.Run(); err != nil {
|
||||
t.logger.Errorw("application run error", "error", err)
|
||||
@@ -141,15 +140,3 @@ func (t *tui) updateListTitle() {
|
||||
t.serverList.SetTitle("Servers — Sort: " + t.sortMode.String())
|
||||
}
|
||||
}
|
||||
|
||||
func (t *tui) loadSplashScreen() *tui {
|
||||
splash, stop := buildSplash(t.app)
|
||||
t.app.SetRoot(splash, true)
|
||||
time.AfterFunc(SplashScreenDuration, func() {
|
||||
stop()
|
||||
t.app.QueueUpdateDraw(func() {
|
||||
t.app.SetRoot(t.root, true)
|
||||
})
|
||||
})
|
||||
return t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user