debian-mirror-gitlab/app/assets/javascripts/snippets/components/snippet_title.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
980 B
Vue
Raw Normal View History

2020-03-13 15:44:24 +05:30
<script>
import { GlSprintf } from '@gitlab/ui';
2020-05-24 23:13:21 +05:30
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import SnippetDescription from './snippet_description_view.vue';
2020-03-13 15:44:24 +05:30
export default {
components: {
TimeAgoTooltip,
GlSprintf,
2020-05-24 23:13:21 +05:30
SnippetDescription,
2020-03-13 15:44:24 +05:30
},
props: {
snippet: {
type: Object,
required: true,
},
},
};
</script>
<template>
<div class="snippet-header limited-header-width">
2020-06-23 00:09:42 +05:30
<h2 class="snippet-title gl-mt-0 mb-3" data-qa-selector="snippet_title_content">
2020-03-13 15:44:24 +05:30
{{ snippet.title }}
</h2>
2020-05-24 23:13:21 +05:30
<snippet-description v-if="snippet.description" :description="snippet.descriptionHtml" />
2020-03-13 15:44:24 +05:30
<small v-if="snippet.updatedAt !== snippet.createdAt" class="edited-text">
<gl-sprintf :message="__('Edited %{timeago}')">
<template #timeago>
<time-ago-tooltip :time="snippet.updatedAt" tooltip-placement="bottom" />
</template>
</gl-sprintf>
</small>
</div>
</template>