4da7be733d
glbutton is not meant to work with old dropdowns This commit reverts the update to use gl button and adds i18n to some missing strings
42 lines
1,009 B
Vue
42 lines
1,009 B
Vue
<script>
|
|
import { GlLink, GlTooltipDirective } from '@gitlab/ui';
|
|
import Icon from '~/vue_shared/components/icon.vue';
|
|
|
|
export default {
|
|
directives: {
|
|
GlTooltip: GlTooltipDirective,
|
|
},
|
|
components: {
|
|
Icon,
|
|
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')"
|
|
>
|
|
<icon name="download" />
|
|
<i class="fa fa-caret-down" aria-hidden="true"></i>
|
|
</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 }} artifacts</gl-link
|
|
>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|