rework ui
This commit is contained in:
@@ -32,6 +32,7 @@ pub struct SecretInfo {
|
|||||||
pub hosts: Vec<String>,
|
pub hosts: Vec<String>,
|
||||||
#[serde(rename = "neededForUsers")]
|
#[serde(rename = "neededForUsers")]
|
||||||
pub needed_for_users: bool,
|
pub needed_for_users: bool,
|
||||||
|
pub sopskeys: Vec<String>,
|
||||||
pub keys: Vec<String>,
|
pub keys: Vec<String>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub home: bool,
|
pub home: bool,
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ fn render_secret_detail(state: &App, area: Rect, buf: &mut Buffer) {
|
|||||||
lines.push(Line::from(vec![
|
lines.push(Line::from(vec![
|
||||||
Span::styled(" Recipients: ", Style::default().fg(Color::DarkGray)),
|
Span::styled(" Recipients: ", Style::default().fg(Color::DarkGray)),
|
||||||
Span::styled(
|
Span::styled(
|
||||||
format!("{} age keys", secret.keys.len()),
|
format!("{} age keys", secret.sopskeys.len()),
|
||||||
Style::default().fg(Color::White),
|
Style::default().fg(Color::White),
|
||||||
),
|
),
|
||||||
]));
|
]));
|
||||||
@@ -153,7 +153,7 @@ fn render_secret_detail(state: &App, area: Rect, buf: &mut Buffer) {
|
|||||||
.fg(Color::DarkGray)
|
.fg(Color::DarkGray)
|
||||||
.add_modifier(Modifier::BOLD),
|
.add_modifier(Modifier::BOLD),
|
||||||
)));
|
)));
|
||||||
for key in &secret.keys {
|
for key in &secret.sopskeys {
|
||||||
let truncated = if key.len() > 20 {
|
let truncated = if key.len() > 20 {
|
||||||
format!("{}...", &key[..20])
|
format!("{}...", &key[..20])
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user