mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Cleanup styling spinner and tui-daemon-combo examples
This commit is contained in:
@@ -10,11 +10,8 @@ import (
|
||||
"github.com/charmbracelet/bubbles/spinner"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/muesli/termenv"
|
||||
)
|
||||
|
||||
var color = termenv.ColorProfile().Color
|
||||
|
||||
type errMsg error
|
||||
|
||||
type model struct {
|
||||
@@ -62,8 +59,7 @@ func (m model) View() string {
|
||||
if m.err != nil {
|
||||
return m.err.Error()
|
||||
}
|
||||
s := termenv.String(m.spinner.View()).Foreground(color("205")).String()
|
||||
str := fmt.Sprintf("\n\n %s Loading forever...press q to quit\n\n", s)
|
||||
str := fmt.Sprintf("\n\n %s Loading forever...press q to quit\n\n", m.spinner.View())
|
||||
if m.quitting {
|
||||
return str + "\n"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user