1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-25 12:03:33 +00:00

Mo' colors

Changes:
- Stream is colored now
- Stream is formatted
- Stream has it's own formatting option
- Colors are now a style, and is a struct
- Color struct has a pretty cool functional interface
- colored mentions and PMs
- Every message uses the same function (it's dry!!)
- Colorize errors!
- Create function for visualizing errors
- colorized some of the command output!
- Color is stored in a Style
- Create a Text struct that can use to stylize strings "easily"
- Text can be used to build strings
- color highlighting on code
- added tml config support
- added different color for mention url
- Added sprintf to use formatting with PrintFeed and PrintError

Known Bugs: (added as todos whereever)
- Cannot use multiple formatting at the same time (*bold _italic_*
doesn't work
- sprintf is pretty shit
- background doesn't cover as a `block` in codeblocks
- not possible to escape sprintf thing
This commit is contained in:
Casper Weiss Bang
2019-10-17 07:56:47 +02:00
parent 3f33070635
commit 439f09aa1c
17 changed files with 475 additions and 155 deletions

View File

@ -41,12 +41,12 @@ func cmdJoin(cmd []string) {
channel.TopicName = ""
channel.MembersType = keybase.USER
}
printToView("Feed", fmt.Sprintf("You are joining: %s", joinedName))
printInfoF("You are joining: $TEXT", messageLinkKeybaseColor.stylize(joinedName))
clearView("Chat")
setViewTitle("Input", fmt.Sprintf(" %s ", joinedName))
go populateChat()
default:
printToView("Feed", fmt.Sprintf("To join a team use %sjoin <team> <channel>", cmdPrefix))
printToView("Feed", fmt.Sprintf("To join a PM use %sjoin <user>", cmdPrefix))
printInfo(fmt.Sprintf("To join a team use %sjoin <team> <channel>", cmdPrefix))
printInfo(fmt.Sprintf("To join a PM use %sjoin <user>", cmdPrefix))
}
}