diff --git a/config/config.json5 b/config/config.json5 index 54e41f5..f4bd9e2 100644 --- a/config/config.json5 +++ b/config/config.json5 @@ -1,5 +1,5 @@ { - "app_title": "Deja-vu: Clone Tool", + "app_title": "Deja-vu", "clone_app_path": "C:/Program Files/Some Clone Tool/app.exe", "keybindings": { "ScanDisks": { diff --git a/core/src/components/title.rs b/core/src/components/title.rs index 243b064..ee4f088 100644 --- a/core/src/components/title.rs +++ b/core/src/components/title.rs @@ -27,11 +27,15 @@ use crate::{action::Action, config::Config}; pub struct Title { command_tx: Option>, config: Config, + text: String, } impl Title { - pub fn new() -> Self { - Self::default() + pub fn new(text: &str) -> Self { + Self { + text: String::from(text), + ..Default::default() + } } } @@ -56,7 +60,7 @@ impl Component for Title { fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { // Title Block let title_text = Span::styled( - self.config.app_title.as_str(), + format!("{}: {}", self.config.app_title.as_str(), self.text), Style::default().fg(Color::LightCyan), ); let title = Paragraph::new(Line::from(title_text).centered()) diff --git a/deja_vu/Cargo.toml b/deja_vu/Cargo.toml index 4d6a2ba..5cee449 100644 --- a/deja_vu/Cargo.toml +++ b/deja_vu/Cargo.toml @@ -20,8 +20,6 @@ edition = "2021" license = "GPL" version = "0.2.0" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] core = { path = "../core" } color-eyre = "0.6.3" diff --git a/deja_vu/src/app.rs b/deja_vu/src/app.rs index d06e3ab..4acea6e 100644 --- a/deja_vu/src/app.rs +++ b/deja_vu/src/app.rs @@ -12,7 +12,6 @@ // // You should have received a copy of the GNU General Public License // along with Deja-vu. If not, see . -// use core::{ action::Action, @@ -77,7 +76,7 @@ impl App { action_rx, action_tx, components: vec![ - Box::new(Title::new()), + Box::new(Title::new("Clone Tool")), Box::new(FpsCounter::new()), Box::new(Left::new()), Box::new(Right::new()),