diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/favicon_admin.js | 19 | ||||
-rw-r--r-- | app/views/admin/appearances/_form.html.haml | 7 |
2 files changed, 1 insertions, 25 deletions
diff --git a/app/assets/javascripts/favicon_admin.js b/app/assets/javascripts/favicon_admin.js deleted file mode 100644 index 97e87054ce0..00000000000 --- a/app/assets/javascripts/favicon_admin.js +++ /dev/null @@ -1,19 +0,0 @@ -import {createOverlayIcon} from '~/lib/utils/common_utils'; - -export default class FaviconAdmin { - constructor() { - const faviconContainer = $('.js-favicons'); - const faviconUrl = faviconContainer.data('favicon'); - const overlayUrls = faviconContainer.data('status-overlays') || []; - - overlayUrls.forEach((statusOverlay) => { - createOverlayIcon(faviconUrl, statusOverlay).then((faviconWithOverlayUrl) => { - const image = $('<img />'); - image.addClass('appearance-light-logo-preview'); - image.attr('src', faviconWithOverlayUrl); - - faviconContainer.append(image); - }); - }); - } -} diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml index 308a779cb88..81979f7b331 100644 --- a/app/views/admin/appearances/_form.html.haml +++ b/app/views/admin/appearances/_form.html.haml @@ -62,12 +62,7 @@ = f.label :favicon, 'Favicon', class: 'control-label' .col-sm-10 - if @appearance.favicon? - = image_tag @appearance.favicon.favicon_main.url, class: 'appearance-light-logo-preview js-main-favicon' - - if @appearance.favicon? - = f.label :favicon, 'Status icons preview', class: 'control-label' - .col-sm-10 - - if @appearance.favicon? - .js-favicons{ data: { favicon: @appearance.favicon.favicon_main.url, status_overlays: Gitlab::Favicon.available_status_overlays } } + = image_tag @appearance.favicon.favicon_main.url, class: 'appearance-light-logo-preview' - if @appearance.persisted? %br = link_to 'Remove favicon', favicon_admin_appearances_path, data: { confirm: "Favicon will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo" |