MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / draw

Function draw

crates/openshell-tui/src/ui/dashboard.rs:12–35  ·  view source on GitHub ↗
(frame: &mut Frame<'_>, app: &App, area: Rect)

Source from the content-addressed store, hash-verified

10use crate::app::{App, Focus, MiddlePaneTab};
11
12pub fn draw(frame: &mut Frame<'_>, app: &App, area: Rect) {
13 let chunks = Layout::default()
14 .direction(Direction::Vertical)
15 .constraints([
16 Constraint::Percentage(25),
17 Constraint::Percentage(25),
18 Constraint::Percentage(50),
19 ])
20 .split(area);
21
22 draw_gateway_list(frame, app, chunks[0]);
23
24 let mid_focused = app.focus == Focus::Providers;
25 match app.middle_pane_tab {
26 MiddlePaneTab::Providers => {
27 super::providers::draw(frame, app, chunks[1], mid_focused);
28 }
29 MiddlePaneTab::GlobalSettings => {
30 super::global_settings::draw(frame, app, chunks[1], mid_focused);
31 }
32 }
33
34 super::sandboxes::draw(frame, app, chunks[2], app.focus == Focus::Sandboxes);
35}
36
37fn draw_gateway_list(frame: &mut Frame<'_>, app: &App, area: Rect) {
38 let t = &app.theme;

Callers

nothing calls this directly

Calls 1

draw_gateway_listFunction · 0.85

Tested by

no test coverage detected