rework
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user