1
0
Fork 0
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:
dkanada 2020-04-26 23:22:05 +09:00 committed by GitHub
commit be44db0e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 68 additions and 100 deletions

View file

@ -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;
};
})();
}

View file

@ -155,7 +155,7 @@ export function enable() {
function attachGamepadScript(e) { function attachGamepadScript(e) {
console.log("Gamepad connected! Attaching gamepadtokey.js script"); console.log("Gamepad connected! Attaching gamepadtokey.js script");
window.removeEventListener("gamepadconnected", attachGamepadScript); 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 // No need to check for gamepads manually at load time, the eventhandler will be fired for that

View file

@ -23,6 +23,35 @@ define([
console.debug("defining core routes"); 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({ defineRoute({
path: "/addplugin.html", path: "/addplugin.html",
autoFocus: false, autoFocus: false,
@ -41,13 +70,6 @@ define([
transition: "fade", transition: "fade",
controller: "user/profile" controller: "user/profile"
}); });
defineRoute({
path: "/addserver.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "auth/addserver"
});
defineRoute({ defineRoute({
path: "/mypreferencesdisplay.html", path: "/mypreferencesdisplay.html",
autoFocus: false, autoFocus: false,
@ -95,31 +117,31 @@ define([
path: "/devices.html", path: "/devices.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "devices" controller: "dashboard/devices/devices"
}); });
defineRoute({ defineRoute({
path: "/device.html", path: "/device.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "device" controller: "dashboard/devices/device"
}); });
defineRoute({ defineRoute({
path: "/dlnaprofile.html", path: "/dlnaprofile.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "dlnaprofile" controller: "dashboard/dlna/dlnaprofile"
}); });
defineRoute({ defineRoute({
path: "/dlnaprofiles.html", path: "/dlnaprofiles.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "dlnaprofiles" controller: "dashboard/dlna/dlnaprofiles"
}); });
defineRoute({ defineRoute({
path: "/dlnasettings.html", path: "/dlnasettings.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "dlnasettings" controller: "dashboard/dlna/dlnasettings"
}); });
defineRoute({ defineRoute({
path: "/edititemmetadata.html", path: "/edititemmetadata.html",
@ -130,20 +152,7 @@ define([
path: "/encodingsettings.html", path: "/encodingsettings.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "encodingsettings" controller: "dashboard/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"
}); });
defineRoute({ defineRoute({
path: "/home.html", path: "/home.html",
@ -158,11 +167,6 @@ define([
controller: "list", controller: "list",
transition: "fade" transition: "fade"
}); });
defineRoute({
path: "/index.html",
autoFocus: false,
isDefaultRoute: true
});
defineRoute({ defineRoute({
path: "/itemdetails.html", path: "/itemdetails.html",
controller: "itemdetailpage", controller: "itemdetailpage",
@ -173,19 +177,13 @@ define([
path: "/library.html", path: "/library.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "medialibrarypage" controller: "dashboard/medialibrarypage"
}); });
defineRoute({ defineRoute({
path: "/librarydisplay.html", path: "/librarydisplay.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "librarydisplay" controller: "dashboard/librarydisplay"
});
defineRoute({
path: "/librarysettings.html",
autoFocus: false,
roles: "admin",
controller: "librarysettings"
}); });
defineRoute({ defineRoute({
path: "/livetv.html", path: "/livetv.html",
@ -233,13 +231,13 @@ define([
path: "/metadataimages.html", path: "/metadataimages.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "metadataimagespage" controller: "dashboard/metadataimagespage"
}); });
defineRoute({ defineRoute({
path: "/metadatanfo.html", path: "/metadatanfo.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "metadatanfo" controller: "dashboard/metadatanfo"
}); });
defineRoute({ defineRoute({
path: "/movies.html", path: "/movies.html",
@ -265,20 +263,11 @@ define([
autoFocus: false, autoFocus: false,
roles: "admin" roles: "admin"
}); });
defineRoute({
path: "/nowplaying.html",
controller: "playback/nowplaying",
autoFocus: false,
transition: "fade",
fullscreen: true,
supportsThemeMedia: true,
enableMediaControl: false
});
defineRoute({ defineRoute({
path: "/playbackconfiguration.html", path: "/playbackconfiguration.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "playbackconfiguration" controller: "dashboard/playbackconfiguration"
}); });
defineRoute({ defineRoute({
path: "/availableplugins.html", path: "/availableplugins.html",
@ -308,31 +297,23 @@ define([
path: "/search.html", path: "/search.html",
controller: "searchpage" controller: "searchpage"
}); });
defineRoute({
path: "/selectserver.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "auth/selectserver",
type: "selectserver"
});
defineRoute({ defineRoute({
path: "/serveractivity.html", path: "/serveractivity.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "serveractivity" controller: "dashboard/serveractivity"
}); });
defineRoute({ defineRoute({
path: "/apikeys.html", path: "/apikeys.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "apikeys" controller: "dashboard/apikeys"
}); });
defineRoute({ defineRoute({
path: "/streamingsettings.html", path: "/streamingsettings.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "streamingsettings" controller: "dashboard/streamingsettings"
}); });
defineRoute({ defineRoute({
path: "/tv.html", path: "/tv.html",
@ -423,6 +404,15 @@ define([
fullscreen: true, fullscreen: true,
enableMediaControl: false enableMediaControl: false
}); });
defineRoute({
path: "/nowplaying.html",
controller: "playback/nowplaying",
autoFocus: false,
transition: "fade",
fullscreen: true,
supportsThemeMedia: true,
enableMediaControl: false
});
defineRoute({ defineRoute({
path: "/configurationpage", path: "/configurationpage",
autoFocus: false, autoFocus: false,
@ -436,4 +426,9 @@ define([
isDefaultRoute: true, isDefaultRoute: true,
autoFocus: false autoFocus: false
}); });
defineRoute({
path: "/index.html",
autoFocus: false,
isDefaultRoute: true
});
}); });

View file

@ -371,8 +371,9 @@ var AppInfo = {};
function initRequireWithBrowser(browser) { function initRequireWithBrowser(browser) {
var bowerPath = getBowerPath(); var bowerPath = getBowerPath();
var componentsPath = getComponentsPath(); var componentsPath = getComponentsPath();
var scriptsPath = getScriptsPath();
define("filesystem", [componentsPath + "/filesystem"], returnFirstDependency); define("filesystem", [scriptsPath + "/filesystem"], returnFirstDependency);
if (window.IntersectionObserver && !browser.edge) { if (window.IntersectionObserver && !browser.edge) {
define("lazyLoader", [componentsPath + "/lazyloader/lazyloader-intersectionobserver"], returnFirstDependency); define("lazyLoader", [componentsPath + "/lazyloader/lazyloader-intersectionobserver"], returnFirstDependency);
@ -425,9 +426,6 @@ var AppInfo = {};
if (!window.fetch) { if (!window.fetch) {
promises.push(require(["fetch"])); promises.push(require(["fetch"]));
} }
if ("function" != typeof Object.assign) {
promises.push(require(["objectassign"]));
}
Promise.all(promises).then(function () { Promise.all(promises).then(function () {
createConnectionManager().then(function () { createConnectionManager().then(function () {
@ -657,7 +655,7 @@ var AppInfo = {};
medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor", medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor",
imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor", imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor",
apphost: componentsPath + "/apphost", apphost: componentsPath + "/apphost",
visibleinviewport: componentsPath + "/visibleinviewport", visibleinviewport: bowerPath + "/visibleinviewport",
qualityoptions: componentsPath + "/qualityoptions", qualityoptions: componentsPath + "/qualityoptions",
focusManager: componentsPath + "/focusManager", focusManager: componentsPath + "/focusManager",
itemHelper: componentsPath + "/itemhelper", itemHelper: componentsPath + "/itemhelper",
@ -762,8 +760,8 @@ var AppInfo = {};
// TODO remove these libraries // TODO remove these libraries
// all of these have been modified so we need to fix that first // all of these have been modified so we need to fix that first
define("scroller", [componentsPath + "/scroller"], returnFirstDependency); define("scroller", [bowerPath + "/scroller"], returnFirstDependency);
define("navdrawer", [componentsPath + "/navdrawer/navdrawer"], returnFirstDependency); define("navdrawer", [bowerPath + "/navdrawer/navdrawer"], returnFirstDependency);
define("emby-button", [elementsPath + "/emby-button/emby-button"], returnFirstDependency); define("emby-button", [elementsPath + "/emby-button/emby-button"], returnFirstDependency);
define("paper-icon-button-light", [elementsPath + "/emby-button/paper-icon-button-light"], 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("playerSettingsMenu", [componentsPath + "/playback/playersettingsmenu"], returnFirstDependency);
define("playMethodHelper", [componentsPath + "/playback/playmethodhelper"], returnFirstDependency); define("playMethodHelper", [componentsPath + "/playback/playmethodhelper"], returnFirstDependency);
define("brightnessOsd", [componentsPath + "/playback/brightnessosd"], 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("multiSelect", [componentsPath + "/multiselect/multiselect"], returnFirstDependency);
define("alphaPicker", [componentsPath + "/alphapicker/alphapicker"], returnFirstDependency); define("alphaPicker", [componentsPath + "/alphapicker/alphapicker"], returnFirstDependency);
define("tabbedView", [componentsPath + "/tabbedview/tabbedview"], returnFirstDependency); define("tabbedView", [componentsPath + "/tabbedview/tabbedview"], returnFirstDependency);
@ -825,7 +823,7 @@ var AppInfo = {};
define("itemContextMenu", [componentsPath + "/itemcontextmenu"], returnFirstDependency); define("itemContextMenu", [componentsPath + "/itemcontextmenu"], returnFirstDependency);
define("imageEditor", [componentsPath + "/imageeditor/imageeditor"], returnFirstDependency); define("imageEditor", [componentsPath + "/imageeditor/imageeditor"], returnFirstDependency);
define("imageDownloader", [componentsPath + "/imagedownloader/imagedownloader"], returnFirstDependency); define("imageDownloader", [componentsPath + "/imagedownloader/imagedownloader"], returnFirstDependency);
define("dom", [componentsPath + "/dom"], returnFirstDependency); define("dom", [scriptsPath + "/dom"], returnFirstDependency);
define("playerStats", [componentsPath + "/playerstats/playerstats"], returnFirstDependency); define("playerStats", [componentsPath + "/playerstats/playerstats"], returnFirstDependency);
define("searchFields", [componentsPath + "/search/searchfields"], returnFirstDependency); define("searchFields", [componentsPath + "/search/searchfields"], returnFirstDependency);
define("searchResults", [componentsPath + "/search/searchresults"], returnFirstDependency); define("searchResults", [componentsPath + "/search/searchresults"], returnFirstDependency);
@ -855,8 +853,7 @@ var AppInfo = {};
return viewManager; return viewManager;
}); });
define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency); define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency);
define("objectassign", [componentsPath + "/polyfills/objectassign"], returnFirstDependency); define("focusPreventScroll", ["legacy/focusPreventScroll"], returnFirstDependency);
define("focusPreventScroll", [componentsPath + "/polyfills/focusPreventScroll"], returnFirstDependency);
define("userdataButtons", [componentsPath + "/userdatabuttons/userdatabuttons"], returnFirstDependency); define("userdataButtons", [componentsPath + "/userdatabuttons/userdatabuttons"], returnFirstDependency);
define("listView", [componentsPath + "/listview/listview"], returnFirstDependency); define("listView", [componentsPath + "/listview/listview"], returnFirstDependency);
define("indicators", [componentsPath + "/indicators/indicators"], returnFirstDependency); define("indicators", [componentsPath + "/indicators/indicators"], returnFirstDependency);
@ -874,8 +871,8 @@ var AppInfo = {};
define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency); define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency);
define("serverNotifications", [componentsPath + "/serverNotifications"], returnFirstDependency); define("serverNotifications", [componentsPath + "/serverNotifications"], returnFirstDependency);
define("skinManager", [componentsPath + "/skinManager"], returnFirstDependency); define("skinManager", [componentsPath + "/skinManager"], returnFirstDependency);
define("keyboardnavigation", [componentsPath + "/input/keyboardnavigation"], returnFirstDependency); define("keyboardnavigation", [scriptsPath + "/keyboardnavigation"], returnFirstDependency);
define("mouseManager", [componentsPath + "/input/mouseManager"], returnFirstDependency); define("mouseManager", [scriptsPath + "/mouseManager"], returnFirstDependency);
define("scrollManager", [componentsPath + "/scrollManager"], returnFirstDependency); define("scrollManager", [componentsPath + "/scrollManager"], returnFirstDependency);
define("autoFocuser", [componentsPath + "/autoFocuser"], returnFirstDependency); define("autoFocuser", [componentsPath + "/autoFocuser"], returnFirstDependency);
define("connectionManager", [], function () { define("connectionManager", [], function () {