logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 8c7f4ab481db86306b2cedca9e54d24cf8f0ebe8
parent 08c9aa4bf3a06531516cf72b9ffc00b44ee51d75
Author: Sean King <seanking2919@protonmail.com>
Date:   Sun, 26 Jun 2022 13:25:36 -0600

Use watch to change localDescription

Diffstat:

Msrc/components/attachment/attachment.js3+++
Msrc/components/attachment/attachment.vue6+++---
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git 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 @@ -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>