2018-03-17 18:26:18 +05:30
|
|
|
<script>
|
2021-01-29 00:20:46 +05:30
|
|
|
import { GlIcon } from '@gitlab/ui';
|
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
export default {
|
|
|
|
name: 'NoteAttachment',
|
2021-01-29 00:20:46 +05:30
|
|
|
components: {
|
|
|
|
GlIcon,
|
|
|
|
},
|
2018-05-09 12:01:36 +05:30
|
|
|
props: {
|
|
|
|
attachment: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
2018-03-17 18:26:18 +05:30
|
|
|
},
|
2018-05-09 12:01:36 +05:30
|
|
|
},
|
|
|
|
};
|
2018-03-17 18:26:18 +05:30
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="note-attachment">
|
2020-03-09 13:42:32 +05:30
|
|
|
<a
|
|
|
|
v-if="attachment.image"
|
|
|
|
ref="attachmentImage"
|
|
|
|
:href="attachment.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
>
|
2019-02-15 15:39:39 +05:30
|
|
|
<img :src="attachment.url" class="note-image-attach" />
|
2018-03-17 18:26:18 +05:30
|
|
|
</a>
|
|
|
|
<div class="attachment">
|
2020-03-09 13:42:32 +05:30
|
|
|
<a
|
|
|
|
v-if="attachment.url"
|
|
|
|
ref="attachmentUrl"
|
|
|
|
:href="attachment.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
>
|
2021-01-29 00:20:46 +05:30
|
|
|
<gl-icon name="paperclip" /> {{ attachment.filename }}
|
2018-03-17 18:26:18 +05:30
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|