Language attribute added to post and postCard

This commit is contained in:
Moriz Wahl 2019-11-11 22:42:37 +01:00
parent 19602d7311
commit d0c0fd373a
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
<template>
<ds-card
:language="language"
:image="post.image | proxyApiUrl"
:class="{ 'post-card': true, 'disabled-content': post.disabled, 'post--pinned': isPinned }"
>
@ -117,6 +118,10 @@ export default {
this.deletePostCallback,
)
},
language() {
// if older posts have language not set I assume German as language
return this.post.language ? this.post.language : 'de'
},
isPinned() {
return this.post && this.post.pinnedBy
},

View File

@ -1,6 +1,7 @@
<template>
<transition name="fade" appear>
<ds-card
:language="language"
v-if="post && ready"
:image="post.image | proxyApiUrl"
:class="{ 'post-card': true, 'disabled-content': post.disabled }"
@ -147,6 +148,10 @@ export default {
this.deletePostCallback,
)
},
language() {
// if older posts have language not set I assume German as language
return this.post.language ? this.post.language : 'de'
},
},
methods: {
isAuthor(id) {