majc: implement changelog screen

This commit is contained in:
Cadey Ratio 2020-07-27 17:31:38 -04:00
parent c3e20b089c
commit 62350daba5
3 changed files with 19 additions and 0 deletions

8
majc/src/changelog.gmi Normal file
View File

@ -0,0 +1,8 @@
## 0.2.0
* History works (h/l)
* Added changelog screen
## 0.1.0
* Base functionality implemented

View File

@ -14,6 +14,16 @@ pub fn help(siv: &mut Cursive) {
); );
} }
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) { pub fn about(siv: &mut Cursive) {
siv.add_layer(Dialog::info(format!( siv.add_layer(Dialog::info(format!(
"{} {}\n\nby {}\n\nSee https://tulpa.dev/cadey/maj for more information", "{} {}\n\nby {}\n\nSee https://tulpa.dev/cadey/maj for more information",

View File

@ -28,6 +28,7 @@ fn main() {
"majc", "majc",
MenuTree::new() MenuTree::new()
.leaf("About", commands::about) .leaf("About", commands::about)
.leaf("Changelog", commands::changelog)
.leaf("Help", commands::help) .leaf("Help", commands::help)
.leaf("Quit", cursive::Cursive::quit), .leaf("Quit", cursive::Cursive::quit),
) )