commit: acc3b083aa46aa9c165578380b16ef86e6fb596b
parent: 5b8875e3d88370388653a3165cb2dd4c4fb7cde8
Author: Shpuld Shpludson <shp@cock.li>
Date: Sun, 5 Jul 2020 06:15:35 +0000
Merge branch 'feat/parent-visible-support' into 'develop'
#874 Add strike-through to "Reply to" when parent_visible is set to false
See merge request pleroma/pleroma-fe!1162
Diffstat:
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Autocomplete domains from list of known instances
- 'Bot' settings option and badge
- Added profile meta data fields that can be set in profile settings
+- When a post is a reply to an unavailable post, the 'Reply to'-text has a strike-through style
### Changed
- Registration page no longer requires email if the server is configured not to require it
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
@@ -197,7 +197,7 @@
>
<StatusPopover
v-if="!isPreview"
- :status-id="status.in_reply_to_status_id"
+ :status-id="status.parent_visible && status.in_reply_to_status_id"
class="reply-to-popover"
style="min-width: 0"
>
@@ -208,7 +208,12 @@
@click.prevent="gotoOriginal(status.in_reply_to_status_id)"
>
<i class="button-icon icon-reply" />
- <span class="faint-link reply-to-text">{{ $t('status.reply_to') }}</span>
+ <span
+ class="faint-link reply-to-text"
+ :class="{ 'strikethrough': !status.parent_visible }"
+ >
+ {{ $t('status.reply_to') }}
+ </span>
</a>
</StatusPopover>
<span
@@ -526,6 +531,10 @@ $status-margin: 0.75em;
margin: 0 0.4em 0 0.2em;
}
+ .strikethrough {
+ text-decoration: line-through;
+ }
+
.replies-separator {
margin-left: 0.4em;
}
diff --git a/src/components/status_popover/status_popover.js b/src/components/status_popover/status_popover.js
@@ -22,6 +22,10 @@ const StatusPopover = {
methods: {
enter () {
if (!this.status) {
+ if (!this.statusId) {
+ this.error = true
+ return
+ }
this.$store.dispatch('fetchStatus', this.statusId)
.then(data => (this.error = false))
.catch(e => (this.error = true))
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -251,6 +251,7 @@ export const parseStatus = (data) => {
output.in_reply_to_screen_name = data.pleroma.in_reply_to_account_acct
output.thread_muted = pleroma.thread_muted
output.emoji_reactions = pleroma.emoji_reactions
+ output.parent_visible = pleroma.parent_visible === undefined ? true : pleroma.parent_visible
} else {
output.text = data.content
output.summary = data.spoiler_text