mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Migration of livetvguide and livetvcomponents to ES6 moduoles
This commit is contained in:
parent
6607718edb
commit
947f8ba05d
3 changed files with 125 additions and 136 deletions
|
@ -1,29 +1,27 @@
|
|||
define(['tvguide'], function (tvguide) {
|
||||
'use strict';
|
||||
import tvguide from 'tvguide';
|
||||
|
||||
return function (view, params, tabContent) {
|
||||
var guideInstance;
|
||||
var self = this;
|
||||
export default function (view, params, tabContent) {
|
||||
let guideInstance;
|
||||
const self = this;
|
||||
|
||||
self.renderTab = function () {
|
||||
if (!guideInstance) {
|
||||
guideInstance = new tvguide({
|
||||
element: tabContent,
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
self.onShow = function () {
|
||||
if (guideInstance) {
|
||||
guideInstance.resume();
|
||||
}
|
||||
};
|
||||
|
||||
self.onHide = function () {
|
||||
if (guideInstance) {
|
||||
guideInstance.pause();
|
||||
}
|
||||
};
|
||||
self.renderTab = function () {
|
||||
if (!guideInstance) {
|
||||
guideInstance = new tvguide({
|
||||
element: tabContent,
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
self.onShow = function () {
|
||||
if (guideInstance) {
|
||||
guideInstance.resume();
|
||||
}
|
||||
};
|
||||
|
||||
self.onHide = function () {
|
||||
if (guideInstance) {
|
||||
guideInstance.pause();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue