moved all thumbnail url decisions to server-side

This commit is contained in:
bill bittner 2017-09-11 12:54:36 -07:00
parent 83b5400c9c
commit 6158ef9724
3 changed files with 5 additions and 6 deletions

View file

@ -157,6 +157,9 @@ module.exports = {
element['showUrlLong'] = `/${channelName}:${longChannelId}/${element.name}`;
element['directUrlLong'] = `/${channelName}:${longChannelId}/${element.name}.${fileExtenstion}`;
element['directUrlShort'] = `/${channelName}:${shortChannelId}/${element.name}.${fileExtenstion}`;
if (!element.thumbnail || element.thumbnail === '') {
element['thumbnail'] = 'https://spee.ch/assets/img/content-freedom-large.png';
}
});
}
return resolve(allChannelClaims);

View file

@ -155,7 +155,7 @@ module.exports = {
element['directUrlLong'] = `/${element.claimId}/${element.name}.${fileExtenstion}`;
element['directUrlShort'] = `/${element.claimId}/${element.name}.${fileExtenstion}`;
element['contentType'] = element.fileType;
element['thumbnail'] = '';
element['thumbnail'] = 'https://spee.ch/assets/img/content-freedom-large.png';
});
}
resolve(results);

View file

@ -1,11 +1,7 @@
<div class='content-list-card'>
<a href="{{this.showUrlLong}}"><span class='content-list-card-link'></span></a>
{{#ifConditional this.contentType '===' 'video/mp4'}}
{{#ifConditional this.thumbnail '===' ''}}
<img class="content-list-asset" src="/assets/img/content-freedom-large.png"/>
{{else}}
<img class="content-list-asset" src="{{this.thumbnail}}"/>
{{/ifConditional}}
{{else}}
<img class="content-list-asset" src="{{this.directUrlLong}}" />
{{/ifConditional}}