mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-29 08:33:32 +03:00
Made eslint using 'browser' environment and added globals, because RainLoop is used in browsers.
This also allowed to remove all webpack 'externals' overhead.
This commit is contained in:
parent
c3a213802d
commit
e7180a86ce
81 changed files with 1857 additions and 1259 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import $ from '$';
|
||||
|
||||
let cachedUrl = null;
|
||||
const getUrl = () => {
|
||||
if (!cachedUrl) {
|
||||
const version = $('#rlAppVersion').attr('content') || '0.0.0';
|
||||
const version = jQuery('#rlAppVersion').attr('content') || '0.0.0';
|
||||
cachedUrl = `rainloop/v/${version}/static/css/svg/icons.svg`;
|
||||
}
|
||||
|
||||
|
|
@ -15,7 +13,7 @@ export default {
|
|||
viewModel: {
|
||||
createViewModel: ({ icon = 'null' }, componentInfo) => {
|
||||
if (componentInfo && componentInfo.element) {
|
||||
$(componentInfo.element).replaceWith(
|
||||
jQuery(componentInfo.element).replaceWith(
|
||||
`<svg class="svg-icon svg-icon-${icon}"><use xlink:href="${getUrl()}#svg-icon-${icon}"></use></svg>`
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue