Be explicit about backgroundImage existance

This commit is contained in:
Johannes Zellner
2022-05-17 15:25:19 +02:00
parent 3922448a77
commit 319db4a9b1
4 changed files with 22 additions and 7 deletions

View File

@@ -132,7 +132,10 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
$scope.config = Client.getConfig();
document.getElementById('mainContentContainer').style.backgroundImage = 'url("' + Client.getBackgroundImageUrl() + '")';
if (Client.getUserInfo().hasBackgroundImage) {
document.getElementById('mainContentContainer').style.backgroundImage = 'url("' + Client.getBackgroundImageUrl() + '")';
document.getElementById('mainContentContainer').classList.add('has-background');
}
$scope.initialized = true;