kopia lustrzana https://github.com/nextcloud/social
				
				
				
			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
							rodzic
							
								
									c8d98a421a
								
							
						
					
					
						commit
						d025569f5e
					
				| 
						 | 
					@ -282,6 +282,7 @@ class NavigationController extends Controller {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * @NoAdminRequired
 | 
						 * @NoAdminRequired
 | 
				
			||||||
 | 
						 * @NoCSRFRequired
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
	 * @param string $id
 | 
						 * @param string $id
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="post-attachment">
 | 
						<div class="post-attachment">
 | 
				
			||||||
		<img :src='url' />
 | 
							<img ref='image' src='' />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,13 +10,17 @@ export default {
 | 
				
			||||||
	components: {
 | 
						components: {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mixins: [],
 | 
						mixins: [],
 | 
				
			||||||
	props: ['url'],
 | 
						props: ['id'],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	computed: {
 | 
						computed: {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						mounted() {
 | 
				
			||||||
 | 
							var image = this.$refs.image
 | 
				
			||||||
 | 
							image.src = OC.generateUrl('/apps/social/document/get?id=' + this.id)
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,7 +25,7 @@
 | 
				
			||||||
			<!-- eslint-disable-next-line vue/no-v-html -->
 | 
								<!-- eslint-disable-next-line vue/no-v-html -->
 | 
				
			||||||
			<div class="post-message" v-html="formatedMessage" />
 | 
								<div class="post-message" v-html="formatedMessage" />
 | 
				
			||||||
			<div v-if="hasAttachments" class="post-attachments">
 | 
								<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>
 | 
				
			||||||
			<div v-click-outside="hidePopoverMenu" class="post-actions">
 | 
								<div v-click-outside="hidePopoverMenu" class="post-actions">
 | 
				
			||||||
				<a v-tooltip.bottom="t('social', 'Reply')" class="icon-reply" @click.prevent="reply" />
 | 
									<a v-tooltip.bottom="t('social', 'Reply')" class="icon-reply" @click.prevent="reply" />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue