added thumbs to @channel page
This commit is contained in:
parent
df2ee1b026
commit
8a9b1ea0cf
3 changed files with 4 additions and 2 deletions
|
@ -266,7 +266,7 @@ db['getAllChannelClaims'] = (channelId) => {
|
|||
return new Promise((resolve, reject) => {
|
||||
logger.debug(`finding all claims in channel "${channelId}"`);
|
||||
db
|
||||
.sequelize.query(`SELECT name, claimId, outpoint, height, address, contentType, title, description, license FROM Claim WHERE certificateId = '${channelId}' ORDeR BY height DESC;`, { type: db.sequelize.QueryTypes.SELECT })
|
||||
.sequelize.query(`SELECT name, claimId, outpoint, height, address, contentType, title, description, license, thumbnail FROM Claim WHERE certificateId = '${channelId}' ORDeR BY height DESC;`, { type: db.sequelize.QueryTypes.SELECT })
|
||||
.then(result => {
|
||||
switch (result.length) {
|
||||
case 0:
|
||||
|
|
|
@ -132,6 +132,7 @@ module.exports = (app) => {
|
|||
channelName,
|
||||
channelContents,
|
||||
};
|
||||
logger.debug(handlebarsData);
|
||||
res.status(200).render('channel', handlebarsData);
|
||||
}
|
||||
})
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
<h3>{{this.channelName}}</h3>
|
||||
<p>Below are all the free claims in this channel.</p>
|
||||
{{#each channelContents}}
|
||||
<script>console.log(this)</script>
|
||||
<div class="all-claims-item">
|
||||
<a href="/{{this.channelName}}:{{this.shortChannelId}}/{{this.name}}.{{this.fileExtension}}">
|
||||
{{#ifConditional this.contentType '===' 'video/mp4'}}
|
||||
<img class="all-claims-asset" src="/assets/img/content-freedom-large.png"/>
|
||||
<img class="all-claims-asset" src="{{this.thumbnail}}"/>
|
||||
{{else}}
|
||||
<img class="all-claims-asset" src="/{{this.claimId}}/{{this.name}}.{{this.fileExtension}}" />
|
||||
{{/ifConditional}}
|
||||
|
|
Loading…
Reference in a new issue