init: first commit
This commit is contained in:
parent
55943706cd
commit
30870e5de8
@ -13,7 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func VersionNumber() string {
|
func VersionNumber() string {
|
||||||
return "himitsu " + styling.ColorFg(config.Version, styling.HighlightedColor)
|
return " himitsu " + styling.ColorFg(config.Version, styling.HighlightedColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Checkbox(label string, checked bool, selected bool) string {
|
func Checkbox(label string, checked bool, selected bool) string {
|
||||||
@ -44,12 +44,12 @@ func Progressbar(width int, percent float64) string {
|
|||||||
|
|
||||||
func TOTP(currTotp totp.TOTP) string {
|
func TOTP(currTotp totp.TOTP) string {
|
||||||
code := totp.GetCode(currTotp.Secret)
|
code := totp.GetCode(currTotp.Secret)
|
||||||
s := fmt.Sprintf(" ╔════════════════════════════════════════════════════════════════════╗\n ║ %s %-25.25s %s %s %s ║\n ╚════════════════════════════════════════════════════════════════════╝\n", styling.ColorFg(fmt.Sprintf("%-15.15s", currTotp.Label), styling.HighlightedColor), currTotp.Account, code[0:3], code[3:6], Progressbar(10, float64(time.Now().UnixMilli()%30000)/30000.))
|
s := fmt.Sprintf(" ╔═════════════════════════════════════════════════════════════════════╗\n ║ %s %-25.25s %s %s %s ║\n ╚═════════════════════════════════════════════════════════════════════╝\n", styling.ColorFg(fmt.Sprintf("%-15.15s", currTotp.Label), styling.HighlightedColor), currTotp.Account, code[0:3], code[3:6], Progressbar(10, float64(time.Now().UnixMilli()%30000)/30000.))
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func KeybindsHints(keybinds []string) string {
|
func KeybindsHints(keybinds []string) string {
|
||||||
s := ""
|
s := " "
|
||||||
for index, keybind := range keybinds {
|
for index, keybind := range keybinds {
|
||||||
if index != 0 {
|
if index != 0 {
|
||||||
s += styling.Dot
|
s += styling.Dot
|
||||||
|
Loading…
Reference in New Issue
Block a user