make tui better
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
jjohnstondev 2023-01-09 10:55:18 -08:00
parent 188404ac4f
commit e74a71749d
1 changed files with 3 additions and 13 deletions

View File

@ -7,29 +7,20 @@ import (
"github.com/zmb3/spotify"
)
/* CONSTANTS */
var (
// P the current tea program
P *tea.Program
// client
Client *spotify.Client
// WindowSize store the size of the terminal window
WindowSize tea.WindowSizeMsg
)
/* STYLING */
// DocStyle styling for viewports
var DocStyle = lipgloss.NewStyle().Margin(0, 2)
// HelpStyle styling for help context menu
var HelpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Render
// ErrStyle provides styling for error messages
var ErrStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#bd534b")).Render
// AlertStyle provides styling for alert messages
var AlertStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("62")).Render
type keymap struct {
@ -41,11 +32,10 @@ type keymap struct {
Quit key.Binding
}
// Keymap reusable key mappings shared across models
var Keymap = keymap{
Radio: key.NewBinding(
key.WithKeys("ctrl+r"),
key.WithHelp("ctrl+r", "create"),
key.WithHelp("ctrl+r", "start radio"),
),
Enter: key.NewBinding(
key.WithKeys("enter"),