Skip to content

Commit c70de5e

Browse files
committed
feat: prettier
1 parent ad47d19 commit c70de5e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/app.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use tui::{
1515
layout::{Constraint, Direction, Layout},
1616
style::{Color, Style},
1717
text::{Span, Spans, Text},
18-
widgets::{Block, Borders, List, ListItem, ListState, Paragraph},
18+
widgets::{Block, Borders, List, ListItem, ListState, Paragraph, Wrap},
1919
Frame, Terminal,
2020
};
2121

@@ -227,7 +227,7 @@ impl App {
227227
let job_list = List::new(jobs)
228228
.block(
229229
Block::default()
230-
.title("Jobs")
230+
.title("Job Queue")
231231
.borders(Borders::ALL)
232232
.border_style(match self.focus {
233233
Focus::Jobs => Style::default().fg(Color::Green),
@@ -304,17 +304,18 @@ impl App {
304304
// "".to_string()
305305
// });
306306

307-
let job_log = match self.job_stdout.as_deref() {
308-
Ok(s) => Text::raw(string_for_paragraph(
307+
let log = match self.job_stdout.as_deref() {
308+
Ok(s) => Paragraph::new(string_for_paragraph(
309309
s,
310310
log_block.inner(log_area).height as usize,
311311
log_block.inner(log_area).width as usize,
312312
self.job_stdout_offset as usize,
313313
)),
314-
Err(e) => Text::styled(e.to_string(), Style::default().fg(Color::Red)),
315-
};
316-
317-
let log = Paragraph::new(job_log).block(log_block);
314+
Err(e) => Paragraph::new(e.to_string())
315+
.style(Style::default().fg(Color::Red))
316+
.wrap(Wrap { trim: true }),
317+
}
318+
.block(log_block);
318319

319320
f.render_widget(log, log_area);
320321
}

0 commit comments

Comments
 (0)