mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1121 from jellyfin/routes
Update more route locations
This commit is contained in:
commit
be44db0e3d
29 changed files with 68 additions and 100 deletions
|
@ -1,24 +0,0 @@
|
|||
if (typeof Object.assign != 'function') {
|
||||
(function () {
|
||||
Object.assign = function (target) {
|
||||
'use strict';
|
||||
if (target === undefined || target === null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
var output = Object(target);
|
||||
for (var index = 1; index < arguments.length; index++) {
|
||||
var source = arguments[index];
|
||||
if (source !== undefined && source !== null) {
|
||||
for (var nextKey in source) {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (source.hasOwnProperty(nextKey)) {
|
||||
output[nextKey] = source[nextKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
})();
|
||||
}
|
|
@ -155,7 +155,7 @@ export function enable() {
|
|||
function attachGamepadScript(e) {
|
||||
console.log("Gamepad connected! Attaching gamepadtokey.js script");
|
||||
window.removeEventListener("gamepadconnected", attachGamepadScript);
|
||||
require(["components/input/gamepadtokey"]);
|
||||
require(["scripts/gamepadtokey"]);
|
||||
}
|
||||
|
||||
// No need to check for gamepads manually at load time, the eventhandler will be fired for that
|
|
@ -23,6 +23,35 @@ define([
|
|||
|
||||
console.debug("defining core routes");
|
||||
|
||||
defineRoute({
|
||||
path: "/addserver.html",
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/addserver"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/selectserver.html",
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/selectserver",
|
||||
type: "selectserver"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/forgotpassword.html",
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/forgotpassword"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/forgotpasswordpin.html",
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/forgotpasswordpin"
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: "/addplugin.html",
|
||||
autoFocus: false,
|
||||
|
@ -41,13 +70,6 @@ define([
|
|||
transition: "fade",
|
||||
controller: "user/profile"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/addserver.html",
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/addserver"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/mypreferencesdisplay.html",
|
||||
autoFocus: false,
|
||||
|
@ -95,31 +117,31 @@ define([
|
|||
path: "/devices.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "devices"
|
||||
controller: "dashboard/devices/devices"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/device.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "device"
|
||||
controller: "dashboard/devices/device"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/dlnaprofile.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "dlnaprofile"
|
||||
controller: "dashboard/dlna/dlnaprofile"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/dlnaprofiles.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "dlnaprofiles"
|
||||
controller: "dashboard/dlna/dlnaprofiles"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/dlnasettings.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "dlnasettings"
|
||||
controller: "dashboard/dlna/dlnasettings"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/edititemmetadata.html",
|
||||
|
@ -130,20 +152,7 @@ define([
|
|||
path: "/encodingsettings.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "encodingsettings"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/forgotpassword.html",
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/forgotpassword"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/forgotpasswordpin.html",
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/forgotpasswordpin"
|
||||
controller: "dashboard/encodingsettings"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/home.html",
|
||||
|
@ -158,11 +167,6 @@ define([
|
|||
controller: "list",
|
||||
transition: "fade"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/index.html",
|
||||
autoFocus: false,
|
||||
isDefaultRoute: true
|
||||
});
|
||||
defineRoute({
|
||||
path: "/itemdetails.html",
|
||||
controller: "itemdetailpage",
|
||||
|
@ -173,19 +177,13 @@ define([
|
|||
path: "/library.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "medialibrarypage"
|
||||
controller: "dashboard/medialibrarypage"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/librarydisplay.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "librarydisplay"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/librarysettings.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "librarysettings"
|
||||
controller: "dashboard/librarydisplay"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/livetv.html",
|
||||
|
@ -233,13 +231,13 @@ define([
|
|||
path: "/metadataimages.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "metadataimagespage"
|
||||
controller: "dashboard/metadataimagespage"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/metadatanfo.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "metadatanfo"
|
||||
controller: "dashboard/metadatanfo"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/movies.html",
|
||||
|
@ -265,20 +263,11 @@ define([
|
|||
autoFocus: false,
|
||||
roles: "admin"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/nowplaying.html",
|
||||
controller: "playback/nowplaying",
|
||||
autoFocus: false,
|
||||
transition: "fade",
|
||||
fullscreen: true,
|
||||
supportsThemeMedia: true,
|
||||
enableMediaControl: false
|
||||
});
|
||||
defineRoute({
|
||||
path: "/playbackconfiguration.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "playbackconfiguration"
|
||||
controller: "dashboard/playbackconfiguration"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/availableplugins.html",
|
||||
|
@ -308,31 +297,23 @@ define([
|
|||
path: "/search.html",
|
||||
controller: "searchpage"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/selectserver.html",
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
startup: true,
|
||||
controller: "auth/selectserver",
|
||||
type: "selectserver"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/serveractivity.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "serveractivity"
|
||||
controller: "dashboard/serveractivity"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/apikeys.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "apikeys"
|
||||
controller: "dashboard/apikeys"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/streamingsettings.html",
|
||||
autoFocus: false,
|
||||
roles: "admin",
|
||||
controller: "streamingsettings"
|
||||
controller: "dashboard/streamingsettings"
|
||||
});
|
||||
defineRoute({
|
||||
path: "/tv.html",
|
||||
|
@ -423,6 +404,15 @@ define([
|
|||
fullscreen: true,
|
||||
enableMediaControl: false
|
||||
});
|
||||
defineRoute({
|
||||
path: "/nowplaying.html",
|
||||
controller: "playback/nowplaying",
|
||||
autoFocus: false,
|
||||
transition: "fade",
|
||||
fullscreen: true,
|
||||
supportsThemeMedia: true,
|
||||
enableMediaControl: false
|
||||
});
|
||||
defineRoute({
|
||||
path: "/configurationpage",
|
||||
autoFocus: false,
|
||||
|
@ -436,4 +426,9 @@ define([
|
|||
isDefaultRoute: true,
|
||||
autoFocus: false
|
||||
});
|
||||
defineRoute({
|
||||
path: "/index.html",
|
||||
autoFocus: false,
|
||||
isDefaultRoute: true
|
||||
});
|
||||
});
|
||||
|
|
|
@ -371,8 +371,9 @@ var AppInfo = {};
|
|||
function initRequireWithBrowser(browser) {
|
||||
var bowerPath = getBowerPath();
|
||||
var componentsPath = getComponentsPath();
|
||||
var scriptsPath = getScriptsPath();
|
||||
|
||||
define("filesystem", [componentsPath + "/filesystem"], returnFirstDependency);
|
||||
define("filesystem", [scriptsPath + "/filesystem"], returnFirstDependency);
|
||||
|
||||
if (window.IntersectionObserver && !browser.edge) {
|
||||
define("lazyLoader", [componentsPath + "/lazyloader/lazyloader-intersectionobserver"], returnFirstDependency);
|
||||
|
@ -425,9 +426,6 @@ var AppInfo = {};
|
|||
if (!window.fetch) {
|
||||
promises.push(require(["fetch"]));
|
||||
}
|
||||
if ("function" != typeof Object.assign) {
|
||||
promises.push(require(["objectassign"]));
|
||||
}
|
||||
|
||||
Promise.all(promises).then(function () {
|
||||
createConnectionManager().then(function () {
|
||||
|
@ -657,7 +655,7 @@ var AppInfo = {};
|
|||
medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor",
|
||||
imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor",
|
||||
apphost: componentsPath + "/apphost",
|
||||
visibleinviewport: componentsPath + "/visibleinviewport",
|
||||
visibleinviewport: bowerPath + "/visibleinviewport",
|
||||
qualityoptions: componentsPath + "/qualityoptions",
|
||||
focusManager: componentsPath + "/focusManager",
|
||||
itemHelper: componentsPath + "/itemhelper",
|
||||
|
@ -762,8 +760,8 @@ var AppInfo = {};
|
|||
|
||||
// TODO remove these libraries
|
||||
// all of these have been modified so we need to fix that first
|
||||
define("scroller", [componentsPath + "/scroller"], returnFirstDependency);
|
||||
define("navdrawer", [componentsPath + "/navdrawer/navdrawer"], returnFirstDependency);
|
||||
define("scroller", [bowerPath + "/scroller"], returnFirstDependency);
|
||||
define("navdrawer", [bowerPath + "/navdrawer/navdrawer"], returnFirstDependency);
|
||||
|
||||
define("emby-button", [elementsPath + "/emby-button/emby-button"], returnFirstDependency);
|
||||
define("paper-icon-button-light", [elementsPath + "/emby-button/paper-icon-button-light"], returnFirstDependency);
|
||||
|
@ -803,7 +801,7 @@ var AppInfo = {};
|
|||
define("playerSettingsMenu", [componentsPath + "/playback/playersettingsmenu"], returnFirstDependency);
|
||||
define("playMethodHelper", [componentsPath + "/playback/playmethodhelper"], returnFirstDependency);
|
||||
define("brightnessOsd", [componentsPath + "/playback/brightnessosd"], returnFirstDependency);
|
||||
define("alphaNumericShortcuts", [componentsPath + "/alphanumericshortcuts/alphanumericshortcuts"], returnFirstDependency);
|
||||
define("alphaNumericShortcuts", [scriptsPath + "/alphanumericshortcuts"], returnFirstDependency);
|
||||
define("multiSelect", [componentsPath + "/multiselect/multiselect"], returnFirstDependency);
|
||||
define("alphaPicker", [componentsPath + "/alphapicker/alphapicker"], returnFirstDependency);
|
||||
define("tabbedView", [componentsPath + "/tabbedview/tabbedview"], returnFirstDependency);
|
||||
|
@ -825,7 +823,7 @@ var AppInfo = {};
|
|||
define("itemContextMenu", [componentsPath + "/itemcontextmenu"], returnFirstDependency);
|
||||
define("imageEditor", [componentsPath + "/imageeditor/imageeditor"], returnFirstDependency);
|
||||
define("imageDownloader", [componentsPath + "/imagedownloader/imagedownloader"], returnFirstDependency);
|
||||
define("dom", [componentsPath + "/dom"], returnFirstDependency);
|
||||
define("dom", [scriptsPath + "/dom"], returnFirstDependency);
|
||||
define("playerStats", [componentsPath + "/playerstats/playerstats"], returnFirstDependency);
|
||||
define("searchFields", [componentsPath + "/search/searchfields"], returnFirstDependency);
|
||||
define("searchResults", [componentsPath + "/search/searchresults"], returnFirstDependency);
|
||||
|
@ -855,8 +853,7 @@ var AppInfo = {};
|
|||
return viewManager;
|
||||
});
|
||||
define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency);
|
||||
define("objectassign", [componentsPath + "/polyfills/objectassign"], returnFirstDependency);
|
||||
define("focusPreventScroll", [componentsPath + "/polyfills/focusPreventScroll"], returnFirstDependency);
|
||||
define("focusPreventScroll", ["legacy/focusPreventScroll"], returnFirstDependency);
|
||||
define("userdataButtons", [componentsPath + "/userdatabuttons/userdatabuttons"], returnFirstDependency);
|
||||
define("listView", [componentsPath + "/listview/listview"], returnFirstDependency);
|
||||
define("indicators", [componentsPath + "/indicators/indicators"], returnFirstDependency);
|
||||
|
@ -874,8 +871,8 @@ var AppInfo = {};
|
|||
define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency);
|
||||
define("serverNotifications", [componentsPath + "/serverNotifications"], returnFirstDependency);
|
||||
define("skinManager", [componentsPath + "/skinManager"], returnFirstDependency);
|
||||
define("keyboardnavigation", [componentsPath + "/input/keyboardnavigation"], returnFirstDependency);
|
||||
define("mouseManager", [componentsPath + "/input/mouseManager"], returnFirstDependency);
|
||||
define("keyboardnavigation", [scriptsPath + "/keyboardnavigation"], returnFirstDependency);
|
||||
define("mouseManager", [scriptsPath + "/mouseManager"], returnFirstDependency);
|
||||
define("scrollManager", [componentsPath + "/scrollManager"], returnFirstDependency);
|
||||
define("autoFocuser", [componentsPath + "/autoFocuser"], returnFirstDependency);
|
||||
define("connectionManager", [], function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue