Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
27 lines
760 B
Rust
27 lines
760 B
Rust
use crate::app::App;
|
||
|
||
pub fn render(frame: &mut ratatui::Frame, _app: &App) {
|
||
use ratatui::layout::{Constraint, Layout};
|
||
use ratatui::widgets::{Block, Borders, Paragraph};
|
||
|
||
let chunks = Layout::vertical([
|
||
Constraint::Length(1),
|
||
Constraint::Min(1),
|
||
Constraint::Length(1),
|
||
])
|
||
.split(frame.area());
|
||
|
||
frame.render_widget(
|
||
Paragraph::new(" Log Viewer").style(ratatui::style::Style::default().bold()),
|
||
chunks[0],
|
||
);
|
||
|
||
// Main area — 使用 Block::new()(ratatui 0.30 推荐风格)
|
||
frame.render_widget(
|
||
Block::new().borders(Borders::ALL).title("No file loaded"),
|
||
chunks[1],
|
||
);
|
||
|
||
frame.render_widget(Paragraph::new(" Press '?' for help | q to quit"), chunks[2]);
|
||
}
|