This commit is contained in:
2026-06-06 00:53:26 +04:00
parent 90eca4e469
commit 9a385176cb
3 changed files with 58 additions and 41 deletions
+6 -5
View File
@@ -81,16 +81,17 @@ fn render_secret_detail(state: &App, area: Rect, buf: &mut Buffer) {
]));
// Scope
let scope = if secret.global {
"global".to_string()
} else {
"host-specific".to_string()
let scope = match (secret.global_hosts, secret.global_homes) {
(true, true) => "global (hosts + homes)".to_string(),
(true, false) => "global (hosts)".to_string(),
(false, true) => "global (homes)".to_string(),
(false, false) => "host-specific".to_string(),
};
lines.push(Line::from(vec![
Span::styled(" Scope: ", Style::default().fg(Color::DarkGray)),
Span::styled(scope, Style::default().fg(Color::White)),
]));
if !secret.global {
if !(secret.global_hosts && secret.global_homes) {
// Hosts / identities. Home-manager identities are coloured distinctly
// so it is obvious which targets are user (home) rather than system.
let mut host_spans: Vec<Span> = vec![Span::styled(