Display app version for administrators
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9bdce94487
commit
433572293b
@ -17,6 +17,7 @@ pub(crate) struct BaseSettingsPage {
|
|||||||
pub app_name: &'static str,
|
pub app_name: &'static str,
|
||||||
pub is_admin: bool,
|
pub is_admin: bool,
|
||||||
pub user_name: String,
|
pub user_name: String,
|
||||||
|
pub version: &'static str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BaseSettingsPage {
|
impl BaseSettingsPage {
|
||||||
@ -29,6 +30,7 @@ impl BaseSettingsPage {
|
|||||||
app_name: APP_NAME,
|
app_name: APP_NAME,
|
||||||
is_admin: user.admin,
|
is_admin: user.admin,
|
||||||
user_name: user.username.to_string(),
|
user_name: user.username.to_string(),
|
||||||
|
version: env!("CARGO_PKG_VERSION"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
|
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
|
||||||
<span class="fs-4">{{ _p.app_name }}</span>
|
<span class="fs-4">{{ _p.app_name }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{% if _p.is_admin %}
|
||||||
|
<span>Version {{ _p.version }}</span>
|
||||||
|
{% endif %}
|
||||||
<hr>
|
<hr>
|
||||||
<ul class="nav nav-pills flex-column mb-auto">
|
<ul class="nav nav-pills flex-column mb-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@ -81,6 +84,7 @@
|
|||||||
else el.classList.remove("active")
|
else el.classList.remove("active")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user