From 02ce97424c8b3d2f2c0d4e02407dcc288c36dac8 Mon Sep 17 00:00:00 2001 From: TheRealLorenz Date: Mon, 27 Nov 2023 19:23:35 +0100 Subject: [PATCH] Style changes --- rq-cli/src/components/response_panel.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rq-cli/src/components/response_panel.rs b/rq-cli/src/components/response_panel.rs index 31537a7..2f66fee 100644 --- a/rq-cli/src/components/response_panel.rs +++ b/rq-cli/src/components/response_panel.rs @@ -125,10 +125,10 @@ impl ResponsePanel { fn body_as_string(&self) -> Vec { match self.body() { Ok(body) => match body { - Payload::Text(t) => iter::once(format!("decoded with encoding: '{}'", t.charset)) + Payload::Text(t) => iter::once(format!("decoded with encoding '{}':", t.charset)) .chain(t.text.lines().map(|s| s.to_string())) .collect(), - Payload::Bytes(b) if self.show_raw => iter::once("lossy utf-8 decode".to_string()) + Payload::Bytes(b) if self.show_raw => iter::once("lossy utf-8 decode:".to_string()) .chain( String::from_utf8_lossy(&b.bytes) .lines() @@ -143,7 +143,9 @@ impl ResponsePanel { fn render_body(&self) -> Vec { let mut lines: Vec = self.body_as_string().into_iter().map(Line::from).collect(); - lines[0].patch_style(Style::default().add_modifier(Modifier::ITALIC)); + lines[0].patch_style( + Style::default().add_modifier(Modifier::ITALIC.union(Modifier::UNDERLINED)), + ); lines }