Skip to content

Commit 8aab598

Browse files
committed
refactor: use lucky footer constants in views; fix favorites terminology in CreateLuckyHelp
1 parent f0becc7 commit 8aab598

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

v3/internal/ui/components/help.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func CreateLuckyHelp() []HelpSection {
315315
{
316316
Title: "Actions",
317317
Items: []HelpItem{
318-
{"f", "Save to My-favorites"},
318+
{"f", "Save to Quick Favorites"},
319319
{"s", "Save to another list"},
320320
{"v", "Vote for station"},
321321
{"r", "Rate station (1-5)"},

v3/internal/ui/lucky.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ const (
3636
luckyStateManageTags
3737
)
3838

39+
// Footer help text constants for the I Feel Lucky screen
40+
const (
41+
luckyHelpInputFooter = "Tab: Switch focus • Enter: Search • ctrl+t: Shuffle • Esc: Back • ?: Help"
42+
luckyHelpPlayingFooter = "Space: Pause • f: Fav • s: List • 0: Main Menu • ?: Help"
43+
luckyHelpShuffleFooter = "Space: Pause • n: Next • [: Prev • f: Fav • h: Stop shuffle • 0: Main Menu • ?: Help"
44+
)
45+
3946
// LuckyModel represents the I Feel Lucky screen
4047
type LuckyModel struct {
4148
state luckyState
@@ -1298,7 +1305,7 @@ func (m LuckyModel) viewInput() string {
12981305
}
12991306
}
13001307

1301-
helpText := "Tab: Switch focus • Enter: Search • ctrl+t: Shuffle • Esc: Back • ?: Help"
1308+
helpText := luckyHelpInputFooter
13021309

13031310
return RenderPageWithBottomHelp(PageLayout{
13041311
Content: content.String(),
@@ -1404,7 +1411,7 @@ func (m LuckyModel) viewPlaying() string {
14041411
content.WriteString(msgStyle.Render(m.saveMessage))
14051412
}
14061413

1407-
helpText := "Space: Pause • f: Fav • s: List • 0: Main Menu • ?: Help"
1414+
helpText := luckyHelpPlayingFooter
14081415
return RenderPageWithBottomHelp(PageLayout{
14091416
Title: "🎵 Now Playing",
14101417
Content: content.String(),
@@ -1941,7 +1948,7 @@ func (m LuckyModel) viewShufflePlaying() string {
19411948
}
19421949

19431950
title := fmt.Sprintf("🎵 Now Playing (🔀 Shuffle: %s)", m.lastSearchKeyword)
1944-
help := "Space: Pause • n: Next • [: Prev • f: Fav • h: Stop shuffle • 0: Main Menu • ?: Help"
1951+
help := luckyHelpShuffleFooter
19451952

19461953
return RenderPageWithBottomHelp(PageLayout{
19471954
Title: title,

0 commit comments

Comments
 (0)