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

add support for es6 controllers and migrate logs controller

This commit is contained in:
dkanada 2020-06-06 17:04:16 +09:00
parent 560fc1c29a
commit 680e562779
3 changed files with 16 additions and 7 deletions

View file

@ -104,6 +104,7 @@
"src/components/syncplay/playbackPermissionManager.js",
"src/components/syncplay/syncPlayManager.js",
"src/components/syncplay/timeSyncManager.js",
"src/controllers/dashboard/logs.js",
"src/plugins/bookPlayer/plugin.js",
"src/plugins/bookPlayer/tableOfContent.js",
"src/plugins/photoPlayer/plugin.js",

View file

@ -22,9 +22,9 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
newView.initComplete = true;
if (typeof options.controllerFactory === 'function') {
// Use controller method
var controller = new options.controllerFactory(newView, eventDetail.detail.params);
} else if (options.controllerFactory.default && typeof options.controllerFactory.default === 'function') {
var controller = new options.controllerFactory.default(newView, eventDetail.detail.params);
}
if (!options.controllerFactory || dispatchPageEvents) {

View file

@ -1,6 +1,13 @@
define(['datetime', 'loading', 'apphost', 'listViewStyle', 'emby-button', 'flexStyles'], function(datetime, loading, appHost) {
'use strict';
return function(view, params) {
import datetime from 'datetime';
import loading from 'loading';
import appHost from 'apphost';
import 'emby-button';
import 'listViewStyle';
import 'flexStyles';
/* eslint-disable indent */
export default function(view, params) {
view.addEventListener('viewbeforeshow', function() {
loading.show();
var apiClient = ApiClient;
@ -29,5 +36,6 @@ define(['datetime', 'loading', 'apphost', 'listViewStyle', 'emby-button', 'flexS
loading.hide();
});
});
};
});
}
/* eslint-enable indent */