Commit 1e8de503 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Replaced some fork icons instances and fixed the Icon component on the MR Widget

parent a623ddb0
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'; import Icon from '../../vue_shared/components/icon.vue';
export default { export default {
name: 'MRWidgetHeader', name: 'MRWidgetHeader',
...@@ -10,6 +10,9 @@ export default { ...@@ -10,6 +10,9 @@ export default {
directives: { directives: {
tooltip, tooltip,
}, },
components: {
Icon,
},
computed: { computed: {
shouldShowCommitsBehindText() { shouldShowCommitsBehindText() {
return this.mr.divergedCommitsCount > 0; return this.mr.divergedCommitsCount > 0;
...@@ -26,9 +29,6 @@ export default { ...@@ -26,9 +29,6 @@ export default {
gfm: `\`${this.mr.sourceBranch}\``, gfm: `\`${this.mr.sourceBranch}\``,
}); });
}, },
downloadIcon() {
return spriteIcon('download');
},
}, },
methods: { methods: {
isBranchTitleLong(branchTitle) { isBranchTitleLong(branchTitle) {
...@@ -85,9 +85,9 @@ export default { ...@@ -85,9 +85,9 @@ export default {
data-toggle="dropdown" data-toggle="dropdown"
aria-label="Download as" aria-label="Download as"
role="button"> role="button">
<i <icon
v-html="downloadIcon"> name="download">
</i> </icon>
<i <i
class="fa fa-caret-down" class="fa fa-caret-down"
aria-hidden="true"> aria-hidden="true">
......
...@@ -723,3 +723,9 @@ ...@@ -723,3 +723,9 @@
font-size: 16px; font-size: 16px;
} }
} }
.fork-sprite {
width: 12px;
height: 12px;
margin-right: -5px;
}
...@@ -143,6 +143,12 @@ ...@@ -143,6 +143,12 @@
fill: $gl-text-color-secondary; fill: $gl-text-color-secondary;
} }
.sprite {
width: 12px;
height: 12px;
fill: $gl-text-color;
}
.fa { .fa {
font-size: 12px; font-size: 12px;
color: $gl-text-color; color: $gl-text-color;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.file-holder-bottom-radius.file-holder.file.append-bottom-default .file-holder-bottom-radius.file-holder.file.append-bottom-default
.js-file-title.file-title.clearfix{ data: { current_action: action } } .js-file-title.file-title.clearfix{ data: { current_action: action } }
.editor-ref .editor-ref
= icon('code-fork') = sprite_icon('fork')
= ref = ref
%span.editor-file-name %span.editor-file-name
- if current_action?(:edit) || current_action?(:update) - if current_action?(:edit) || current_action?(:update)
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
%li{ class: "js-branch-#{branch.name}" } %li{ class: "js-branch-#{branch.name}" }
%div %div
= link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated ref-name' do = link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated ref-name' do
= icon('code-fork', class: 'append-right-5') + "#{branch.name}" = sprite_icon('fork', size: 8)
= branch.name
&nbsp; &nbsp;
- if branch.name == @repository.root_ref - if branch.name == @repository.root_ref
%span.label.label-primary default %span.label.label-primary default
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
- if ref - if ref
- if job.ref - if job.ref
.icon-container .icon-container
= job.tag? ? icon('tag') : icon('code-fork') = job.tag? ? icon('tag') : sprite_icon('fork', css_class: 'sprite')
= link_to job.ref, project_ref_path(job.project, job.ref), class: "ref-name" = link_to job.ref, project_ref_path(job.project, job.ref), class: "ref-name"
- else - else
.light none .light none
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
%span.project-ref-path %span.project-ref-path
&nbsp; &nbsp;
= link_to project_ref_path(merge_request.project, merge_request.target_branch), class: 'ref-name' do = link_to project_ref_path(merge_request.project, merge_request.target_branch), class: 'ref-name' do
= icon('code-fork') = sprite_icon('fork', css_class: 'fork-sprite')
= merge_request.target_branch = merge_request.target_branch
- if merge_request.labels.any? - if merge_request.labels.any?
&nbsp; &nbsp;
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
= render_project_pipeline_status(project.pipeline_status) = render_project_pipeline_status(project.pipeline_status)
- if forks - if forks
%span.prepend-left-10 %span.prepend-left-10
= icon('code-fork') = sprite_icon('fork')
= number_with_delimiter(project.forks_count) = number_with_delimiter(project.forks_count)
- if stars - if stars
%span.prepend-left-10 %span.prepend-left-10
......
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