Use default color if Text span part is Reset

This commit is contained in:
veeso
2021-04-03 17:27:43 +02:00
parent 37da49f4f8
commit f8a448f5e9
2 changed files with 14 additions and 5 deletions

View File

@@ -61,7 +61,6 @@ impl AuthActivity {
super::COMPONENT_TEXT_FOOTER,
Box::new(Text::new(
PropsBuilder::default()
.with_foreground(Color::White)
.with_texts(TextParts::new(
None,
Some(vec![
@@ -158,7 +157,8 @@ impl AuthActivity {
super::COMPONENT_TEXT_NEW_VERSION,
Box::new(Text::new(
PropsBuilder::default()
.with_texts(TextParts::new(None, Some(vec![TextSpanBuilder::new(format!("TermSCP {} is now available! Download it from <https://github.com/veeso/termscp/releases/latest>", version).as_str()).with_foreground(Color::Yellow).bold().build()])))
.with_foreground(Color::Yellow)
.with_texts(TextParts::new(None, Some(vec![TextSpan::from(format!("TermSCP {} is now available! Download it from <https://github.com/veeso/termscp/releases/latest>", version))])))
.build()
))
);