mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2025-05-12 13:48:31 +02:00
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
This commit is contained in:
parent
a0e6e30e7b
commit
55ec72864e
1 changed files with 9 additions and 3 deletions
|
@ -781,21 +781,27 @@ func draw() {
|
||||||
return "Process"
|
return "Process"
|
||||||
}()).Size(giu.Auto, 34).OnClick(onClickStartButton),
|
}()).Size(giu.Auto, 34).OnClick(onClickStartButton),
|
||||||
giu.Custom(func() {
|
giu.Custom(func() {
|
||||||
|
if mainStatus != "Ready" {
|
||||||
|
giu.Style().SetColor(giu.StyleColorText, mainStatusColor).To(
|
||||||
|
giu.Label(mainStatus),
|
||||||
|
).Build()
|
||||||
|
return
|
||||||
|
}
|
||||||
if temporaryZip && externalDst {
|
if temporaryZip && externalDst {
|
||||||
giu.Style().SetColor(giu.StyleColorText, YELLOW).To(
|
giu.Style().SetColor(giu.StyleColorText, YELLOW).To(
|
||||||
giu.Label("Warning: unencrypted temp files will be created"),
|
giu.Label("Warning: unencrypted temp files will be created"),
|
||||||
).Build()
|
).Build()
|
||||||
} else if temporaryZip {
|
} else if temporaryZip {
|
||||||
giu.Style().SetColor(giu.StyleColorText, WHITE).To(
|
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()
|
).Build()
|
||||||
} else if externalDst {
|
} else if externalDst {
|
||||||
giu.Style().SetColor(giu.StyleColorText, WHITE).To(
|
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()
|
).Build()
|
||||||
} else {
|
} else {
|
||||||
giu.Style().SetColor(giu.StyleColorText, mainStatusColor).To(
|
giu.Style().SetColor(giu.StyleColorText, mainStatusColor).To(
|
||||||
giu.Label(mainStatus),
|
giu.Label("Ready"),
|
||||||
).Build()
|
).Build()
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Reference in a new issue