diff --git a/client/src/components/chains/feed/FeedArticle.vue b/client/src/components/chains/feed/FeedArticle.vue index dc2278a..8548d74 100644 --- a/client/src/components/chains/feed/FeedArticle.vue +++ b/client/src/components/chains/feed/FeedArticle.vue @@ -6,6 +6,11 @@ @click.prevent="show" v-if="post.image !== DEFAULT_IMAGE" :style="`background-image: url('${post.image}')`"> +
+ {{$t('chains.imageIsHidden')}} +
@@ -14,12 +19,12 @@ class="feed__repost-avatar" :style="`background-image: url('${post.reblog_avatars[0]}');`" > - + {{post.reblog_by[0]}}
-

+

-

+

0 diff --git a/client/src/components/chains/profile/ProfileBlogArticle.vue b/client/src/components/chains/profile/ProfileBlogArticle.vue index 684a7ec..9acbf0d 100644 --- a/client/src/components/chains/profile/ProfileBlogArticle.vue +++ b/client/src/components/chains/profile/ProfileBlogArticle.vue @@ -7,6 +7,11 @@ v-if="post.image !== DEFAULT_IMAGE" class="feed__post-image" :style="`background-image: url('${post.image}')`"> +

+ {{$t('chains.imageIsHidden')}} +
@@ -15,10 +20,12 @@ {{post.author}}
-

- {{post.title}} +

+ + nsfw + {{post.title}}

-

+

{{cutPreview}}

@@ -80,11 +87,8 @@ export default { isRepost() { return this.account.name !== this.post.author }, - cutTitle() { - return parser.cutTitle(this.chain, this.post.title) - }, cutPreview() { - return parser.cutPreview(this.chain, this.post.preview, this.isRepost) + return parser.cutPreview(this.post.preview) } }, methods: { diff --git a/common/@oneplace/blockchains-api/parser.js b/common/@oneplace/blockchains-api/parser.js index f0c050a..fd07ad3 100644 --- a/common/@oneplace/blockchains-api/parser.js +++ b/common/@oneplace/blockchains-api/parser.js @@ -374,25 +374,8 @@ class Parser { }) } - static cutTitle(chain, title) { - const STR_LIMIT = chain === CONSTANTS.BLOCKCHAIN.SOURCE.GOLOS ? 70 : 80 - if (title.length > STR_LIMIT) { - title = - title.substring( - 0, - title - .substr(0, STR_LIMIT) - .split('') - .lastIndexOf(' ') - ) + '...' - } - return title - } - - static cutPreview(chain, preview, isRepost) { - let STR_LIMIT = isRepost ? 50 : 110 - if (chain === CONSTANTS.BLOCKCHAIN.SOURCE.GOLOS) - STR_LIMIT = isRepost ? 50 : 90 + static cutPreview(preview) { + let STR_LIMIT = 200 if (preview.length > STR_LIMIT) { preview =