use crate::tui::Frame;
use ratatui::{
prelude::*,
widgets::{Block, BorderType, Borders, Paragraph, Wrap},
};
#[derive(Debug)]
pub struct About {}
impl About {
fn about() -> Paragraph<'static> {
let text = vec![
Line::from(""),
Line::from("Early Users"),
Line::from(""),
Line::from("Thank you early adopters! This iteration of Napali provides the first render test of our optimization service."),
Line::from(""),
Line::from("Upon running Napali, an API key is provisioned and written to ~/.config/irx"),
Line::from(""),
Line::from("Please take a moment to look around. Your feedback is sincerely appreciated and will help us better serve the optimization community. Suggestions and findings, especially screenshots of how Napali renders in your terminal may be sent to hello@integrated-reasoning.com."),
Line::from("Additionally as a special thank you, registering your email using Napali before December 31st, 2023 will grant you early adopter status."),
Line::from(""),
Line::from("In the coming weeks, early adopters will be the first to receive details on upcoming features."),
Line::from(""),
Line::from("Terms:"),
Line::from("THE LICENSED SOFTWARE IS PROVIDED \"AS IS\" AND, TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, INTEGRATED REASONING, INC. MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, BY STATUTE OR OTHERWISE, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGMENT."),
];
Paragraph::new(text)
.block(
Block::default()
.title("Developer Preview")
.title_alignment(Alignment::Left)
.borders(Borders::ALL)
.border_style(Style::default())
.border_type(BorderType::Rounded),
)
.style(Style::default().fg(Color::Cyan))
.wrap(Wrap { trim: false })
.alignment(Alignment::Left)
}
fn layer(area: Rect) -> Rect {
area
}
pub fn render(area: Rect, f: &mut Frame<'_>) {
let layer = Self::layer(area);
let text = Self::about();
f.render_widget(text, layer);
}
}