912de2f79257b324e049faab7564c7e4d3d029b2
- Author
- Toby Padilla <toby@charm.sh>
- Committer
- Toby Padilla <toby@charm.sh>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/tui/bubble.go b/tui/bubble.go
2index 51109f08b1f5b99a14298d08cff1df132ecafd42..e961ab51bc510110cfe564e307e4e679e5502bbb 100644
3--- a/tui/bubble.go
4+++ b/tui/bubble.go
5@@ -24,19 +24,21 @@ const (
6 quitState
7 )
8
9-type MenuEntry struct {
10- Name string `json:"name"`
11- Note string `json:"note"`
12- Repo string `json:"repo"`
13-}
14-
15 type Config struct {
16 Name string `json:"name"`
17+ Host string `json:"host"`
18+ Port int64 `json:"port"`
19 ShowAllRepos bool `json:"show_all_repos"`
20 Menu []MenuEntry `json:"menu"`
21 RepoSource *git.RepoSource
22 }
23
24+type MenuEntry struct {
25+ Name string `json:"name"`
26+ Note string `json:"note"`
27+ Repo string `json:"repo"`
28+}
29+
30 type SessionConfig struct {
31 Width int
32 Height int
33diff --git a/tui/bubbles/repo/bubble.go b/tui/bubbles/repo/bubble.go
34index 45dba827efa893fa0903a4bf6a90f6a7a28adc8b..dbfd40e0b104bbfbc727ab6fab5ee45207d2906b 100644
35--- a/tui/bubbles/repo/bubble.go
36+++ b/tui/bubbles/repo/bubble.go
37@@ -41,7 +41,13 @@ func (b *Bubble) Init() tea.Cmd {
38 }
39
40 func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
41- return b.readmeViewport.Update(msg)
42+ var cmds []tea.Cmd
43+ rv, cmd := b.readmeViewport.Update(msg)
44+ b.readmeViewport = rv.(*ViewportBubble)
45+ if cmd != nil {
46+ cmds = append(cmds, cmd)
47+ }
48+ return b, tea.Batch(cmds...)
49 }
50
51 func (b *Bubble) View() string {
52diff --git a/tui/defaults.go b/tui/defaults.go
53index 4d31c6c5157f4578bee167bfe94802f76493c521..eea8af3caa4c6d8e8d3f961f200fe51aeb63fce2 100644
54--- a/tui/defaults.go
55+++ b/tui/defaults.go
56@@ -9,16 +9,18 @@ import (
57 "github.com/go-git/go-git/v5/plumbing/object"
58 )
59
60-const defaultReadme = "# Smoothie\nWelcome to Smoothie. To setup your own configuration, please clone this repo."