Commit c57079bc authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '225940-replace-fa-paperclip-icons-with-gitlab-svg-paperclip-icon' into 'master'

Replace fa-paperclip icons with GitLab SVG

See merge request gitlab-org/gitlab!43945
parents dd754c52 02996e48
...@@ -7,6 +7,7 @@ import csrf from './lib/utils/csrf'; ...@@ -7,6 +7,7 @@ import csrf from './lib/utils/csrf';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import { n__, __ } from '~/locale'; import { n__, __ } from '~/locale';
import { getFilename } from '~/lib/utils/file_upload'; import { getFilename } from '~/lib/utils/file_upload';
import { spriteIcon } from '~/lib/utils/common_utils';
Dropzone.autoDiscover = false; Dropzone.autoDiscover = false;
...@@ -25,7 +26,7 @@ function getErrorMessage(res) { ...@@ -25,7 +26,7 @@ function getErrorMessage(res) {
export default function dropzoneInput(form, config = { parallelUploads: 2 }) { export default function dropzoneInput(form, config = { parallelUploads: 2 }) {
const divHover = '<div class="div-dropzone-hover"></div>'; const divHover = '<div class="div-dropzone-hover"></div>';
const iconPaperclip = '<i class="fa fa-paperclip div-dropzone-icon"></i>'; const iconPaperclip = spriteIcon('paperclip', 'div-dropzone-icon');
const $attachButton = form.find('.button-attach-file'); const $attachButton = form.find('.button-attach-file');
const $attachingFileMessage = form.find('.attaching-file-message'); const $attachingFileMessage = form.find('.attaching-file-message');
const $cancelButton = form.find('.button-cancel-uploading-files'); const $cancelButton = form.find('.button-cancel-uploading-files');
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
export default { export default {
name: 'NoteAttachment', name: 'NoteAttachment',
components: {
GlIcon,
},
props: { props: {
attachment: { attachment: {
type: Object, type: Object,
...@@ -29,7 +34,7 @@ export default { ...@@ -29,7 +34,7 @@ export default {
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
<i class="fa fa-paperclip" aria-hidden="true"> </i> {{ attachment.filename }} <gl-icon name="paperclip" /> {{ attachment.filename }}
</a> </a>
</div> </div>
</div> </div>
......
...@@ -117,10 +117,6 @@ ...@@ -117,10 +117,6 @@
content: '\f077'; content: '\f077';
} }
.fa-paperclip::before {
content: '\f0c6';
}
.fa-bug::before { .fa-bug::before {
content: '\f188'; content: '\f188';
} }
......
...@@ -25,5 +25,5 @@ ...@@ -25,5 +25,5 @@
= image_tag note.attachment.url, class: 'note-image-attach' = image_tag note.attachment.url, class: 'note-image-attach'
- else - else
= link_to note.attachment.url, target: '_blank', class: 'note-file-attach' do = link_to note.attachment.url, target: '_blank', class: 'note-file-attach' do
%i.fa.fa-paperclip = sprite_icon("paperclip")
= note.attachment_identifier = note.attachment_identifier
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
= image_tag note.attachment.url, class: 'note-image-attach' = image_tag note.attachment.url, class: 'note-image-attach'
.attachment .attachment
= link_to note.attachment.url, target: '_blank' do = link_to note.attachment.url, target: '_blank' do
= icon('paperclip') = sprite_icon('paperclip')
= note.attachment_identifier = note.attachment_identifier
= link_to delete_attachment_project_note_path(note.project, note), = link_to delete_attachment_project_note_path(note.project, note),
title: _('Delete this attachment'), method: :delete, remote: true, data: { confirm: _('Are you sure you want to remove the attachment?') }, class: 'danger js-note-attachment-delete' do title: _('Delete this attachment'), method: :delete, remote: true, data: { confirm: _('Are you sure you want to remove the attachment?') }, class: 'danger js-note-attachment-delete' do
......
...@@ -52,9 +52,13 @@ exports[`Snippet Description Edit component rendering matches the snapshot 1`] = ...@@ -52,9 +52,13 @@ exports[`Snippet Description Edit component rendering matches the snapshot 1`] =
<div <div
class="div-dropzone-hover" class="div-dropzone-hover"
> >
<i <svg
class="fa fa-paperclip div-dropzone-icon" class="div-dropzone-icon"
/> >
<use
xlink:href="undefined#paperclip"
/>
</svg>
</div> </div>
</div> </div>
......
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