repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
6a5926c
parent
4a82d8e
author
Eric Bower
date
2024-05-17 15:40:50 +0000 UTC
chore: cleanup
1 files changed,  +7, -1
M tui/ui.go
+7, -1
 1@@ -65,6 +65,8 @@ func (m *UI) updateModels(msg tea.Msg) tea.Cmd {
 2 }
 3 
 4 func (m *UI) Init() tea.Cmd {
 5+	// header height is required to calculate viewport for
 6+	// some pages
 7 	m.shared.HeaderHeight = lipgloss.Height(m.header())
 8 	user, err := findUser(m.shared)
 9 	if err != nil {
10@@ -118,6 +120,7 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
11 
12 	// user created account
13 	case createaccount.CreateAccountMsg:
14+		// reset model and pages
15 		return m, m.Init()
16 
17 	case menu.MenuChoiceMsg:
18@@ -155,7 +158,10 @@ func (m *UI) header() string {
19 		Styles.
20 		Note.
21 		SetString(pages.ToTitle(m.activePage))
22-	div := m.shared.Styles.HelpDivider.Foreground(common.Green)
23+	div := m.shared.
24+		Styles.
25+		HelpDivider.Copy().
26+		Foreground(common.Green)
27 	s := fmt.Sprintf("%s%s%s\n\n", logo, div, title)
28 	return s
29 }