mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix: long comments can be folded up and down
This commit is contained in:
parent
5a80c6df6f
commit
d85f49fb15
@ -23,10 +23,27 @@
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<!-- TODO: replace editor content with tiptap render view -->
|
||||
<ds-space margin-bottom="small" />
|
||||
<div style="padding-left: 40px;" v-html="comment.contentExcerpt" />
|
||||
<!-- eslint-enable vue/no-v-html -->
|
||||
<div v-if="!isActive" v-html="comment.contentExcerpt" style="padding-left: 40px;" />
|
||||
<div v-show="comment.content.length !== comment.contentExcerpt.length">
|
||||
<span
|
||||
v-if="!isActive"
|
||||
style="padding-left: 40px; color: #17b53f; cursor:pointer"
|
||||
@click="isActive = !isActive"
|
||||
>
|
||||
{{ $t('comment.show.more') }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="isActive" v-html="comment.content" style="padding-left: 40px;" />
|
||||
<span
|
||||
v-if="isActive"
|
||||
@click="isActive = !isActive"
|
||||
style="padding-left: 40px; color: #17b53f; cursor:pointer"
|
||||
>
|
||||
{{ $t('comment.show.less') }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<!-- eslint-enable vue/no-v-html -->
|
||||
|
||||
<script>
|
||||
import gql from 'graphql-tag'
|
||||
@ -35,6 +52,11 @@ import HcUser from '~/components/User'
|
||||
import ContentMenu from '~/components/ContentMenu'
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
isActive: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
HcUser,
|
||||
ContentMenu,
|
||||
|
||||
@ -8,6 +8,7 @@ export default app => {
|
||||
comments(orderBy: createdAt_asc) {
|
||||
id
|
||||
contentExcerpt
|
||||
content
|
||||
createdAt
|
||||
disabled
|
||||
deleted
|
||||
|
||||
@ -169,6 +169,10 @@
|
||||
"menu": {
|
||||
"edit": "Kommentar bearbeiten",
|
||||
"delete": "Kommentar löschen"
|
||||
},
|
||||
"show": {
|
||||
"more": "mehr anzeigen",
|
||||
"less": "weniger anzeigen"
|
||||
}
|
||||
},
|
||||
"quotes": {
|
||||
|
||||
@ -169,7 +169,12 @@
|
||||
"menu": {
|
||||
"edit": "Edit Comment",
|
||||
"delete": "Delete Comment"
|
||||
},
|
||||
"show": {
|
||||
"more": "show more",
|
||||
"less": "show less"
|
||||
}
|
||||
|
||||
},
|
||||
"quotes": {
|
||||
"african": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user