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,20 +12,33 @@
|
|||||||
<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">
|
||||||
<hc-user :user="author" :date-time="comment.createdAt" />
|
<ds-flex>
|
||||||
|
<ds-flex-item width="40%">
|
||||||
|
<hc-user :user="author" :date-time="comment.createdAt" />
|
||||||
|
</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>
|
||||||
|
<content-menu
|
||||||
|
v-show="!openEditCommentMenu"
|
||||||
|
placement="bottom-end"
|
||||||
|
resource-type="comment"
|
||||||
|
:resource="comment"
|
||||||
|
:modalsData="menuModalsData"
|
||||||
|
class="float-right"
|
||||||
|
:is-owner="isAuthor(author.id)"
|
||||||
|
@showEditCommentMenu="editCommentMenu"
|
||||||
|
/>
|
||||||
|
</client-only>
|
||||||
|
</ds-space>
|
||||||
|
</ds-flex-item>
|
||||||
|
</ds-flex>
|
||||||
<!-- Content Menu (can open Modals) -->
|
<!-- Content Menu (can open Modals) -->
|
||||||
<client-only>
|
|
||||||
<content-menu
|
|
||||||
v-show="!openEditCommentMenu"
|
|
||||||
placement="bottom-end"
|
|
||||||
resource-type="comment"
|
|
||||||
:resource="comment"
|
|
||||||
:modalsData="menuModalsData"
|
|
||||||
class="float-right"
|
|
||||||
:is-owner="isAuthor(author.id)"
|
|
||||||
@showEditCommentMenu="editCommentMenu"
|
|
||||||
/>
|
|
||||||
</client-only>
|
|
||||||
</ds-space>
|
</ds-space>
|
||||||
<div v-if="openEditCommentMenu">
|
<div v-if="openEditCommentMenu">
|
||||||
<hc-comment-form
|
<hc-comment-form
|
||||||
@ -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
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"maintenance": {
|
"maintenance": {
|
||||||
"title": "Human Connection befindet sich in der Wartung",
|
"title": "Human Connection befindet sich in der Wartung",
|
||||||
"explanation": "Zurzeit führen wir einige geplante Wartungsarbeiten durch, bitte versuch es später erneut.",
|
"explanation": "Zurzeit führen wir einige geplante Wartungsarbeiten durch, bitte versuch es später erneut.",
|
||||||
"questions": "Bei Fragen oder Problemen erreichst du uns per E-Mail an"
|
"questions": "Bei Fragen oder Problemen erreichst du uns per E-Mail an"
|
||||||
},
|
},
|
||||||
"index": {
|
"index": {
|
||||||
"no-results": "Keine Beiträge gefunden.",
|
"no-results": "Keine Beiträge gefunden.",
|
||||||
@ -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,10 +349,11 @@
|
|||||||
"show": {
|
"show": {
|
||||||
"more": "mehr anzeigen",
|
"more": "mehr anzeigen",
|
||||||
"less": "weniger anzeigen"
|
"less": "weniger anzeigen"
|
||||||
}
|
},
|
||||||
|
"edited": "bearbeitet"
|
||||||
},
|
},
|
||||||
"quotes": {
|
"quotes": {
|
||||||
"african": {
|
"african": {
|
||||||
"quote": "Viele kleine Leute an vielen kleinen Orten, die viele kleine Dinge tun, werden das Antlitz dieser Welt verändern.",
|
"quote": "Viele kleine Leute an vielen kleinen Orten, die viele kleine Dinge tun, werden das Antlitz dieser Welt verändern.",
|
||||||
"author": "Afrikanisches Sprichwort"
|
"author": "Afrikanisches Sprichwort"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,8 +206,18 @@
|
|||||||
"delete": "Apagar Contribuição"
|
"delete": "Apagar Contribuição"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"edit": "Editar Comentário",
|
"content": {
|
||||||
"delete": "Apagar Comentário"
|
"unavailable-placeholder": "… este commenttário não está disponível"
|
||||||
|
},
|
||||||
|
"menu": {
|
||||||
|
"edit": "Editar Comentário",
|
||||||
|
"delete": "Apagar Comentário"
|
||||||
|
},
|
||||||
|
"show": {
|
||||||
|
"more": "mostrar mais",
|
||||||
|
"less": "mostrar menos"
|
||||||
|
},
|
||||||
|
"edited": "editado"
|
||||||
},
|
},
|
||||||
"followButton": {
|
"followButton": {
|
||||||
"follow": "Seguir",
|
"follow": "Seguir",
|
||||||
@ -212,4 +226,4 @@
|
|||||||
"shoutButton": {
|
"shoutButton": {
|
||||||
"shouted": "Aclamou"
|
"shouted": "Aclamou"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,17 +6,30 @@
|
|||||||
: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" />
|
||||||
<hc-user :user="post.author" :date-time="post.createdAt" />
|
<ds-flex>
|
||||||
|
<ds-flex-item width="40%">
|
||||||
|
<hc-user :user="post.author" :date-time="post.createdAt" />
|
||||||
|
</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>
|
||||||
|
<content-menu
|
||||||
|
placement="bottom-end"
|
||||||
|
resource-type="contribution"
|
||||||
|
:resource="post"
|
||||||
|
:modalsData="menuModalsData"
|
||||||
|
:is-owner="isAuthor(post.author ? post.author.id : null)"
|
||||||
|
/>
|
||||||
|
</client-only>
|
||||||
|
</ds-space>
|
||||||
|
</ds-flex-item>
|
||||||
|
</ds-flex>
|
||||||
<!-- Content Menu (can open Modals) -->
|
<!-- Content Menu (can open Modals) -->
|
||||||
<client-only>
|
|
||||||
<content-menu
|
|
||||||
placement="bottom-end"
|
|
||||||
resource-type="contribution"
|
|
||||||
:resource="post"
|
|
||||||
:modalsData="menuModalsData"
|
|
||||||
:is-owner="isAuthor(post.author ? post.author.id : null)"
|
|
||||||
/>
|
|
||||||
</client-only>
|
|
||||||
<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