From 306f4827727f50ae22d6e78a6d90c4aa9850b9d0 Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Thu, 21 Sep 2017 13:37:17 +0200 Subject: Updated common Utils + icons to current version --- app/assets/images/icons.json | 2 +- app/assets/images/icons.svg | 2 +- app/assets/javascripts/lib/utils/common_utils.js | 8 ++++++-- yarn.lock | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/assets/images/icons.json b/app/assets/images/icons.json index ec5ca6442a1..e5da75faf38 100644 --- a/app/assets/images/icons.json +++ b/app/assets/images/icons.json @@ -1 +1 @@ -{"iconCount":133,"icons":["abuse","account","admin","angle-double-left","angle-down","angle-left","angle-right","angle-up","appearance","applications","approval","arrow-right","assignee","bold","book","branch","calendar","cancel","chevron-down","chevron-left","chevron-right","chevron-up","clock","code","comment-dots","comment-next","comment","comments","commit","credit-card","disk","doc_code","doc_image","doc_text","download","duplicate","earth","eye-slash","eye","file-additions","file-deletion","file-modified","filter","folder","fork","git-merge","group","history","home","hook","issue-block","issue-child","issue-close","issue-duplicate","issue-new","issue-open-m","issue-open","issue-parent","issues","key-2","key","label","labels","leave","level-up","license","link","list-bulleted","list-numbered","location-dot","location","lock-open","lock","log","mail","merge-request-close-m","merge-request-close","messages","mobile-issue-close","monitor","more","notifications-off","notifications","overview","pencil","pipeline","play","plus-square-o","plus-square","plus","preferences","profile","project","push-rules","question-o","question","quote","redo","remove","repeat","retry","scale","screen-full","screen-normal","search","settings","shield","slight-frown","slight-smile","smile","smiley","snippet","spam","star-o","star","stop","talic","task-done","template","thump-down","thump-up","timer","todo-add","todo-done","token","unapproval","unassignee","unlink","user","users","volume-up","warning","work"]} \ No newline at end of file +{"iconCount":134,"icons":["abuse","account","admin","angle-double-left","angle-down","angle-left","angle-right","angle-up","appearance","applications","approval","arrow-right","assignee","bold","book","branch","calendar","cancel","chevron-down","chevron-left","chevron-right","chevron-up","clock","code","comment-dots","comment-next","comment","comments","commit","credit-card","disk","doc_code","doc_image","doc_text","download","duplicate","earth","eye-slash","eye","file-additions","file-deletion","file-modified","filter","folder","fork","geo-nodes","git-merge","group","history","home","hook","issue-block","issue-child","issue-close","issue-duplicate","issue-new","issue-open-m","issue-open","issue-parent","issues","key-2","key","label","labels","leave","level-up","license","link","list-bulleted","list-numbered","location-dot","location","lock-open","lock","log","mail","merge-request-close-m","merge-request-close","messages","mobile-issue-close","monitor","more","notifications-off","notifications","overview","pencil","pipeline","play","plus-square-o","plus-square","plus","preferences","profile","project","push-rules","question-o","question","quote","redo","remove","repeat","retry","scale","screen-full","screen-normal","search","settings","shield","slight-frown","slight-smile","smile","smiley","snippet","spam","star-o","star","stop","talic","task-done","template","thump-down","thump-up","timer","todo-add","todo-done","token","unapproval","unassignee","unlink","user","users","volume-up","warning","work"]} \ No newline at end of file diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index 912d55fd09e..5c3a9962bd3 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index e53b33d0934..ea2d61af9be 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -383,7 +383,6 @@ export const setFavicon = (faviconPath) => { } }; - w.gl.utils.spriteIcon = icon => ``; export const resetFavicon = () => { const faviconEl = document.getElementById('favicon'); const originalFavicon = faviconEl ? faviconEl.getAttribute('href') : null; @@ -409,7 +408,10 @@ export const setCiStatusFavicon = (pageUrl) => { }); }; - w.gl.utils.imagePath = imgUrl => `${gon.asset_host || ''}${gon.relative_url_root || ''}/assets/${imgUrl}`; +export const spriteIcon = icon => ``; + +export const imagePath = imgUrl => `${gon.asset_host || ''}${gon.relative_url_root || ''}/assets/${imgUrl}`; + window.gl = window.gl || {}; window.gl.utils = { ...(window.gl.utils || {}), @@ -436,4 +438,6 @@ window.gl.utils = { getSelectedFragment, insertText, nodeMatchesSelector, + spriteIcon, + imagePath, }; diff --git a/yarn.lock b/yarn.lock index c33f7be7f19..c95dd6433ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2713,8 +2713,8 @@ getpass@^0.1.1: assert-plus "^1.0.0" "gitlab-svgs@https://gitlab.com/gitlab-org/gitlab-svgs.git": - version "1.0.0" - resolved "https://gitlab.com/gitlab-org/gitlab-svgs.git#a847d3bf65d20a4de617be2d33d20c8ccb7b4bfe" + version "1.0.2" + resolved "https://gitlab.com/gitlab-org/gitlab-svgs.git#7f36f3951dd08904761780da48efcd639f34c3af" glob-base@^0.3.0: version "0.3.0" -- cgit v1.2.1