mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
unify guide between web and theater
This commit is contained in:
parent
e8c224ae0b
commit
af4e8c5529
23 changed files with 1314 additions and 1024 deletions
|
@ -3877,13 +3877,13 @@
|
|||
if (item.IsSeries && !item.IsRepeat) {
|
||||
|
||||
require(['livetvcss']);
|
||||
miscInfo.push('<span class="newTvProgram">' + Globalize.translate('LabelNewProgram') + '</span>');
|
||||
miscInfo.push('<span class="newTvProgram">' + Globalize.translate('AttributeNew') + '</span>');
|
||||
|
||||
}
|
||||
|
||||
if (item.IsLive) {
|
||||
|
||||
miscInfo.push('<span class="liveTvProgram">' + Globalize.translate('LabelLiveProgram') + '</span>');
|
||||
miscInfo.push('<span class="liveTvProgram">' + Globalize.translate('AttributeLive') + '</span>');
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -59,13 +59,13 @@
|
|||
html += '<div class="tvProgramTime">';
|
||||
|
||||
if (program.IsLive) {
|
||||
html += '<span class="liveTvProgram">' + Globalize.translate('LabelLiveProgram') + ' </span>';
|
||||
html += '<span class="liveTvProgram">' + Globalize.translate('AttributeLive') + ' </span>';
|
||||
}
|
||||
else if (program.IsPremiere) {
|
||||
html += '<span class="premiereTvProgram">' + Globalize.translate('LabelPremiereProgram') + ' </span>';
|
||||
html += '<span class="premiereTvProgram">' + Globalize.translate('AttributePremiere') + ' </span>';
|
||||
}
|
||||
else if (program.IsSeries && !program.IsRepeat) {
|
||||
html += '<span class="newTvProgram">' + Globalize.translate('LabelNewProgram') + ' </span>';
|
||||
html += '<span class="newTvProgram">' + Globalize.translate('AttributeNew') + ' </span>';
|
||||
}
|
||||
|
||||
var minutes = program.RunTimeTicks / 600000000;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define([], function () {
|
||||
define(['tvguide', 'embyRouter'], function (tvguide, embyRouter) {
|
||||
|
||||
window.LiveTvPage.initGuideTab = function (page, tabContent) {
|
||||
|
||||
|
@ -11,12 +11,9 @@
|
|||
page.guideInstance.refresh();
|
||||
}
|
||||
} else {
|
||||
require(['tvguide'], function (tvguide) {
|
||||
|
||||
page.guideInstance = new tvguide({
|
||||
element: tabContent,
|
||||
enableHeadRoom: true
|
||||
});
|
||||
page.guideInstance = new tvguide({
|
||||
element: tabContent,
|
||||
enableHeadRoom: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -207,6 +207,22 @@
|
|||
|
||||
});
|
||||
|
||||
pageIdOn('viewshow', "liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
// Needed on the guide tab
|
||||
// Ideally this should be moved to the guide tab on show/hide
|
||||
document.body.classList.add('autoScrollY');
|
||||
});
|
||||
|
||||
pageIdOn('viewbeforehide', "liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
document.body.classList.remove('autoScrollY');
|
||||
});
|
||||
|
||||
window.LiveTvPage = {
|
||||
renderSuggestedTab: renderSuggestedTab,
|
||||
initSuggestedTab: initSuggestedTab
|
||||
|
|
|
@ -297,4 +297,5 @@
|
|||
}
|
||||
};
|
||||
|
||||
return window.RegistrationServices;
|
||||
});
|
|
@ -1481,7 +1481,7 @@ var AppInfo = {};
|
|||
console.log('loaded ApiClient singleton');
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1605,7 +1605,6 @@ var AppInfo = {};
|
|||
|
||||
var paths = {
|
||||
velocity: bowerPath + "/velocity/velocity.min",
|
||||
tvguide: 'components/tvguide/tvguide',
|
||||
ironCardList: 'components/ironcardlist/ironcardlist',
|
||||
scrollThreshold: 'components/scrollthreshold',
|
||||
directorybrowser: 'components/directorybrowser/directorybrowser',
|
||||
|
@ -1635,7 +1634,9 @@ var AppInfo = {};
|
|||
layoutManager: embyWebComponentsBowerPath + "/layoutmanager",
|
||||
pageJs: embyWebComponentsBowerPath + '/page.js/page',
|
||||
focusManager: embyWebComponentsBowerPath + "/focusmanager",
|
||||
datetime: embyWebComponentsBowerPath + "/datetime",
|
||||
globalize: embyWebComponentsBowerPath + "/globalize",
|
||||
itemShortcuts: embyWebComponentsBowerPath + "/shortcuts",
|
||||
imageLoader: embyWebComponentsBowerPath + "/images/imagehelper"
|
||||
};
|
||||
|
||||
|
@ -1667,6 +1668,11 @@ var AppInfo = {};
|
|||
define("backdrop", [embyWebComponentsBowerPath + "/backdrop/backdrop"], returnFirstDependency);
|
||||
define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency);
|
||||
|
||||
define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], function (tvGuide, embyRouter) {
|
||||
tvGuide.setBaseUrl(embyRouter.baseUrl() + '/bower_components/emby-webcomponents/guide');
|
||||
return tvGuide;
|
||||
});
|
||||
|
||||
define("viewManager", [embyWebComponentsBowerPath + "/viewmanager"], function (viewManager) {
|
||||
viewManager.dispatchPageEvents(true);
|
||||
return viewManager;
|
||||
|
@ -1786,12 +1792,13 @@ var AppInfo = {};
|
|||
define('webcomponentsjs', [bowerPath + '/webcomponentsjs/webcomponents-lite.min.js']);
|
||||
define('native-promise-only', [bowerPath + '/native-promise-only/lib/npo.src']);
|
||||
define("fingerprintjs2", [bowerPath + '/fingerprintjs2/fingerprint2'], returnFirstDependency);
|
||||
define("clearButtonStyle", ['css!' + embyWebComponentsBowerPath + '/clearbutton']);
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
define('registrationservices', ['cordova/registrationservices']);
|
||||
define('registrationservices', ['cordova/registrationservices'], returnFirstDependency);
|
||||
|
||||
} else {
|
||||
define('registrationservices', ['scripts/registrationservices']);
|
||||
define('registrationservices', ['scripts/registrationservices'], returnFirstDependency);
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
|
@ -1866,6 +1873,12 @@ var AppInfo = {};
|
|||
};
|
||||
});
|
||||
|
||||
// mock this for now. not used in this app
|
||||
define("playbackManager", [], function () {
|
||||
return {
|
||||
};
|
||||
});
|
||||
|
||||
// mock this for now. not used in this app
|
||||
define("pluginManager", [], function () {
|
||||
return {
|
||||
|
@ -1884,7 +1897,7 @@ var AppInfo = {};
|
|||
|
||||
define('dialogText', ['globalize'], getDialogText());
|
||||
|
||||
define("router", [embyWebComponentsBowerPath + '/router'], function (embyRouter) {
|
||||
define("embyRouter", [embyWebComponentsBowerPath + '/router'], function (embyRouter) {
|
||||
|
||||
embyRouter.showLocalLogin = function (apiClient, serverId, manualLogin) {
|
||||
Dashboard.navigate('login.html?serverid=' + serverId);
|
||||
|
@ -1907,6 +1920,17 @@ var AppInfo = {};
|
|||
Dashboard.navigate('mypreferencesmenu.html?userId=' + ApiClient.getCurrentUserId());
|
||||
};
|
||||
|
||||
embyRouter.showItem = function (item) {
|
||||
if (typeof (item) === 'string') {
|
||||
require(['connectionManager'], function (connectionManager) {
|
||||
var apiClient = connectionManager.currentApiClient();
|
||||
apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem);
|
||||
});
|
||||
} else {
|
||||
Dashboard.navigate(LibraryBrowser.getHref(item));
|
||||
}
|
||||
};
|
||||
|
||||
return embyRouter;
|
||||
});
|
||||
}
|
||||
|
@ -2873,7 +2897,7 @@ var AppInfo = {};
|
|||
var deps = [];
|
||||
|
||||
deps.push('imageLoader');
|
||||
deps.push('router');
|
||||
deps.push('embyRouter');
|
||||
deps.push('layoutManager');
|
||||
|
||||
if (!(AppInfo.isNativeApp && browserInfo.android)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue