Moving from Line to Table
This commit is contained in:
parent
ce32ab53f0
commit
d614ec4d18
4 changed files with 78 additions and 112 deletions
|
|
@ -16,7 +16,7 @@ use ratatui::{
|
|||
layout::{Alignment, Constraint, Direction, Layout, Rect},
|
||||
style::{Color, Modifier, Style},
|
||||
text::{Line, Span, Text},
|
||||
widgets::{Block, Borders, ListState, Padding, Paragraph},
|
||||
widgets::{Block, Borders, TableState, Padding, Paragraph},
|
||||
};
|
||||
|
||||
use std::{
|
||||
|
|
@ -32,7 +32,7 @@ pub struct App {
|
|||
update_interval: Duration,
|
||||
endpoints: UptimeKumaEndpoints,
|
||||
client: UptimeKumaClient,
|
||||
list_state: ListState,
|
||||
list_state: TableState,
|
||||
}
|
||||
|
||||
impl App {
|
||||
|
|
@ -185,7 +185,7 @@ impl App {
|
|||
terminal.hide_cursor()?;
|
||||
|
||||
let state = DashboardViewState::new();
|
||||
let mut list_state = ListState::default();
|
||||
let mut list_state = TableState::default();
|
||||
list_state.select(Some(0));
|
||||
|
||||
Ok(Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue