Fixes the PostAttachment component: It now works.

Note: This requires adding NoCSRFRequired in NavigationController'
  documentGet() function. It doesn't seem to raise any risk though.

Signed-off-by: Cyrille Bollu <cyrille@bollu.be>
pull/626/head
Cyrille Bollu 2019-07-15 14:38:21 +02:00
rodzic c8d98a421a
commit d025569f5e
3 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -282,6 +282,7 @@ class NavigationController extends Controller {
/**
* @NoAdminRequired
* @NoCSRFRequired
*
* @param string $id
*

Wyświetl plik

@ -1,6 +1,6 @@
<template>
<div class="post-attachment">
<img :src='url' />
<img ref='image' src='' />
</div>
</template>
@ -10,13 +10,17 @@ export default {
components: {
},
mixins: [],
props: ['url'],
props: ['id'],
data() {
return {
}
},
computed: {
},
mounted() {
var image = this.$refs.image
image.src = OC.generateUrl('/apps/social/document/get?id=' + this.id)
},
methods: {
}
}

Wyświetl plik

@ -25,7 +25,7 @@
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="post-message" v-html="formatedMessage" />
<div v-if="hasAttachments" class="post-attachments">
<post-attachment v-for="attachment in item.attachment" :key="attachment.id" :url="attachment.url" />
<post-attachment v-for="attachment in item.attachment" :key="attachment.id" :id="attachment.id" />
</div>
<div v-click-outside="hidePopoverMenu" class="post-actions">
<a v-tooltip.bottom="t('social', 'Reply')" class="icon-reply" @click.prevent="reply" />