Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company 👇
Go aicertificationcloud-engineeringcybercybersecuritycybersecurity-analystcybersecurity-certificationcybersecurity-certificationscybersecurity-educationcybersecurity-jobscybersecurity-portfoliocybersecurity-projectscybersecurity-toolsgrchackinglearningpentestingproject-repositoryprojetcspython
// ©AngelaMos | 2026
// view.rs
use ratatui::Frame;
use ratatui::layout::{Constraint, Layout};
use ratatui::widgets::Block;
use crate::app::{App, Tab};
use crate::chrome::{self, FOOTER_HEIGHT, HEADER_HEIGHT, TABS_HEIGHT};
use crate::{findings, instances, overview, theme};
pub fn render(frame: &mut Frame, app: &App) {
let area = frame.area();
frame.render_widget(Block::default().style(theme::panel()), area);
let [header, tabs, body, footer] = Layout::vertical([
Constraint::Length(HEADER_HEIGHT),
Constraint::Length(TABS_HEIGHT),
Constraint::Min(0),
Constraint::Length(FOOTER_HEIGHT),
])
.areas(area);
chrome::header(frame, header, app);
chrome::tabs(frame, tabs, app);
match app.tab() {
Tab::Overview => overview::render(frame, body, app),
Tab::Findings => findings::render(frame, body, app),
Tab::Instances => instances::render(frame, body, app),
}
chrome::footer(frame, footer, app);
}