diff options
author | Jose Ivan Vargas Lopez <jvargas@gitlab.com> | 2017-11-23 10:52:15 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-11-23 10:52:15 +0300 |
commit | e882455a9d5107f143ad62ce4a14792277b9fdcd (patch) | |
tree | 2ea714c5ceca78f52ad3f079d83f76d851cceecc /app/assets | |
parent | 9fefb6c2be1e9772599aa376ae8ae37241ace0c6 (diff) |
Change star, filter and settings icons to the their sprite based replacements
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/groups/components/item_actions.vue | 8 | ||||
-rw-r--r-- | app/assets/javascripts/star.js | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/app/assets/javascripts/groups/components/item_actions.vue b/app/assets/javascripts/groups/components/item_actions.vue index 7eff19e2e5a..09cb79c1afd 100644 --- a/app/assets/javascripts/groups/components/item_actions.vue +++ b/app/assets/javascripts/groups/components/item_actions.vue @@ -4,9 +4,11 @@ import tooltip from '../../vue_shared/directives/tooltip'; import PopupDialog from '../../vue_shared/components/popup_dialog.vue'; import eventHub from '../event_hub'; import { COMMON_STR } from '../constants'; +import Icon from '../../vue_shared/components/icon.vue'; export default { components: { + Icon, PopupDialog, }, directives: { @@ -63,9 +65,9 @@ export default { :aria-label="editBtnTitle" data-container="body" class="edit-group btn no-expand"> - <i - class="fa fa-cogs" - aria-hidden="true"/> + <icon + name="settings"> + </icon> </a> <a v-tooltip diff --git a/app/assets/javascripts/star.js b/app/assets/javascripts/star.js index 1a8dc085772..d5606e153f6 100644 --- a/app/assets/javascripts/star.js +++ b/app/assets/javascripts/star.js @@ -1,5 +1,6 @@ import Flash from './flash'; import { __, s__ } from './locale'; +import { spriteIcon } from './lib/utils/common_utils'; export default class Star { constructor() { @@ -7,16 +8,18 @@ export default class Star { .on('ajax:success', function handleSuccess(e, data) { const $this = $(this); const $starSpan = $this.find('span'); - const $starIcon = $this.find('i'); + const $startIcon = $this.find('svg'); function toggleStar(isStarred) { $this.parent().find('.star-count').text(data.star_count); if (isStarred) { $starSpan.removeClass('starred').text(s__('StarProject|Star')); - $starIcon.removeClass('fa-star').addClass('fa-star-o'); + $startIcon.remove(); + $this.prepend(spriteIcon('star-o')); } else { $starSpan.addClass('starred').text(__('Unstar')); - $starIcon.removeClass('fa-star-o').addClass('fa-star'); + $startIcon.remove(); + $this.prepend(spriteIcon('star')); } } |