1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

migration of useredit and library access to ES6 modules

This commit is contained in:
Cameron 2020-07-09 13:47:12 +01:00
parent 1f8ce6e6f4
commit ccad334517
3 changed files with 20 additions and 8 deletions

View file

@ -1,5 +1,9 @@
define(['jQuery', 'loading', 'libraryMenu', 'globalize'], function ($, loading, libraryMenu, globalize) {
'use strict';
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
/* eslint-disable indent */
function triggerChange(select) {
var evt = document.createEvent('HTMLEvents');
@ -84,7 +88,7 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize'], function ($, loading,
function onSaveComplete(page) {
loading.hide();
require(['toast'], function (toast) {
import('toast').then(({default: toast}) => {
toast(globalize.translate('SettingsSaved'));
});
}
@ -175,4 +179,5 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize'], function ($, loading,
loadUser(page, responses[0], responses[1], responses[2].Items, responses[3].Items, responses[4].Items);
});
});
});
/* eslint-enable indent */