This commit is contained in:
parent
0e11e3734f
commit
94ae6af7f1
@ -8,6 +8,7 @@ import (
|
||||
"gospt/internal/commands"
|
||||
"gospt/internal/gctx"
|
||||
|
||||
"github.com/charmbracelet/bubbles/key"
|
||||
"github.com/charmbracelet/bubbles/list"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
@ -134,6 +135,11 @@ func DisplayList(ctx *gctx.Context, client *spotify.Client) error {
|
||||
ctx: ctx,
|
||||
client: client,
|
||||
}
|
||||
m.list.AdditionalShortHelpKeys = func() []key.Binding {
|
||||
return []key.Binding{
|
||||
key.NewBinding(key.WithKeys("ctrl", "r"), key.WithHelp("ctrl+r", "start radio")),
|
||||
}
|
||||
}
|
||||
m.list.Title = "Saved Tracks"
|
||||
|
||||
p := tea.NewProgram(m, tea.WithAltScreen(), tea.WithMouseCellMotion())
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"gospt/internal/commands"
|
||||
"gospt/internal/gctx"
|
||||
|
||||
"github.com/charmbracelet/bubbles/key"
|
||||
"github.com/charmbracelet/bubbles/list"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/zmb3/spotify/v2"
|
||||
@ -135,7 +136,11 @@ func PlaylistTracks(ctx *gctx.Context, client *spotify.Client, playlist spotify.
|
||||
playlist: playlist,
|
||||
}
|
||||
m.list.Title = playlist.Name
|
||||
|
||||
m.list.AdditionalShortHelpKeys = func() []key.Binding {
|
||||
return []key.Binding{
|
||||
key.NewBinding(key.WithKeys("ctrl", "r"), key.WithHelp("ctrl+r", "start radio")),
|
||||
}
|
||||
}
|
||||
p := tea.NewProgram(m, tea.WithAltScreen(), tea.WithMouseCellMotion())
|
||||
|
||||
if _, err := p.Run(); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user