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:
		@@ -17,6 +17,7 @@ pub(crate) struct BaseSettingsPage {
 | 
			
		||||
    pub app_name: &'static str,
 | 
			
		||||
    pub is_admin: bool,
 | 
			
		||||
    pub user_name: String,
 | 
			
		||||
    pub version: &'static str,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl BaseSettingsPage {
 | 
			
		||||
@@ -29,6 +30,7 @@ impl BaseSettingsPage {
 | 
			
		||||
            app_name: APP_NAME,
 | 
			
		||||
            is_admin: user.admin,
 | 
			
		||||
            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">
 | 
			
		||||
        <span class="fs-4">{{ _p.app_name }}</span>
 | 
			
		||||
    </a>
 | 
			
		||||
    {% if _p.is_admin %}
 | 
			
		||||
        <span>Version {{ _p.version }}</span>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    <hr>
 | 
			
		||||
    <ul class="nav nav-pills flex-column mb-auto">
 | 
			
		||||
        <li class="nav-item">
 | 
			
		||||
@@ -81,6 +84,7 @@
 | 
			
		||||
    else el.classList.remove("active")
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user