Skip to content

Commit

Permalink
chore: minor edits to the conversation listing coloring (#135)
Browse files Browse the repository at this point in the history
* chore: adjust timea's style
* chore: adjust conversation listing colors
  • Loading branch information
meowgorithm authored Sep 20, 2023
1 parent ff8e3b9 commit af884c5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ func listConversations() error {
fmt.Fprintf(
os.Stdout,
"%s %s %s %s\n",
stdoutStyles().Comment.Render("•"),
stdoutStyles().Bullet,
stdoutStyles().SHA1.Render(conversation.ID[:sha1short]),
conversation.Title,
stdoutStyles().Comment.Italic(true).Render(timeago.Of(conversation.UpdatedAt)),
stdoutStyles().Timeago.Render(timeago.Of(conversation.UpdatedAt)),
)
continue
}
Expand Down
36 changes: 20 additions & 16 deletions styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ package main
import "github.com/charmbracelet/lipgloss"

type styles struct {
AppName lipgloss.Style
CliArgs lipgloss.Style
Comment lipgloss.Style
CyclingChars lipgloss.Style
ErrorHeader lipgloss.Style
ErrorDetails lipgloss.Style
ErrPadding lipgloss.Style
Flag lipgloss.Style
FlagComma lipgloss.Style
FlagDesc lipgloss.Style
InlineCode lipgloss.Style
Link lipgloss.Style
Pipe lipgloss.Style
Quote lipgloss.Style
SHA1 lipgloss.Style
AppName,
CliArgs,
Comment,
CyclingChars,
ErrorHeader,
ErrorDetails,
ErrPadding,
Flag,
FlagComma,
FlagDesc,
InlineCode,
Link,
Pipe,
Quote,
SHA1,
Bullet,
Timeago lipgloss.Style
}

func makeStyles(r *lipgloss.Renderer) (s styles) {
Expand All @@ -36,6 +38,8 @@ func makeStyles(r *lipgloss.Renderer) (s styles) {
s.Link = r.NewStyle().Foreground(lipgloss.Color("#00AF87")).Underline(true)
s.Quote = r.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#FF71D0", Dark: "#FF78D2"})
s.Pipe = r.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#8470FF", Dark: "#745CFF"})
s.SHA1 = r.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#5DD6C0", Dark: "#427C72"})
s.SHA1 = r.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#00B594", Dark: "#11d4b1"}).Bold(true)
s.Bullet = r.NewStyle().SetString("•").Foreground(lipgloss.AdaptiveColor{Light: "#757575", Dark: "#777"})
s.Timeago = r.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#999", Dark: "#555"})
return s
}

0 comments on commit af884c5

Please sign in to comment.