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 loadDeleteFolders(page, user, mediaFolders) {
ApiClient.getJSON(ApiClient.getUrl('Channels', {
@ -112,7 +116,7 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize'], function ($, loading,
Dashboard.navigate('userprofiles.html');
loading.hide();
require(['toast'], function (toast) {
import('toast').then(({default: toast}) => {
toast(globalize.translate('SettingsSaved'));
});
}
@ -197,4 +201,5 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize'], function ($, loading,
}).on('pagebeforeshow', '#editUserPage', function () {
loadData(this);
});
});
/* eslint-enable indent */