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 fs = require('fs')
|
||||||
|
|
||||||
const config_path = process.env.config_path
|
const config_path = process.env.config_path
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
v-icon(name='chevron-right')
|
v-icon(name='chevron-right')
|
||||||
|
|
||||||
//- image
|
//- image
|
||||||
img(:src='imgPath' v-if='event.image_path')
|
img.main(:src='imgPath' v-if='event.image_path')
|
||||||
|
|
||||||
.info
|
.info
|
||||||
div {{event|event_when}}
|
div {{event|event_when}}
|
||||||
|
@ -40,17 +40,18 @@
|
||||||
el-button(plain type='primary' size='mini' @click='$router.replace(`/add/${event.id}`)') {{$t('common.edit')}}
|
el-button(plain type='primary' size='mini' @click='$router.replace(`/add/${event.id}`)') {{$t('common.edit')}}
|
||||||
|
|
||||||
//- comments
|
//- comments
|
||||||
.card-body(v-if='event.activitypub_id && settings')
|
#comments.card-body(v-if='event.activitypub_id && settings')
|
||||||
strong {{$t('common.related')}} -
|
strong {{$t('common.related')}} -
|
||||||
a(:href='`https://${settings.mastodon_instance}/web/statuses/${event.activitypub_id}`') {{$t('common.add')}}
|
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')
|
.card-header(v-for='comment in event.comments' :key='comment.id')
|
||||||
strong {{comment.data.account.display_name}} {{comment.data.account.username}}
|
img.avatar(:src='comment.data.account.avatar')
|
||||||
//- a.float-right(:href='comment.data.url')
|
strong {{comment.data.account.display_name}} {{comment.data.account.username}}
|
||||||
a.float-right(:href='`https://${settings.mastodon_instance}/web/statuses/${comment.data.id}`')
|
//- a.float-right(:href='comment.data.url')
|
||||||
small {{comment.data.created_at|datetime}}
|
a.float-right(:href='`https://${settings.mastodon_instance}/web/statuses/${comment.data.id}`')
|
||||||
div.mt-1(v-html='comment_filter(comment.data.content)')
|
small {{comment.data.created_at|datetime}}
|
||||||
img(v-for='img in comment.data.media_attachments' :src='img.url')
|
div.mt-1(v-html='comment_filter(comment.data.content)')
|
||||||
|
img(v-for='img in comment.data.media_attachments' :src='img.url')
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -193,9 +194,17 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
|
||||||
max-height: 89vh;
|
max-height: 89vh;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
&.main {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#comments {
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
|
|
|
@ -189,7 +189,7 @@ const eventController = {
|
||||||
[Tag, 'weigth', 'DESC']
|
[Tag, 'weigth', 'DESC']
|
||||||
],
|
],
|
||||||
include: [
|
include: [
|
||||||
{ model: Tag, required: false, attributes: ['tag', 'weigth', 'color'] },
|
{ model: Tag, required: false, attributes: ['tag', 'weigth'] },
|
||||||
{ model: Place, required: false, attributes: ['id', 'name', 'address'] }
|
{ model: Place, required: false, attributes: ['id', 'name', 'address'] }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = {
|
||||||
return -1
|
return -1
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
await db.sequelize.sync({force: true}).catch(e => {
|
await db.sequelize.sync().catch(e => {
|
||||||
consola.error('Error creating tables', e)
|
consola.error('Error creating tables', e)
|
||||||
return -1
|
return -1
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue