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
This commit is contained in:
2026-01-26 17:31:39 +00:00
parent 80a96527fa
commit 5eca1817af
3 changed files with 13 additions and 8 deletions

6
Cargo.lock generated
View File

@@ -1185,7 +1185,7 @@ checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21"
[[package]] [[package]]
name = "nora-cli" name = "nora-cli"
version = "0.1.0" version = "0.2.7"
dependencies = [ dependencies = [
"clap", "clap",
"flate2", "flate2",
@@ -1199,7 +1199,7 @@ dependencies = [
[[package]] [[package]]
name = "nora-registry" name = "nora-registry"
version = "0.1.0" version = "0.2.7"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"axum", "axum",
@@ -1234,7 +1234,7 @@ dependencies = [
[[package]] [[package]]
name = "nora-storage" name = "nora-storage"
version = "0.1.0" version = "0.2.7"
dependencies = [ dependencies = [
"axum", "axum",
"base64", "base64",

View File

@@ -7,7 +7,7 @@ members = [
] ]
[workspace.package] [workspace.package]
version = "0.1.0" version = "0.2.7"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
authors = ["DevITWay <devitway@gmail.com>"] authors = ["DevITWay <devitway@gmail.com>"]

View File

@@ -1,3 +1,6 @@
/// Application version from Cargo.toml
const VERSION: &str = env!("CARGO_PKG_VERSION");
/// Main layout wrapper with header and sidebar /// Main layout wrapper with header and sidebar
pub fn layout(title: &str, content: &str, active_page: Option<&str>) -> String { pub fn layout(title: &str, content: &str, active_page: Option<&str>) -> String {
format!( format!(
@@ -202,13 +205,14 @@ fn sidebar_dark(active_page: Option<&str>) -> String {
</nav> </nav>
<div class="px-4 py-4 border-t border-slate-700"> <div class="px-4 py-4 border-t border-slate-700">
<div class="text-xs text-slate-400"> <div class="text-xs text-slate-400">
Nora v0.2.0 Nora v{}
</div> </div>
</div> </div>
</div> </div>
"#, "#,
super::logo::LOGO_BASE64, super::logo::LOGO_BASE64,
nav_html nav_html,
VERSION
) )
} }
@@ -563,13 +567,14 @@ fn sidebar(active_page: Option<&str>) -> String {
<!-- Footer --> <!-- Footer -->
<div class="px-4 py-4 border-t border-slate-700"> <div class="px-4 py-4 border-t border-slate-700">
<div class="text-xs text-slate-400"> <div class="text-xs text-slate-400">
Nora v0.2.0 Nora v{}
</div> </div>
</div> </div>
</div> </div>
"#, "#,
super::logo::LOGO_BASE64, super::logo::LOGO_BASE64,
nav_html nav_html,
VERSION
) )
} }