e313efdfec
* fix: log by default (ficsit-cli.log in CWD) * chore: update readme with info on code generation * chore: regenerate docs for default log file location * feat: compatibility info state and note display. wip: keybind to switch view modes not working * fix: move render code out to a function, but it still isn't quite working yet * feat: display mod reference below mod name * Fix compat toggle with * Show scroll up/down on quick help * chore: fix merge conflict * chore: run go install mvdan.cc/gofumpt@latest; gofumpt -l -w . * chore: run gci.exe write --skip-generated -s standard -s default -s 'prefix(github.com/satisfactorymodding/ficsit-cli)' -s blank -s dot . * chore: update readme linting info and run golangci-lint --version * fix: log file is defaulted to empty again * fix(#33): update render to return just string * fix(#33): renderModInfo returns only string * fix(#33): reollback func namechange * refactor(#33): remove redundant viewport refresh * refactor(#33): update is not required after setting content * refactor(#33): remove unrequired log * docs(#33): update documentation to latest generated * docs(#33): update cache reference to not contain username * docs(#33): fix local dir references too * refactor(#33): replace vague variable with more helpful * Add directions about using dev schema when generate command fails * Fix issues from earlier merge conflict --------- Co-authored-by: Jack Stupple <jack.stupple@protonmail.com>
45 lines
1.9 KiB
Go
45 lines
1.9 KiB
Go
package utils
|
|
|
|
import (
|
|
"github.com/charmbracelet/bubbles/list"
|
|
"github.com/charmbracelet/lipgloss"
|
|
)
|
|
|
|
var (
|
|
ListStyles = list.DefaultStyles()
|
|
LabelStyle = lipgloss.NewStyle().PaddingLeft(2).Foreground(lipgloss.Color("202"))
|
|
TitleStyle = list.DefaultStyles().Title.Background(lipgloss.Color("#b34100"))
|
|
NonListTitleStyle = TitleStyle.Copy().MarginLeft(2).Background(lipgloss.Color("#b34100"))
|
|
)
|
|
|
|
var (
|
|
CompatWorksStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#00b12d"))
|
|
CompatDamagedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#e69000"))
|
|
CompatBrokenStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#e60000"))
|
|
CompatUntestedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#838383"))
|
|
)
|
|
|
|
var (
|
|
LogoForegroundStyles = []lipgloss.Style{
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("#ff5f00")).Background(lipgloss.Color("#ff5f00")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("#e65400")).Background(lipgloss.Color("#e65400")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("#cc4b00")).Background(lipgloss.Color("#cc4b00")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("#b34100")).Background(lipgloss.Color("#b34100")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("#993800")).Background(lipgloss.Color("#993800")),
|
|
lipgloss.NewStyle(),
|
|
}
|
|
LogoBackgroundStyles = []lipgloss.Style{
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("255")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("252")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("249")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("246")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("243")),
|
|
lipgloss.NewStyle().Foreground(lipgloss.Color("240")),
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
ListStyles.Title = TitleStyle
|
|
ListStyles.HelpStyle = list.DefaultStyles().HelpStyle.PaddingLeft(2).PaddingBottom(1)
|
|
ListStyles.PaginationStyle = list.DefaultStyles().PaginationStyle.PaddingLeft(2)
|
|
}
|