2019-12-18 15:08:03 +00:00
|
|
|
<script>
|
|
|
|
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
|
|
|
import { GlSprintf } from '@gitlab/ui';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
TimeAgoTooltip,
|
|
|
|
GlSprintf,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
snippet: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="snippet-header limited-header-width">
|
|
|
|
<h2 class="snippet-title prepend-top-0 mb-3" data-qa-selector="snippet_title">
|
|
|
|
{{ snippet.title }}
|
|
|
|
</h2>
|
|
|
|
<div v-if="snippet.description" class="description" data-qa-selector="snippet_description">
|
2020-03-12 12:09:17 +00:00
|
|
|
<div class="md js-snippet-description" v-html="snippet.descriptionHtml"></div>
|
2019-12-18 15:08:03 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<small v-if="snippet.updatedAt !== snippet.createdAt" class="edited-text">
|
2020-02-04 15:08:40 +00:00
|
|
|
<gl-sprintf :message="__('Edited %{timeago}')">
|
2019-12-18 15:08:03 +00:00
|
|
|
<template #timeago>
|
|
|
|
<time-ago-tooltip :time="snippet.updatedAt" tooltip-placement="bottom" />
|
|
|
|
</template>
|
|
|
|
</gl-sprintf>
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</template>
|