blob: 6b2dcf4502efad95fea93b8b63318ec71966c6f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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);
});
});
}
}
|