aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/attachment/attachment.js3
-rw-r--r--src/components/attachment/attachment.vue6
-rw-r--r--src/components/extra_buttons/extra_buttons.js14
-rw-r--r--src/components/status_body/status_body.js7
4 files changed, 16 insertions, 14 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index d62a4adc..5dc50475 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -129,6 +129,9 @@ const Attachment = {
...mapGetters(['mergedConfig'])
},
watch: {
+ 'attachment.description' (newVal) {
+ this.localDescription = newVal
+ },
localDescription (newVal) {
this.onEdit(newVal)
}
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 14f6a0ae..2a89886d 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -166,7 +166,7 @@
:icon="placeholderIconClass"
/>
<p>
- {{ edit ? localDescription : attachment.description }}
+ {{ localDescription }}
</p>
</a>
@@ -244,7 +244,7 @@
</span>
</div>
<div
- v-if="size !== 'hide' && !hideDescription && (edit || (attachment.description && showDescription))"
+ v-if="size !== 'hide' && !hideDescription && (edit || (localDescription && showDescription))"
class="description-container"
:class="{ '-static': !edit }"
>
@@ -257,7 +257,7 @@
@keydown.enter.prevent=""
>
<p v-else>
- {{ attachment.description }}
+ {{ localDescription }}
</p>
</div>
</div>
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 92eb63b0..ef040d26 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -88,17 +88,9 @@ const ExtraButtons = {
}))
},
showStatusHistory () {
- let originalStatus = {}
- Object.assign(originalStatus, this.status)
- delete originalStatus.attachments
- delete originalStatus.created_at
- delete originalStatus.emojis
- delete originalStatus.text
- delete originalStatus.raw_html
- delete originalStatus.nsfw
- delete originalStatus.poll
- delete originalStatus.summary
- delete originalStatus.summary_raw_html
+ const originalStatus = { ...this.status }
+ const stripFieldsList = ['attachments', 'created_at', 'emojis', 'text', 'raw_html', 'nsfw', 'poll', 'summary', 'summary_raw_html']
+ stripFieldsList.forEach(p => delete originalStatus[p])
this.$store.dispatch('openStatusHistoryModal', originalStatus)
}
},
diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js
index b8f6f9a0..0a3dcf79 100644
--- a/src/components/status_body/status_body.js
+++ b/src/components/status_body/status_body.js
@@ -125,6 +125,13 @@ const StatusContent = {
generateTagLink (tag) {
return `/tag/${tag}`
}
+ },
+ watch: {
+ 'status.raw_html' (newVal, oldVal) {
+ if (newVal !== oldVal) {
+ this.parseReadyDone = false
+ }
+ }
}
}