Files
spilltea/internal/ui/docs/model.go
T
2026-05-12 19:12:29 +02:00

38 lines
597 B
Go

package docs
import (
"strings"
spilltea "github.com/anotherhadi/spilltea"
"charm.land/bubbles/v2/viewport"
tea "charm.land/bubbletea/v2"
)
func readDoc(name string) string {
b, _ := spilltea.DocsFS.ReadFile(".github/docs/" + name)
return string(b)
}
var contentMarkdown = strings.Join([]string{
readDoc("main.md"),
readDoc("proxy.md"),
readDoc("certificate.md"),
readDoc("history.md"),
readDoc("scopes.md"),
}, "\n")
type Model struct {
viewport viewport.Model
}
func New() Model {
return Model{
viewport: viewport.New(),
}
}
func (e Model) Init() tea.Cmd {
return nil
}