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

migration of device and devices.js to ES6 modules

This commit is contained in:
Cameron 2020-07-09 14:23:41 +01:00
parent 1f8ce6e6f4
commit 8ad12fa0bb
3 changed files with 29 additions and 10 deletions

View file

@ -1,5 +1,10 @@
define(['loading', 'libraryMenu', 'dom', 'emby-input', 'emby-button'], function (loading, libraryMenu, dom) {
'use strict';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import dom from 'dom';
import 'emby-input';
import 'emby-button';
/* eslint-disable indent */
function load(page, device, deviceOptions) {
page.querySelector('#txtCustomName', page).value = deviceOptions.CustomName || '';
@ -43,8 +48,9 @@ define(['loading', 'libraryMenu', 'dom', 'emby-input', 'emby-button'], function
return false;
}
return function (view, params) {
export default function (view, params) {
view.querySelector('form').addEventListener('submit', onSubmit);
view.addEventListener('viewshow', loadData);
};
});
/* eslint-enable indent */