Alexandre Pasmantier 54399e3777
refactor(screen): extract UI related code to separate crate (#106)
Co-authored-by: Bertrand Chardon <bertrand.chardon@doctrine.fr>
2024-12-08 13:46:30 +01:00

57 lines
1.4 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

use ratatui::widgets::Paragraph;
//const LOGO: &str = r" _______________
// __ __ _ _ |,----------. |\
// / /____ / /__ _ __(_)__ (_)__ ___ || |=| |
// / __/ -_) / -_) |/ / (_-</ / _ \/ _ \ || | | |
// \__/\__/_/\__/|___/_/___/_/\___/_//_/ || |o| |
// |`-----------' |/
// `--------------'";
const LOGO: &str = r" _______________
|,----------. |\
|| |=| |
|| | | |
|| |o| |
|`-----------' |/
`--------------'";
pub fn build_logo_paragraph<'a>() -> Paragraph<'a> {
let lines = LOGO
.lines()
.map(std::convert::Into::into)
.collect::<Vec<_>>();
let logo_paragraph = Paragraph::new(lines);
logo_paragraph
}
const REMOTE_LOGO: &str = r"
_____________
/ \
| (*) (#) |
| |
| (1) (2) (3) |
| (4) (5) (6) |
| (7) (8) (9) |
| |
| _ |
| | | |
| (_¯(0)¯_) |
| | | |
| ¯ |
| |
| |
| === === === |
| |
| T.V |
`-------------´";
pub fn build_remote_logo_paragraph<'a>() -> Paragraph<'a> {
let lines = REMOTE_LOGO
.lines()
.map(std::convert::Into::into)
.collect::<Vec<_>>();
let logo_paragraph = Paragraph::new(lines);
logo_paragraph
}