Make dashboard titles customizable
	
		
			
	
		
	
	
		
	
		
			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:
		@@ -14,6 +14,9 @@ struct ServerConfig {
 | 
			
		||||
    constraints: StaticConstraints,
 | 
			
		||||
    unsecure_origin: String,
 | 
			
		||||
    backend_version: &'static str,
 | 
			
		||||
    dashboard_custom_current_consumption_title: Option<&'static str>,
 | 
			
		||||
    dashboard_custom_relays_consumption_title: Option<&'static str>,
 | 
			
		||||
    dashboard_custom_cached_consumption_title: Option<&'static str>,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl Default for ServerConfig {
 | 
			
		||||
@@ -23,6 +26,15 @@ impl Default for ServerConfig {
 | 
			
		||||
            constraints: Default::default(),
 | 
			
		||||
            unsecure_origin: AppConfig::get().unsecure_origin(),
 | 
			
		||||
            backend_version: env!("CARGO_PKG_VERSION"),
 | 
			
		||||
            dashboard_custom_current_consumption_title: AppConfig::get()
 | 
			
		||||
                .dashboard_custom_current_consumption_title
 | 
			
		||||
                .as_deref(),
 | 
			
		||||
            dashboard_custom_relays_consumption_title: AppConfig::get()
 | 
			
		||||
                .dashboard_custom_relays_consumption_title
 | 
			
		||||
                .as_deref(),
 | 
			
		||||
            dashboard_custom_cached_consumption_title: AppConfig::get()
 | 
			
		||||
                .dashboard_custom_cached_consumption_title
 | 
			
		||||
                .as_deref(),
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user