From 4e5b6df54dad215aaf77bfb373ce4f35e3f28e39 Mon Sep 17 00:00:00 2001 From: Louis Dalibard Date: Wed, 1 May 2024 14:20:56 +0200 Subject: [PATCH] init: first commit --- ui/components/components.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/components.go b/ui/components/components.go index 50c2e8b..5dd6a53 100644 --- a/ui/components/components.go +++ b/ui/components/components.go @@ -44,7 +44,7 @@ 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 }