feat: add logger and config structure
This commit is contained in:
1 parent
15abd84501
commit
d9c827b3ef
11 files changed
+906
-19
No files matched your search
+2
-2
@@ -5,7 +5,7 @@ use ratatui::{
|
||||
layout::{Constraint, Direction, Layout},
|
||||
Frame,
|
||||
};
|
||||
use crate::tui::widgets;
|
||||
use super::widgets;
|
||||
use super::Tui;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ impl App {
|
||||
widgets::render_status(frame, bottom_chunks[2]);
|
||||
}
|
||||
|
||||
/// updates the application's state based on user input
|
||||
/// updates the applications state based on user input
|
||||
fn handle_events(&mut self) -> color_eyre::Result<()> {
|
||||
match event::read()? {
|
||||
Event::Key(key_event) if key_event.kind == KeyEventKind::Press => self
|
||||
|
||||
+7
-6
@@ -3,39 +3,40 @@ use ratatui::{
|
||||
widgets::{Block, Borders, Paragraph},
|
||||
Frame,
|
||||
};
|
||||
use ratatui::widgets::BorderType;
|
||||
|
||||
pub fn render_instances(frame: &mut Frame, area: Rect) {
|
||||
let sidebar = Block::default()
|
||||
.title(" Instances ")
|
||||
.borders(Borders::ALL);
|
||||
.borders(Borders::ALL).borders(Borders::ALL).border_type(BorderType::Rounded);
|
||||
frame.render_widget(sidebar, area);
|
||||
}
|
||||
|
||||
pub fn render_title(frame: &mut Frame, area: Rect) {
|
||||
let top_bar = Paragraph::new(" TEST INSTANCE NAME").block(Block::default().borders(Borders::ALL)).centered();
|
||||
let top_bar = Paragraph::new(" TEST INSTANCE NAME").block(Block::default().borders(Borders::ALL).border_type(BorderType::Rounded)).centered();
|
||||
frame.render_widget(top_bar, area);
|
||||
}
|
||||
|
||||
pub fn render_content(frame: &mut Frame, area: Rect) {
|
||||
let file_list = Paragraph::new(" TEST CONTENT LIBRARY PAGE").block(Block::default().borders(Borders::ALL));
|
||||
let file_list = Paragraph::new(" TEST CONTENT LIBRARY PAGE").block(Block::default().borders(Borders::ALL).border_type(BorderType::Rounded));
|
||||
frame.render_widget(file_list, area);
|
||||
}
|
||||
|
||||
pub fn render_account(frame: &mut Frame, area: Rect) {
|
||||
let metadata = Paragraph::new(" ")
|
||||
.block(Block::default().borders(Borders::ALL).title(" Account "));
|
||||
.block(Block::default().borders(Borders::ALL).borders(Borders::ALL).border_type(BorderType::Rounded).title(" Account "));
|
||||
frame.render_widget(metadata, area);
|
||||
}
|
||||
|
||||
pub fn render_info(frame: &mut Frame, area: Rect) {
|
||||
let clipboard = Paragraph::new(" ")
|
||||
.block(Block::default().borders(Borders::ALL).title(" Info "));
|
||||
.block(Block::default().borders(Borders::ALL).borders(Borders::ALL).border_type(BorderType::Rounded).title(" Info "));
|
||||
frame.render_widget(clipboard, area);
|
||||
}
|
||||
|
||||
pub fn render_status(frame: &mut Frame, area: Rect) {
|
||||
let processes = Paragraph::new(" ")
|
||||
.block(Block::default().borders(Borders::ALL).title(" Status "));
|
||||
.block(Block::default().borders(Borders::ALL).borders(Borders::ALL).border_type(BorderType::Rounded).title(" Status "));
|
||||
frame.render_widget(processes, area);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user