35 lines
870 B
Rust
35 lines
870 B
Rust
use cursive::{
|
|
traits::*,
|
|
views::{Dialog, TextView},
|
|
Cursive,
|
|
};
|
|
|
|
pub fn help(siv: &mut Cursive) {
|
|
let content = include_str!("./help.gmi");
|
|
|
|
siv.add_layer(
|
|
Dialog::around(TextView::new(crate::gemini::render(content)).scrollable())
|
|
.title("Help")
|
|
.dismiss_button("Ok"),
|
|
);
|
|
}
|
|
|
|
pub fn changelog(siv: &mut Cursive) {
|
|
let content = include_str!("./changelog.gmi");
|
|
|
|
siv.add_layer(
|
|
Dialog::around(TextView::new(crate::gemini::render(content)).scrollable())
|
|
.title("Changelog")
|
|
.dismiss_button("Ok"),
|
|
);
|
|
}
|
|
|
|
pub fn about(siv: &mut Cursive) {
|
|
siv.add_layer(Dialog::info(format!(
|
|
"{} {}\n\nby {}\n\nSee https://tulpa.dev/cadey/maj for more information",
|
|
env!("CARGO_PKG_NAME"),
|
|
env!("CARGO_PKG_VERSION"),
|
|
env!("CARGO_PKG_AUTHORS"),
|
|
)));
|
|
}
|