From 1edfc5859923b13be076f4eba743942044d8a66a Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sun, 26 Jan 2025 16:09:42 +0100 Subject: [PATCH] feat: mark CA certificates in UI (#6) --- ui/src/main.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ui/src/main.rs b/ui/src/main.rs index 3668949..fd589ee 100644 --- a/ui/src/main.rs +++ b/ui/src/main.rs @@ -436,7 +436,27 @@ impl Ui { result = result.push( Container::new( column![ - text(cert.name().to_string()).size(18), + row![ + text(cert.name().to_string()).size(18), + text("").width(16), + if cert.is_ca() { + container(text("CA").color(color!(0x0088ff))) + .padding(4) + .style(|_| container::Style { + background: Some(Background::from(color!( + 0x0088ff, 0.2 + ))), + border: Border { + width: 1.0, + radius: Radius::from(4), + color: color!(0x0088ff), + }, + ..container::Style::default() + }) + } else { + container(text("")) + } + ], horizontal_rule(1), row![text("Issuer: ").width(160), text(cert.issuer().to_string())], row![