From 83253210a82982f8136c012c99135cfc6c63bfbd Mon Sep 17 00:00:00 2001 From: OnTake Date: Mon, 29 Apr 2024 12:34:04 +0200 Subject: [PATCH] Update ui/components/components.go --- ui/components/components.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/components/components.go b/ui/components/components.go index 1035e14..453e566 100644 --- a/ui/components/components.go +++ b/ui/components/components.go @@ -43,7 +43,8 @@ func Progressbar(width int, percent float64) string { } func TOTP(currTotp totp.TOTP) string { - s := fmt.Sprintf("╔═══════════════════════════════════════════════════════════════════╗\n║ %s %-25.25s %s %s ║\n╚═══════════════════════════════════════════════════════════════════╝\n", styling.ColorFg(fmt.Sprintf("%-15.15s", currTotp.Label), styling.HighlightedColor), currTotp.Account, totp.GetCode(currTotp.Secret), Progressbar(10, float64(time.Now().UnixMilli()%30000)/30000.)) + 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.)) return s }