From e1b253f527d3895951288f636c52d67692a85ec4 Mon Sep 17 00:00:00 2001 From: ThatBoiDev Date: Tue, 12 Mar 2024 18:21:20 +0100 Subject: [PATCH] feat: improved about menu --- src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6221feb..3f9df13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,8 +11,9 @@ use crate::{ note::Note, prompts::{multiselect::multiselect, select::select}, return_to_main::return_to_main, - utilities::{cursor_to_origin::cursor_to_origin, truncate_note::truncate_note}, + utilities::{cursor_to_origin::cursor_to_origin, truncate_note::truncate_note, format_md::{inline, paragraph}}, }; +use termimad::MadSkin; use async_std::path::PathBuf; use directories::BaseDirs; @@ -42,18 +43,17 @@ fn main() -> Result<(), Box> { 5 => exit(0), _ => (), } - - /*if return_to_main().is_ok() { - main()?; - }*/ } } fn display_about() -> Result<(), Box> { + let skin: MadSkin = MadSkin::default(); + cursor_to_origin()?; - println!("Notabena is a FOSS note-taking CLI tool, written in Rust."); - println!("License: GPL v3\n"); - println!("COPYRIGHT (c) 2024 NOTABENA ORGANISATION\nPROJECT LEADS @ThatFrogDev, @MrSerge01, GITHUB CONTRIBUTORS\n"); + println!("{}", paragraph(&skin, &format!("# About Notabena"))); + println!("{}", inline(&skin, "**Notabena** is a FOSS note-taking CLI tool, written in Rust.\n")); + println!("version: v{}, licensed under: GPL v3", env!("CARGO_PKG_VERSION")); + println!("COPYRIGHT (c) 2023-PRESENT NOTABENA ORGANISATION\nPROJECT LEADS @ThatFrogDev, @MrSerge01, GITHUB CONTRIBUTORS\n"); Ok(()) }