mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix img / comments img
This commit is contained in:
parent
63c01d2629
commit
c6fb23810a
4 changed files with 22 additions and 14 deletions
|
@ -1,4 +1,3 @@
|
|||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
const config_path = process.env.config_path
|
||||
|
|
|
@ -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,17 +40,18 @@
|
|||
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}}
|
||||
//- a.float-right(:href='comment.data.url')
|
||||
a.float-right(:href='`https://${settings.mastodon_instance}/web/statuses/${comment.data.id}`')
|
||||
small {{comment.data.created_at|datetime}}
|
||||
div.mt-1(v-html='comment_filter(comment.data.content)')
|
||||
img(v-for='img in comment.data.media_attachments' :src='img.url')
|
||||
|
||||
.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}}
|
||||
//- a.float-right(:href='comment.data.url')
|
||||
a.float-right(:href='`https://${settings.mastodon_instance}/web/statuses/${comment.data.id}`')
|
||||
small {{comment.data.created_at|datetime}}
|
||||
div.mt-1(v-html='comment_filter(comment.data.content)')
|
||||
img(v-for='img in comment.data.media_attachments' :src='img.url')
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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'] }
|
||||
]
|
||||
})
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue