mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Show that a Post/Comment has been edited
This commit is contained in:
parent
f4e0fc8e01
commit
a5e3c52e1d
@ -12,8 +12,17 @@
|
|||||||
<div v-else :class="{ comment: true, 'disabled-content': comment.deleted || comment.disabled }">
|
<div v-else :class="{ comment: true, 'disabled-content': comment.deleted || comment.disabled }">
|
||||||
<ds-card :id="anchor">
|
<ds-card :id="anchor">
|
||||||
<ds-space margin-bottom="small" margin-top="small">
|
<ds-space margin-bottom="small" margin-top="small">
|
||||||
|
<ds-flex>
|
||||||
|
<ds-flex-item width="40%">
|
||||||
<hc-user :user="author" :date-time="comment.createdAt" />
|
<hc-user :user="author" :date-time="comment.createdAt" />
|
||||||
<!-- Content Menu (can open Modals) -->
|
</ds-flex-item>
|
||||||
|
<ds-flex-item>
|
||||||
|
<ds-text v-if="comment.createdAt !== comment.updatedAt" color="softer" class="italics">
|
||||||
|
{{ this.$t('comment.edited') }}
|
||||||
|
</ds-text>
|
||||||
|
</ds-flex-item>
|
||||||
|
<ds-flex-item>
|
||||||
|
<ds-space margin-top="base">
|
||||||
<client-only>
|
<client-only>
|
||||||
<content-menu
|
<content-menu
|
||||||
v-show="!openEditCommentMenu"
|
v-show="!openEditCommentMenu"
|
||||||
@ -27,6 +36,10 @@
|
|||||||
/>
|
/>
|
||||||
</client-only>
|
</client-only>
|
||||||
</ds-space>
|
</ds-space>
|
||||||
|
</ds-flex-item>
|
||||||
|
</ds-flex>
|
||||||
|
<!-- Content Menu (can open Modals) -->
|
||||||
|
</ds-space>
|
||||||
<div v-if="openEditCommentMenu">
|
<div v-if="openEditCommentMenu">
|
||||||
<hc-comment-form
|
<hc-comment-form
|
||||||
:update="true"
|
:update="true"
|
||||||
@ -199,4 +212,8 @@ span.show-more-or-less {
|
|||||||
margin: 0px 20px;
|
margin: 0px 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ds-text.italics {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -10,6 +10,7 @@ export default i18n => {
|
|||||||
contentExcerpt
|
contentExcerpt
|
||||||
content
|
content
|
||||||
createdAt
|
createdAt
|
||||||
|
updatedAt
|
||||||
disabled
|
disabled
|
||||||
deleted
|
deleted
|
||||||
author {
|
author {
|
||||||
@ -39,6 +40,7 @@ export default i18n => {
|
|||||||
contentExcerpt
|
contentExcerpt
|
||||||
content
|
content
|
||||||
createdAt
|
createdAt
|
||||||
|
updatedAt
|
||||||
disabled
|
disabled
|
||||||
deleted
|
deleted
|
||||||
author {
|
author {
|
||||||
|
|||||||
@ -40,6 +40,7 @@ export const postFragment = lang => gql`
|
|||||||
content
|
content
|
||||||
contentExcerpt
|
contentExcerpt
|
||||||
createdAt
|
createdAt
|
||||||
|
updatedAt
|
||||||
disabled
|
disabled
|
||||||
deleted
|
deleted
|
||||||
slug
|
slug
|
||||||
@ -64,6 +65,7 @@ export const commentFragment = lang => gql`
|
|||||||
fragment comment on Comment {
|
fragment comment on Comment {
|
||||||
id
|
id
|
||||||
createdAt
|
createdAt
|
||||||
|
updatedAt
|
||||||
disabled
|
disabled
|
||||||
deleted
|
deleted
|
||||||
content
|
content
|
||||||
|
|||||||
@ -335,7 +335,8 @@
|
|||||||
"submit": "Kommentiere",
|
"submit": "Kommentiere",
|
||||||
"submitted": "Kommentar Gesendet",
|
"submitted": "Kommentar Gesendet",
|
||||||
"updated": "Änderungen gespeichert"
|
"updated": "Änderungen gespeichert"
|
||||||
}
|
},
|
||||||
|
"edited": "bearbeitet"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -348,7 +349,8 @@
|
|||||||
"show": {
|
"show": {
|
||||||
"more": "mehr anzeigen",
|
"more": "mehr anzeigen",
|
||||||
"less": "weniger anzeigen"
|
"less": "weniger anzeigen"
|
||||||
}
|
},
|
||||||
|
"edited": "bearbeitet"
|
||||||
},
|
},
|
||||||
"quotes": {
|
"quotes": {
|
||||||
"african": {
|
"african": {
|
||||||
|
|||||||
@ -336,7 +336,8 @@
|
|||||||
"submit": "Comment",
|
"submit": "Comment",
|
||||||
"submitted": "Comment Submitted",
|
"submitted": "Comment Submitted",
|
||||||
"updated": "Changes Saved"
|
"updated": "Changes Saved"
|
||||||
}
|
},
|
||||||
|
"edited": "edited"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -349,7 +350,8 @@
|
|||||||
"show": {
|
"show": {
|
||||||
"more": "show more",
|
"more": "show more",
|
||||||
"less": "show less"
|
"less": "show less"
|
||||||
}
|
},
|
||||||
|
"edited": "edited"
|
||||||
},
|
},
|
||||||
"quotes": {
|
"quotes": {
|
||||||
"african": {
|
"african": {
|
||||||
|
|||||||
@ -118,7 +118,11 @@
|
|||||||
},
|
},
|
||||||
"takeAction": {
|
"takeAction": {
|
||||||
"name": "Tomar uma ação"
|
"name": "Tomar uma ação"
|
||||||
}
|
},
|
||||||
|
"comment": {
|
||||||
|
"submit": "Commentar"
|
||||||
|
},
|
||||||
|
"edited": "editado"
|
||||||
},
|
},
|
||||||
"quotes": {
|
"quotes": {
|
||||||
"african": {
|
"african": {
|
||||||
@ -202,9 +206,19 @@
|
|||||||
"delete": "Apagar Contribuição"
|
"delete": "Apagar Contribuição"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
|
"content": {
|
||||||
|
"unavailable-placeholder": "… este commenttário não está disponível"
|
||||||
|
},
|
||||||
|
"menu": {
|
||||||
"edit": "Editar Comentário",
|
"edit": "Editar Comentário",
|
||||||
"delete": "Apagar Comentário"
|
"delete": "Apagar Comentário"
|
||||||
},
|
},
|
||||||
|
"show": {
|
||||||
|
"more": "mostrar mais",
|
||||||
|
"less": "mostrar menos"
|
||||||
|
},
|
||||||
|
"edited": "editado"
|
||||||
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Seguir",
|
"follow": "Seguir",
|
||||||
"following": "Seguindo"
|
"following": "Seguindo"
|
||||||
|
|||||||
@ -6,8 +6,17 @@
|
|||||||
:class="{ 'post-card': true, 'disabled-content': post.disabled }"
|
:class="{ 'post-card': true, 'disabled-content': post.disabled }"
|
||||||
>
|
>
|
||||||
<ds-space margin-bottom="small" />
|
<ds-space margin-bottom="small" />
|
||||||
|
<ds-flex>
|
||||||
|
<ds-flex-item width="40%">
|
||||||
<hc-user :user="post.author" :date-time="post.createdAt" />
|
<hc-user :user="post.author" :date-time="post.createdAt" />
|
||||||
<!-- Content Menu (can open Modals) -->
|
</ds-flex-item>
|
||||||
|
<ds-flex-item>
|
||||||
|
<ds-text v-if="post.createdAt !== post.updatedAt" color="softer" class="italics">
|
||||||
|
{{ this.$t('post.edited') }}
|
||||||
|
</ds-text>
|
||||||
|
</ds-flex-item>
|
||||||
|
<ds-flex-item>
|
||||||
|
<ds-space margin-top="base">
|
||||||
<client-only>
|
<client-only>
|
||||||
<content-menu
|
<content-menu
|
||||||
placement="bottom-end"
|
placement="bottom-end"
|
||||||
@ -17,6 +26,10 @@
|
|||||||
:is-owner="isAuthor(post.author ? post.author.id : null)"
|
:is-owner="isAuthor(post.author ? post.author.id : null)"
|
||||||
/>
|
/>
|
||||||
</client-only>
|
</client-only>
|
||||||
|
</ds-space>
|
||||||
|
</ds-flex-item>
|
||||||
|
</ds-flex>
|
||||||
|
<!-- Content Menu (can open Modals) -->
|
||||||
<ds-space margin-bottom="small" />
|
<ds-space margin-bottom="small" />
|
||||||
<ds-heading tag="h3" no-margin class="hyphenate-text">{{ post.title }}</ds-heading>
|
<ds-heading tag="h3" no-margin class="hyphenate-text">{{ post.title }}</ds-heading>
|
||||||
<ds-space margin-bottom="small" />
|
<ds-space margin-bottom="small" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user