summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue
blob: 55c71e299be2276e94a4a69b0bcdf2cdc74d60a5 (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
38
39
40
41
42
<script>
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLink, GlTooltipDirective, GlIcon } from '@gitlab/ui';

export default {
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  components: {
    GlIcon,
    GlLink,
  },
  props: {
    artifacts: {
      type: Array,
      required: true,
    },
  },
};
</script>
<template>
  <div class="btn-group" role="group">
    <button
      v-gl-tooltip
      type="button"
      class="dropdown-toggle build-artifacts btn btn-default js-pipeline-dropdown-download"
      :title="__('Artifacts')"
      data-toggle="dropdown"
      :aria-label="__('Artifacts')"
    >
      <gl-icon name="download" />
      <gl-icon name="chevron-down" />
    </button>
    <ul class="dropdown-menu dropdown-menu-right">
      <li v-for="(artifact, i) in artifacts" :key="i">
        <gl-link :href="artifact.path" rel="nofollow" download
          >Download {{ artifact.name }} artifact</gl-link
        >
      </li>
    </ul>
  </div>
</template>