thumbnail should be converted

This commit is contained in:
Niels Lyngsø
2020-08-19 13:38:35 +02:00
parent 93da8c4b55
commit ac44dc7559
2 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<div class="__showcase" ng-style="{'background-color':vm.blockConfigModel.backgroundColor, 'background-image': vm.blockConfigModel.thumbnail ? 'url('+vm.blockConfigModel.thumbnail+'?upscale=false&width=400)' : 'transparent'}">
<div class="__showcase" ng-style="{'background-color':vm.blockConfigModel.backgroundColor, 'background-image': vm.thumbnail ? 'url('+vm.thumbnail+'?upscale=false&width=400)' : 'transparent'}">
<i ng-if="vm.blockConfigModel.thumbnail == null && vm.elementTypeModel.icon" class="__icon {{ vm.elementTypeModel.icon }}" ng-style="{'color':vm.blockConfigModel.iconColor}" aria-hidden="true"></i>
</div>
<div class="__info">

View File

@@ -14,10 +14,16 @@
}
});
function BlockCardController() {
function BlockCardController(umbRequestHelper) {
var vm = this;
vm.$onInit = function() {
if(vm.blockConfigModel.thumbnail != null && vm.blockConfigModel.thumbnail != "") {
vm.thumbnail = convertVirtualToAbsolutePath(vm.blockConfigModel.thumbnail);
}
}
}
})();