majc: support history #3

Merged
cadey merged 4 commits from majc-history into main 2020-07-27 22:16:59 +00:00
3 changed files with 19 additions and 0 deletions
Showing only changes of commit 62350daba5 - Show all commits

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) {
siv.add_layer(Dialog::info(format!(
"{} {}\n\nby {}\n\nSee https://tulpa.dev/cadey/maj for more information",

View File

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