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

pipelines_artifacts.vue « pipelines_list « components « pipelines « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c3990f82df5223200d73751a3468ce491245588 (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
43
44
45
46
47
48
49
50
<script>
import { GlDropdown, GlDropdownItem, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';

export default {
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  components: {
    GlDropdown,
    GlDropdownItem,
    GlSprintf,
  },
  translations: {
    artifacts: __('Artifacts'),
    downloadArtifact: __('Download %{name} artifact'),
  },
  props: {
    artifacts: {
      type: Array,
      required: true,
    },
  },
};
</script>
<template>
  <gl-dropdown
    v-gl-tooltip
    class="build-artifacts js-pipeline-dropdown-download"
    :title="$options.translations.artifacts"
    :text="$options.translations.artifacts"
    :aria-label="$options.translations.artifacts"
    icon="download"
    right
    lazy
    text-sr-only
  >
    <gl-dropdown-item
      v-for="(artifact, i) in artifacts"
      :key="i"
      :href="artifact.path"
      rel="nofollow"
      download
    >
      <gl-sprintf :message="$options.translations.downloadArtifact">
        <template #name>{{ artifact.name }}</template>
      </gl-sprintf>
    </gl-dropdown-item>
  </gl-dropdown>
</template>