From 46c61ca078db7dc3823f27787156df25c4431a1d Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Fri, 9 Feb 2024 08:53:01 +0100 Subject: [PATCH] Update display --- src/tui/ui.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/tui/ui.rs b/src/tui/ui.rs index 5c174a2..c9fc3e5 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -239,12 +239,21 @@ impl<'a> ArtistOverlay<'a> { let item_indent = " "; let list_indent = " - "; + + let double_item_indent = format!("{item_indent}{item_indent}"); + let double_list_indent = format!("{item_indent}{list_indent}"); + let properties = Paragraph::new(format!( "Artist: {}\n\n{item_indent}\ - MusicBrainz: {}{}", + MusicBrainz: {}\n{item_indent}\ + Properties: {}", artist.map(|a| a.id.name.as_str()).unwrap_or(""), Self::opt_opt_to_str(artist.map(|a| a.musicbrainz.as_ref())), - Self::opt_hashmap_to_string(artist.map(|a| &a.properties), item_indent, list_indent), + Self::opt_hashmap_to_string( + artist.map(|a| &a.properties), + &double_item_indent, + &double_list_indent + ), )); ArtistOverlay { properties }