From 184067031b5cc094ca5b1cd62c6fd6cec4a3122b Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Wed, 1 May 2024 14:21:48 +0200 Subject: [PATCH] init: first commit --- ui/components/components.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/components/components.go b/ui/components/components.go index fb969a5..487a96a 100644 --- a/ui/components/components.go +++ b/ui/components/components.go @@ -13,7 +13,7 @@ import ( ) 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 { @@ -44,12 +44,12 @@ func Progressbar(width int, percent float64) string { func TOTP(currTotp totp.TOTP) string { 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 } func KeybindsHints(keybinds []string) string { - s := " " + s := "" for index, keybind := range keybinds { if index != 0 { s += styling.Dot