- commit
- e9d74c8
- parent
- 8283fa1
- author
- Eric Bower
- date
- 2025-01-10 11:48:48 -0500 EST
chore(tui): copy tweaks
4 files changed,
+12,
-14
+3,
-9
1@@ -74,8 +74,8 @@ Shortcuts:
2
3 - esc: leave page
4 - tab: toggle between viewport and input box
5-- ctrl+u: scroll viewport up a page
6-- ctrl+d: scroll viewport down a page
7+- u: scroll viewport up a page
8+- d: scroll viewport down a page
9 - j,k: scroll viewport
10
11 Commands: [help, stats, site {domain}, post {slug}]
12@@ -138,7 +138,6 @@ func (m Model) Init() tea.Cmd {
13 func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
14 var cmds []tea.Cmd
15 var cmd tea.Cmd
16- updateViewport := true
17 switch msg := msg.(type) {
18 case tea.WindowSizeMsg:
19 m.viewport.Width = headerWidth(msg.Width)
20@@ -161,11 +160,6 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
21 switch msg.String() {
22 case "q", "esc":
23 return m, pages.Navigate(pages.MenuPage)
24- // when typing in input, ignore viewport updates
25- case " ", "k", "j":
26- if m.input.Focused() {
27- updateViewport = false
28- }
29 case "tab":
30 if m.input.Focused() {
31 m.input.Blur()
32@@ -215,7 +209,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
33
34 m.input, cmd = m.input.Update(msg)
35 cmds = append(cmds, cmd)
36- if updateViewport {
37+ if !m.input.Focused() {
38 m.viewport, cmd = m.viewport.Update(msg)
39 cmds = append(cmds, cmd)
40 }
1@@ -16,12 +16,12 @@ type MenuChoiceMsg struct {
2 const (
3 KeysChoice menuChoice = iota
4 TokensChoice
5- NotificationsChoice
6- PlusChoice
7 SettingsChoice
8 LogsChoice
9 AnalyticsChoice
10 ChatChoice
11+ NotificationsChoice
12+ PlusChoice
13 ExitChoice
14 UnsetChoice // set when no choice has been made
15 )
16@@ -30,12 +30,12 @@ const (
17 var menuChoices = map[menuChoice]string{
18 KeysChoice: "Manage pubkeys",
19 TokensChoice: "Manage tokens",
20- NotificationsChoice: "Notifications",
21- PlusChoice: "Pico+",
22 SettingsChoice: "Settings",
23 LogsChoice: "Logs",
24 AnalyticsChoice: "Analytics",
25 ChatChoice: "Chat",
26+ NotificationsChoice: "Notifications",
27+ PlusChoice: "Pico+",
28 ExitChoice: "Exit",
29 }
30
+1,
-1
1@@ -28,7 +28,7 @@ Add this URL to your RSS feed reader:
2
3 ## Using our [rss-to-email](https://pico.sh/feeds) service
4
5-Create a feeds file (e.g. pico.txt):`, url)
6+Create a feeds file (using list file format, e.g. pico.txt):`, url)
7
8 md += "\n```\n"
9 md += fmt.Sprintf(`=: email rss@myemail.com
+4,
-0
1@@ -25,8 +25,12 @@ func PlusView(username string, w int) string {
2 - prose
3 - no inherent storage limits
4 - blog analytics
5+- irc bouncer
6 - 10GB total storage
7
8+> You can use this same flow to add additional years to your membership,
9+> including if you are already a pico+ user.
10+
11 There are a few ways to purchase a membership. We try our best to
12 provide immediate access to pico+ regardless of payment
13 method.