From 55ec72864e941fd39e0c43fcc40b285988d73aaa Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:27:49 -0400 Subject: [PATCH] Only show info/warnings if status is "Ready" If not, it's probably showing some error message which would happen after starting encryption, so user would've already seen the info/warning status --- src/Picocrypt.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Picocrypt.go b/src/Picocrypt.go index 2c2cc0a..3587e44 100644 --- a/src/Picocrypt.go +++ b/src/Picocrypt.go @@ -781,21 +781,27 @@ func draw() { return "Process" }()).Size(giu.Auto, 34).OnClick(onClickStartButton), giu.Custom(func() { + if mainStatus != "Ready" { + giu.Style().SetColor(giu.StyleColorText, mainStatusColor).To( + giu.Label(mainStatus), + ).Build() + return + } if temporaryZip && externalDst { giu.Style().SetColor(giu.StyleColorText, YELLOW).To( giu.Label("Warning: unencrypted temp files will be created"), ).Build() } else if temporaryZip { giu.Style().SetColor(giu.StyleColorText, WHITE).To( - giu.Label(mainStatus + " (info: will create temporary files)"), + giu.Label("Ready (info: will create a temporary zip file)"), ).Build() } else if externalDst { giu.Style().SetColor(giu.StyleColorText, WHITE).To( - giu.Label(mainStatus + " (info: target may be an external drive)"), + giu.Label("Ready (info: target may be an external drive)"), ).Build() } else { giu.Style().SetColor(giu.StyleColorText, mainStatusColor).To( - giu.Label(mainStatus), + giu.Label("Ready"), ).Build() } }),