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

migration of usernew and userparentalcontrol to ES6 modules

This commit is contained in:
Cameron 2020-07-09 13:47:35 +01:00
parent ccad334517
commit 84a47081be
3 changed files with 26 additions and 11 deletions

View file

@ -1,5 +1,9 @@
define(['jQuery', 'loading', 'globalize', 'emby-checkbox'], function ($, loading, globalize) {
'use strict';
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-checkbox';
/* eslint-disable indent */
function loadMediaFolders(page, mediaFolders) {
var html = '';
@ -84,7 +88,7 @@ define(['jQuery', 'loading', 'globalize', 'emby-checkbox'], function ($, loading
Dashboard.navigate('useredit.html?userId=' + user.Id);
});
}, function (response) {
require(['toast'], function (toast) {
import('toast').then(({default: toast}) => {
toast(globalize.translate('DefaultErrorMessage'));
});
@ -123,4 +127,5 @@ define(['jQuery', 'loading', 'globalize', 'emby-checkbox'], function ($, loading
}).on('pageshow', '#newUserPage', function () {
loadData(this);
});
});
/* eslint-enable indent */