Commit a623ddb0 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

replaced download icon for the sprite based one

parent c034594f
<script> <script>
import tooltip from '../../vue_shared/directives/tooltip'; import tooltip from '../../vue_shared/directives/tooltip';
import Icon from '../../vue_shared/components/icon.vue';
export default { export default {
props: { props: {
...@@ -11,6 +12,9 @@ ...@@ -11,6 +12,9 @@
directives: { directives: {
tooltip, tooltip,
}, },
components: {
Icon,
},
}; };
</script> </script>
<template> <template>
...@@ -24,10 +28,9 @@ ...@@ -24,10 +28,9 @@
data-placement="top" data-placement="top"
data-toggle="dropdown" data-toggle="dropdown"
aria-label="Artifacts"> aria-label="Artifacts">
<i <icon
class="fa fa-download" name="download">
aria-hidden="true"> </icon>
</i>
<i <i
class="fa fa-caret-down" class="fa fa-caret-down"
aria-hidden="true"> aria-hidden="true">
......
import tooltip from '../../vue_shared/directives/tooltip'; import tooltip from '../../vue_shared/directives/tooltip';
import { pluralize } from '../../lib/utils/text_utility'; import { pluralize } from '../../lib/utils/text_utility';
import { spriteIcon } from '../../lib/utils/common_utils';
export default { export default {
name: 'MRWidgetHeader', name: 'MRWidgetHeader',
...@@ -25,6 +26,9 @@ export default { ...@@ -25,6 +26,9 @@ export default {
gfm: `\`${this.mr.sourceBranch}\``, gfm: `\`${this.mr.sourceBranch}\``,
}); });
}, },
downloadIcon() {
return spriteIcon('download');
},
}, },
methods: { methods: {
isBranchTitleLong(branchTitle) { isBranchTitleLong(branchTitle) {
...@@ -82,8 +86,7 @@ export default { ...@@ -82,8 +86,7 @@ export default {
aria-label="Download as" aria-label="Download as"
role="button"> role="button">
<i <i
class="fa fa-download" v-html="downloadIcon">
aria-hidden="true">
</i> </i>
<i <i
class="fa fa-caret-down" class="fa fa-caret-down"
......
...@@ -232,7 +232,7 @@ module BlobHelper ...@@ -232,7 +232,7 @@ module BlobHelper
return if blob.empty? return if blob.empty?
if blob.raw_binary? || blob.stored_externally? if blob.raw_binary? || blob.stored_externally?
icon = icon('download') icon = sprite_icon('download')
title = 'Download' title = 'Download'
else else
icon = icon('file-code-o') icon = icon('file-code-o')
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.tree-controls .tree-controls
= link_to download_project_job_artifacts_path(@project, @build), = link_to download_project_job_artifacts_path(@project, @build),
rel: 'nofollow', download: '', class: 'btn btn-default download' do rel: 'nofollow', download: '', class: 'btn btn-default download' do
= icon('download') = sprite_icon('download')
Download artifacts archive Download artifacts archive
.tree-content-holder .tree-content-holder
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
.center.render-error.vertical-center .center.render-error.vertical-center
= link_to blob_raw_path do = link_to blob_raw_path do
%h1.light %h1.light
= icon('download') = sprite_icon('download')
%h4 %h4
Download (#{number_to_human_size(viewer.blob.raw_size)}) Download (#{number_to_human_size(viewer.blob.raw_size)})
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- if !project.empty_repo? && can?(current_user, :download_code, project) - if !project.empty_repo? && can?(current_user, :download_code, project)
.project-action-button.dropdown.inline> .project-action-button.dropdown.inline>
%button.btn.has-tooltip{ title: s_('DownloadSource|Download'), 'data-toggle' => 'dropdown', 'aria-label' => s_('DownloadSource|Download') } %button.btn.has-tooltip{ title: s_('DownloadSource|Download'), 'data-toggle' => 'dropdown', 'aria-label' => s_('DownloadSource|Download') }
= icon('download') = sprite_icon('download')
= icon("caret-down") = icon("caret-down")
%span.sr-only= _('Select Archive Format') %span.sr-only= _('Select Archive Format')
%ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' } %ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
.pull-right .pull-right
- if can?(current_user, :read_build, job) && job.artifacts? - if can?(current_user, :read_build, job) && job.artifacts?
= link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: 'Download artifacts', class: 'btn btn-build' do = link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: 'Download artifacts', class: 'btn btn-build' do
= icon('download') = sprite_icon('download')
- if can?(current_user, :update_build, job) - if can?(current_user, :update_build, job)
- if job.active? - if job.active?
= link_to cancel_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: 'Cancel', class: 'btn btn-build' do = link_to cancel_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: 'Cancel', class: 'btn btn-build' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment