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:
parent
560fc1c29a
commit
680e562779
3 changed files with 16 additions and 7 deletions
|
@ -104,6 +104,7 @@
|
||||||
"src/components/syncplay/playbackPermissionManager.js",
|
"src/components/syncplay/playbackPermissionManager.js",
|
||||||
"src/components/syncplay/syncPlayManager.js",
|
"src/components/syncplay/syncPlayManager.js",
|
||||||
"src/components/syncplay/timeSyncManager.js",
|
"src/components/syncplay/timeSyncManager.js",
|
||||||
|
"src/controllers/dashboard/logs.js",
|
||||||
"src/plugins/bookPlayer/plugin.js",
|
"src/plugins/bookPlayer/plugin.js",
|
||||||
"src/plugins/bookPlayer/tableOfContent.js",
|
"src/plugins/bookPlayer/tableOfContent.js",
|
||||||
"src/plugins/photoPlayer/plugin.js",
|
"src/plugins/photoPlayer/plugin.js",
|
||||||
|
|
|
@ -22,9 +22,9 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
||||||
newView.initComplete = true;
|
newView.initComplete = true;
|
||||||
|
|
||||||
if (typeof options.controllerFactory === 'function') {
|
if (typeof options.controllerFactory === 'function') {
|
||||||
|
|
||||||
// Use controller method
|
|
||||||
var controller = new options.controllerFactory(newView, eventDetail.detail.params);
|
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) {
|
if (!options.controllerFactory || dispatchPageEvents) {
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
define(['datetime', 'loading', 'apphost', 'listViewStyle', 'emby-button', 'flexStyles'], function(datetime, loading, appHost) {
|
import datetime from 'datetime';
|
||||||
'use strict';
|
import loading from 'loading';
|
||||||
return function(view, params) {
|
import appHost from 'apphost';
|
||||||
|
import 'emby-button';
|
||||||
|
import 'listViewStyle';
|
||||||
|
import 'flexStyles';
|
||||||
|
|
||||||
|
/* eslint-disable indent */
|
||||||
|
|
||||||
|
export default function(view, params) {
|
||||||
view.addEventListener('viewbeforeshow', function() {
|
view.addEventListener('viewbeforeshow', function() {
|
||||||
loading.show();
|
loading.show();
|
||||||
var apiClient = ApiClient;
|
var apiClient = ApiClient;
|
||||||
|
@ -29,5 +36,6 @@ define(['datetime', 'loading', 'apphost', 'listViewStyle', 'emby-button', 'flexS
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
|
||||||
|
/* eslint-enable indent */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue