mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +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 -->
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<!-- TODO: replace editor content with tiptap render view -->
|
<!-- TODO: replace editor content with tiptap render view -->
|
||||||
<ds-space margin-bottom="small" />
|
<ds-space margin-bottom="small" />
|
||||||
<div style="padding-left: 40px;" v-html="comment.contentExcerpt" />
|
<div v-if="!isActive" v-html="comment.contentExcerpt" style="padding-left: 40px;" />
|
||||||
<!-- eslint-enable vue/no-v-html -->
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- eslint-enable vue/no-v-html -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
@ -35,6 +52,11 @@ import HcUser from '~/components/User'
|
|||||||
import ContentMenu from '~/components/ContentMenu'
|
import ContentMenu from '~/components/ContentMenu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
isActive: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
HcUser,
|
HcUser,
|
||||||
ContentMenu,
|
ContentMenu,
|
||||||
|
|||||||
@ -8,6 +8,7 @@ export default app => {
|
|||||||
comments(orderBy: createdAt_asc) {
|
comments(orderBy: createdAt_asc) {
|
||||||
id
|
id
|
||||||
contentExcerpt
|
contentExcerpt
|
||||||
|
content
|
||||||
createdAt
|
createdAt
|
||||||
disabled
|
disabled
|
||||||
deleted
|
deleted
|
||||||
|
|||||||
@ -169,6 +169,10 @@
|
|||||||
"menu": {
|
"menu": {
|
||||||
"edit": "Kommentar bearbeiten",
|
"edit": "Kommentar bearbeiten",
|
||||||
"delete": "Kommentar löschen"
|
"delete": "Kommentar löschen"
|
||||||
|
},
|
||||||
|
"show": {
|
||||||
|
"more": "mehr anzeigen",
|
||||||
|
"less": "weniger anzeigen"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"quotes": {
|
"quotes": {
|
||||||
|
|||||||
@ -169,7 +169,12 @@
|
|||||||
"menu": {
|
"menu": {
|
||||||
"edit": "Edit Comment",
|
"edit": "Edit Comment",
|
||||||
"delete": "Delete Comment"
|
"delete": "Delete Comment"
|
||||||
|
},
|
||||||
|
"show": {
|
||||||
|
"more": "show more",
|
||||||
|
"less": "show less"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"quotes": {
|
"quotes": {
|
||||||
"african": {
|
"african": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user