Skip to content

Commit

Permalink
Message: fix attachment list when showing message - refs BT#21648
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed May 29, 2024
1 parent 57c68ea commit 79423d8
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions assets/vue/views/message/MessageShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,30 +109,31 @@
<p class="m-3">{{ item.attachments.length }} {{ $t("Attachments") }}</p>
</template>

<div
<ul
v-if="item.attachments && item.attachments.length > 0"
class="q-gutter-y-sm q-gutter-x-sm row"
class="space-y-2"
>
<div
<li
v-for="(attachment, index) in item.attachments"
:key="index"
>
<div v-if="attachment.resourceNode.resourceFile.audio">
<audio controls>
<source :src="attachment.downloadUrl" />
</audio>
</div>
<audio
v-if="attachment.resourceNode.resourceFile.audio"
controls
>
<source :src="attachment.downloadUrl" />
</audio>

<BaseButton
<a
v-else
:href="attachment.downloadUrl"
icon="attachment"
type="primary"
class="btn btn--plain"
>
<BaseIcon icon="attachment" />
{{ attachment.resourceNode.resourceFile.originalName }}
</BaseButton>
</div>
</div>
</a>
</li>
</ul>
</BaseCard>
<Loading :visible="isLoading" />
</div>
Expand All @@ -155,6 +156,7 @@ import messageTagService from "../../services/messageTagService"
import { useSecurityStore } from "../../store/securityStore"
import BaseCard from "../../components/basecomponents/BaseCard.vue"
import MessageCommunicationParty from "./MessageCommunicationParty.vue"
import BaseIcon from "../../components/basecomponents/BaseIcon.vue"
const confirm = useConfirm()
const { t } = useI18n()
Expand Down

0 comments on commit 79423d8

Please sign in to comment.