fix img / comments img

This commit is contained in:
lesion 2019-06-26 18:37:02 +02:00
parent 63c01d2629
commit c6fb23810a
4 changed files with 22 additions and 14 deletions

View file

@ -1,4 +1,3 @@
const path = require('path')
const fs = require('fs')
const config_path = process.env.config_path

View file

@ -19,7 +19,7 @@
v-icon(name='chevron-right')
//- image
img(:src='imgPath' v-if='event.image_path')
img.main(:src='imgPath' v-if='event.image_path')
.info
div {{event|event_when}}
@ -40,9 +40,10 @@
el-button(plain type='primary' size='mini' @click='$router.replace(`/add/${event.id}`)') {{$t('common.edit')}}
//- comments
.card-body(v-if='event.activitypub_id && settings')
#comments.card-body(v-if='event.activitypub_id && settings')
strong {{$t('common.related')}} -
a(:href='`https://${settings.mastodon_instance}/web/statuses/${event.activitypub_id}`') {{$t('common.add')}}
.card-header(v-for='comment in event.comments' :key='comment.id')
img.avatar(:src='comment.data.account.avatar')
strong {{comment.data.account.display_name}} {{comment.data.account.username}}
@ -193,9 +194,17 @@ export default {
}
img {
max-width: 100%;
max-height: 89vh;
object-fit: contain;
&.main {
width: 100%;
}
}
#comments {
img {
max-width: 100%;
}
}
.avatar {

View file

@ -189,7 +189,7 @@ const eventController = {
[Tag, 'weigth', 'DESC']
],
include: [
{ model: Tag, required: false, attributes: ['tag', 'weigth', 'color'] },
{ model: Tag, required: false, attributes: ['tag', 'weigth'] },
{ model: Place, required: false, attributes: ['id', 'name', 'address'] }
]
})

View file

@ -26,7 +26,7 @@ module.exports = {
return -1
} catch(e) {}
await db.sequelize.sync({force: true}).catch(e => {
await db.sequelize.sync().catch(e => {
consola.error('Error creating tables', e)
return -1
})