pgp: add note for encrypted messages that are not signed
Since there is a prominent checkmark for encrypted messages, it might not be entirely clear that the contents have not been signed. Signed-off-by: Moritz Poldrack <git@moritz.sh> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
parent
8f9bb2b289
commit
15a07e5892
|
@ -44,12 +44,17 @@ func (p *PGPInfo) DrawSignature(ctx *ui.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PGPInfo) DrawEncryption(ctx *ui.Context, y int) {
|
func (p *PGPInfo) DrawEncryption(ctx *ui.Context, y int) {
|
||||||
|
warningStyle := p.uiConfig.GetStyle(config.STYLE_WARNING)
|
||||||
validStyle := p.uiConfig.GetStyle(config.STYLE_SUCCESS)
|
validStyle := p.uiConfig.GetStyle(config.STYLE_SUCCESS)
|
||||||
defaultStyle := p.uiConfig.GetStyle(config.STYLE_DEFAULT)
|
defaultStyle := p.uiConfig.GetStyle(config.STYLE_DEFAULT)
|
||||||
|
|
||||||
x := ctx.Printf(0, y, validStyle, "✓ Encrypted ")
|
x := ctx.Printf(0, y, validStyle, "✓ Encrypted ")
|
||||||
x += ctx.Printf(x, y, defaultStyle,
|
x += ctx.Printf(x, y, defaultStyle,
|
||||||
"To %s (%8X) ", p.details.DecryptedWith, p.details.DecryptedWithKeyId)
|
"To %s (%8X) ", p.details.DecryptedWith, p.details.DecryptedWithKeyId)
|
||||||
|
if !p.details.IsSigned {
|
||||||
|
x += ctx.Printf(x, y, warningStyle,
|
||||||
|
"(message not signed!)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PGPInfo) Draw(ctx *ui.Context) {
|
func (p *PGPInfo) Draw(ctx *ui.Context) {
|
||||||
|
|
Loading…
Reference in New Issue