Welcome to mirror list, hosted at ThFree Co, Russian Federation.

snippet_title.vue « components « snippets « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e4dbf559630c534283232b175189f2a5a785fed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<script>
import { GlSprintf } from '@gitlab/ui';

import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import SnippetDescription from './snippet_description_view.vue';

export default {
  components: {
    TimeAgoTooltip,
    GlSprintf,
    SnippetDescription,
  },
  props: {
    snippet: {
      type: Object,
      required: true,
    },
  },
};
</script>
<template>
  <div class="snippet-header limited-header-width">
    <h2 class="snippet-title gl-mt-0 mb-3" data-testid="snippet-title-content">
      {{ snippet.title }}
    </h2>

    <snippet-description v-if="snippet.description" :description="snippet.descriptionHtml" />

    <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>