From 86130a80ceff05a0afb7e17d959a3a3c76ac8144 Mon Sep 17 00:00:00 2001 From: DevITWay Date: Mon, 26 Jan 2026 17:31:39 +0000 Subject: [PATCH] Display version dynamically in UI sidebar - Add VERSION constant using CARGO_PKG_VERSION - Show version in both light and dark theme sidebars - Update workspace version to 0.2.7 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- nora-registry/src/ui/components.rs | 13 +++++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e1832ae..911d7c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1185,7 +1185,7 @@ checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" [[package]] name = "nora-cli" -version = "0.1.0" +version = "0.2.7" dependencies = [ "clap", "flate2", @@ -1199,7 +1199,7 @@ dependencies = [ [[package]] name = "nora-registry" -version = "0.1.0" +version = "0.2.7" dependencies = [ "async-trait", "axum", @@ -1234,7 +1234,7 @@ dependencies = [ [[package]] name = "nora-storage" -version = "0.1.0" +version = "0.2.7" dependencies = [ "axum", "base64", diff --git a/Cargo.toml b/Cargo.toml index 0dfa6ff..57a5f00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.package] -version = "0.1.0" +version = "0.2.7" edition = "2021" license = "MIT" authors = ["DevITWay "] diff --git a/nora-registry/src/ui/components.rs b/nora-registry/src/ui/components.rs index 6fa37c1..09dc577 100644 --- a/nora-registry/src/ui/components.rs +++ b/nora-registry/src/ui/components.rs @@ -1,3 +1,6 @@ +/// Application version from Cargo.toml +const VERSION: &str = env!("CARGO_PKG_VERSION"); + /// Main layout wrapper with header and sidebar pub fn layout(title: &str, content: &str, active_page: Option<&str>) -> String { format!( @@ -202,13 +205,14 @@ fn sidebar_dark(active_page: Option<&str>) -> String {
- Nora v0.2.0 + Nora v{}
"#, super::logo::LOGO_BASE64, - nav_html + nav_html, + VERSION ) } @@ -563,13 +567,14 @@ fn sidebar(active_page: Option<&str>) -> String {
- Nora v0.2.0 + Nora v{}
"#, super::logo::LOGO_BASE64, - nav_html + nav_html, + VERSION ) }