moved all thumbnail url decisions to server-side
This commit is contained in:
parent
83b5400c9c
commit
6158ef9724
3 changed files with 5 additions and 6 deletions
|
@ -157,6 +157,9 @@ module.exports = {
|
||||||
element['showUrlLong'] = `/${channelName}:${longChannelId}/${element.name}`;
|
element['showUrlLong'] = `/${channelName}:${longChannelId}/${element.name}`;
|
||||||
element['directUrlLong'] = `/${channelName}:${longChannelId}/${element.name}.${fileExtenstion}`;
|
element['directUrlLong'] = `/${channelName}:${longChannelId}/${element.name}.${fileExtenstion}`;
|
||||||
element['directUrlShort'] = `/${channelName}:${shortChannelId}/${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);
|
return resolve(allChannelClaims);
|
||||||
|
|
|
@ -155,7 +155,7 @@ module.exports = {
|
||||||
element['directUrlLong'] = `/${element.claimId}/${element.name}.${fileExtenstion}`;
|
element['directUrlLong'] = `/${element.claimId}/${element.name}.${fileExtenstion}`;
|
||||||
element['directUrlShort'] = `/${element.claimId}/${element.name}.${fileExtenstion}`;
|
element['directUrlShort'] = `/${element.claimId}/${element.name}.${fileExtenstion}`;
|
||||||
element['contentType'] = element.fileType;
|
element['contentType'] = element.fileType;
|
||||||
element['thumbnail'] = '';
|
element['thumbnail'] = 'https://spee.ch/assets/img/content-freedom-large.png';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
resolve(results);
|
resolve(results);
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<div class='content-list-card'>
|
<div class='content-list-card'>
|
||||||
<a href="{{this.showUrlLong}}"><span class='content-list-card-link'></span></a>
|
<a href="{{this.showUrlLong}}"><span class='content-list-card-link'></span></a>
|
||||||
{{#ifConditional this.contentType '===' 'video/mp4'}}
|
{{#ifConditional this.contentType '===' 'video/mp4'}}
|
||||||
{{#ifConditional this.thumbnail '===' ''}}
|
<img class="content-list-asset" src="{{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}}
|
{{else}}
|
||||||
<img class="content-list-asset" src="{{this.directUrlLong}}" />
|
<img class="content-list-asset" src="{{this.directUrlLong}}" />
|
||||||
{{/ifConditional}}
|
{{/ifConditional}}
|
||||||
|
|
Loading…
Reference in a new issue