1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

module resolution for appRouter and moved controllers to dir

This commit is contained in:
vitorsemeano 2019-02-24 20:07:41 +00:00
parent d49fee2a29
commit 9c758a8d85
49 changed files with 464 additions and 530 deletions

View file

@ -125,13 +125,11 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
sendRouteToViewManager(ctx, next, route, controllerFactory); sendRouteToViewManager(ctx, next, route, controllerFactory);
}; };
require(route.dependencies || [], function () { if (route.controller) {
if (route.controller) { require([`controllers/${route.controller}`], onInitComplete);
require([route.controller], onInitComplete); } else {
} else { onInitComplete();
onInitComplete(); }
}
});
} }
function cancelCurrentLoadRequest() { function cancelCurrentLoadRequest() {

View file

@ -24,10 +24,10 @@ define(["tabbedView", "globalize", "require", "emby-tabs", "emby-button", "emby-
var depends = []; var depends = [];
switch (index) { switch (index) {
case 0: case 0:
depends.push("./hometab"); depends.push("controllers/hometab");
break; break;
case 1: case 1:
depends.push("./favorites") depends.push("controllers/favorites")
} }
var instance = this; var instance = this;
return getRequirePromise(depends).then(function(controllerFactory) { return getRequirePromise(depends).then(function(controllerFactory) {

View file

@ -1,4 +1,4 @@
define(["scripts/userpasswordpage", "loading", "libraryMenu", "apphost", "emby-linkbutton"], function (Userpasswordpage, loading, libraryMenu, appHost) { define(["controllers/userpasswordpage", "loading", "libraryMenu", "apphost", "emby-linkbutton"], function (Userpasswordpage, loading, libraryMenu, appHost) {
"use strict"; "use strict";
function reloadUser(page) { function reloadUser(page) {

450
src/scripts/routes.js Normal file
View file

@ -0,0 +1,450 @@
define([
"emby-button",
"emby-input",
"scripts/livetvcomponents",
"paper-icon-button-light",
"emby-itemscontainer",
"emby-collapse",
"emby-select",
"livetvcss",
"emby-checkbox",
"emby-slider",
"listViewStyle",
"dashboardcss"], function () {
function defineRoute(newRoute, dictionary) {
var baseRoute = Emby.Page.baseUrl();
var path = newRoute.path;
path = path.replace(baseRoute, "");
console.log("Defining route: " + path);
newRoute.dictionary = newRoute.dictionary || dictionary || "core";
Emby.Page.addRoute(path, newRoute);
}
console.log("Defining core routes");
defineRoute({
path: "/addplugin.html",
autoFocus: false,
roles: "admin",
controller: "addpluginpage"
});
defineRoute({
path: "/appservices.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/autoorganizelog.html",
roles: "admin"
});
defineRoute({
path: "/channelsettings.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/addserver.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "addserver"
});
defineRoute({
path: "/dashboard.html",
autoFocus: false,
roles: "admin",
controller: "dashboardpage"
});
defineRoute({
path: "/dashboardgeneral.html",
controller: "dashboardgeneral",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dashboardhosting.html",
autoFocus: false,
roles: "admin",
controller: "dashboardhosting"
});
defineRoute({
path: "/devices/devices.html",
autoFocus: false,
roles: "admin",
controller: "devices"
});
defineRoute({
path: "/devices/device.html",
autoFocus: false,
roles: "admin",
controller: "device"
});
defineRoute({
path: "/dlnaprofile.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dlnaprofiles.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dlnaserversettings.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dlnasettings.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/edititemmetadata.html",
controller: "edititemmetadata",
autoFocus: false
});
defineRoute({
path: "/encodingsettings.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/opensubtitles.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/forgotpassword.html",
anonymous: true,
startup: true,
controller: "forgotpassword"
});
defineRoute({
path: "/forgotpasswordpin.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "forgotpasswordpin"
});
defineRoute({
path: "/home.html",
autoFocus: false,
controller: "home",
transition: "fade",
type: "home"
});
defineRoute({
path: "/list/list.html",
autoFocus: false,
controller: "list",
transition: "fade"
});
defineRoute({
path: "/index.html",
autoFocus: false,
isDefaultRoute: true
});
defineRoute({
path: "/itemdetails.html",
controller: "itemdetailpage",
autoFocus: false,
transition: "fade"
});
defineRoute({
path: "/library.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/librarydisplay.html",
autoFocus: false,
roles: "admin",
controller: "librarydisplay"
});
defineRoute({
path: "/librarysettings.html",
autoFocus: false,
roles: "admin",
controller: "librarysettings"
});
defineRoute({
path: "/livetv.html",
controller: "livetvsuggested",
autoFocus: false,
transition: "fade"
});
defineRoute({
path: "/livetvguideprovider.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/livetvseriestimer.html",
autoFocus: false,
controller: "livetvseriestimer"
});
defineRoute({
path: "/livetvsettings.html",
autoFocus: false
});
defineRoute({
path: "/livetvstatus.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/livetvtuner.html",
autoFocus: false,
roles: "admin",
controller: "livetvtuner"
});
defineRoute({
path: "/log.html",
roles: "admin",
controller: "logpage"
});
defineRoute({
path: "/login.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "loginpage"
});
defineRoute({
path: "/metadataadvanced.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/metadataimages.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/metadatanfo.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/movies.html",
autoFocus: false,
controller: "moviesrecommended",
transition: "fade"
});
defineRoute({
path: "/music.html",
controller: "musicrecommended",
autoFocus: false,
transition: "fade"
});
defineRoute({
path: "/mypreferencesdisplay.html",
autoFocus: false,
transition: "fade",
controller: "mypreferencesdisplay"
});
defineRoute({
path: "/mypreferenceshome.html",
autoFocus: false,
transition: "fade",
controller: "mypreferenceshome"
});
defineRoute({
path: "/mypreferencessubtitles.html",
autoFocus: false,
transition: "fade",
controller: "mypreferencessubtitles"
});
defineRoute({
path: "/mypreferenceslanguages.html",
autoFocus: false,
transition: "fade",
controller: "mypreferenceslanguages"
});
defineRoute({
path: "/mypreferencesmenu.html",
autoFocus: false,
transition: "fade",
controller: "mypreferencescommon"
});
defineRoute({
path: "/myprofile.html",
autoFocus: false,
transition: "fade",
controller: "myprofile"
});
defineRoute({
path: "/notificationsetting.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/notificationsettings.html",
controller: "notificationsettings",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/nowplaying.html",
controller: "nowplayingpage",
autoFocus: false,
transition: "fade",
fullscreen: true,
supportsThemeMedia: true,
enableMediaControl: false
});
defineRoute({
path: "/playbackconfiguration.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/plugincatalog.html",
autoFocus: false,
roles: "admin",
controller: "plugincatalogpage"
});
defineRoute({
path: "/plugins.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/scheduledtask.html",
autoFocus: false,
roles: "admin",
controller: "scheduledtaskpage"
});
defineRoute({
path: "/scheduledtasks.html",
autoFocus: false,
roles: "admin",
controller: "scheduledtaskspage"
});
defineRoute({
path: "/search.html",
controller: "searchpage"
});
defineRoute({
path: "/selectserver.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "selectserver"
});
defineRoute({
path: "/serveractivity.html",
autoFocus: false,
roles: "admin",
controller: "serveractivity"
});
defineRoute({
path: "/serversecurity.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/streamingsettings.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/support.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/tv.html",
autoFocus: false,
controller: "tvrecommended",
transition: "fade"
});
defineRoute({
path: "/useredit.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/userlibraryaccess.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/usernew.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/userparentalcontrol.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/userpassword.html",
autoFocus: false,
controller: "userpasswordpage"
});
defineRoute({
path: "/userprofiles.html",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/wizardremoteaccess.html",
autoFocus: false,
anonymous: true,
controller: "wizardremoteaccess"
});
defineRoute({
path: "/wizardfinish.html",
autoFocus: false,
anonymous: true,
controller: "wizardfinishpage"
});
defineRoute({
path: "/wizardlibrary.html",
autoFocus: false,
anonymous: true
});
defineRoute({
path: "/wizardsettings.html",
autoFocus: false,
anonymous: true,
controller: "wizardsettings"
});
defineRoute({
path: "/wizardstart.html",
autoFocus: false,
anonymous: true,
controller: "wizardstart"
});
defineRoute({
path: "/wizarduser.html",
controller: "wizarduserpage",
autoFocus: false,
anonymous: true
});
defineRoute({
path: "/videoosd.html",
transition: "fade",
controller: "videoosd",
autoFocus: false,
type: "video-osd",
supportsThemeMedia: true,
fullscreen: true,
enableMediaControl: false
});
defineRoute({
path: "/configurationpage",
autoFocus: false,
enableCache: false,
enableContentQueryString: true,
roles: "admin"
});
defineRoute({
path: "/",
isDefaultRoute: true,
autoFocus: false,
});
});

View file

@ -426,7 +426,7 @@ var AppInfo = {};
function initRequireWithBrowser(browser) { function initRequireWithBrowser(browser) {
var bowerPath = getBowerPath(); var bowerPath = getBowerPath();
var apiClientBowerPath = bowerPath + "/emby-apiclient"; var apiClientBowerPath = bowerPath + "/apiclient";
var componentsPath = "components"; var componentsPath = "components";
define("filesystem", [componentsPath + "/filesystem"], returnFirstDependency); define("filesystem", [componentsPath + "/filesystem"], returnFirstDependency);
@ -439,12 +439,7 @@ var AppInfo = {};
define("shell", [componentsPath + "/shell"], returnFirstDependency); define("shell", [componentsPath + "/shell"], returnFirstDependency);
if ("cordova" === self.appMode || "android" === self.appMode) { define("apiclient", ["bower_components/apiclient/apiclient"], returnFirstDependency);
define("apiclientcore", ["bower_components/emby-apiclient/apiclient"], returnFirstDependency);
define("apiclient", ["bower_components/emby-apiclient/apiclientex"], returnFirstDependency);
} else {
define("apiclient", ["bower_components/emby-apiclient/apiclient"], returnFirstDependency);
}
if ("registerElement" in document) { if ("registerElement" in document) {
define("registerElement", []); define("registerElement", []);
@ -575,514 +570,6 @@ var AppInfo = {};
}); });
} }
function defineRoute(newRoute, dictionary) {
var baseRoute = Emby.Page.baseUrl();
var path = newRoute.path;
path = path.replace(baseRoute, "");
console.log("Defining route: " + path);
newRoute.dictionary = newRoute.dictionary || dictionary || "core";
Emby.Page.addRoute(path, newRoute);
}
function defineCoreRoutes(appHost) {
console.log("Defining core routes");
defineRoute({
path: "/addplugin.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "scripts/addpluginpage"
});
defineRoute({
path: "/autoorganizelog.html",
dependencies: [],
roles: "admin"
});
defineRoute({
path: "/channelsettings.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/addserver.html",
dependencies: ["emby-button", "emby-input"],
autoFocus: false,
anonymous: true,
startup: true,
controller: "scripts/addserver"
});
defineRoute({
path: "/dashboard.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "scripts/dashboardpage"
});
defineRoute({
path: "/dashboardgeneral.html",
controller: "dashboard/dashboardgeneral",
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dashboardhosting.html",
dependencies: ["emby-input", "emby-button"],
autoFocus: false,
roles: "admin",
controller: "dashboard/dashboardhosting"
});
defineRoute({
path: "/devices/devices.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "devices/devices"
});
defineRoute({
path: "/devices/device.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "devices/device"
});
defineRoute({
path: "/dlnaprofile.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dlnaprofiles.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dlnaserversettings.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/dlnasettings.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/edititemmetadata.html",
dependencies: [],
controller: "scripts/edititemmetadata",
autoFocus: false
});
defineRoute({
path: "/encodingsettings.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/forgotpassword.html",
dependencies: ["emby-input", "emby-button"],
anonymous: true,
startup: true,
controller: "scripts/forgotpassword"
});
defineRoute({
path: "/forgotpasswordpin.html",
dependencies: ["emby-input", "emby-button"],
autoFocus: false,
anonymous: true,
startup: true,
controller: "scripts/forgotpasswordpin"
});
defineRoute({
path: "/home.html",
dependencies: [],
autoFocus: false,
controller: "home/home",
transition: "fade",
type: "home"
});
defineRoute({
path: "/list/list.html",
dependencies: [],
autoFocus: false,
controller: "list/list",
transition: "fade"
});
defineRoute({
path: "/index.html",
dependencies: [],
autoFocus: false,
isDefaultRoute: true
});
defineRoute({
path: "/itemdetails.html",
dependencies: ["emby-button", "scripts/livetvcomponents", "paper-icon-button-light", "emby-itemscontainer"],
controller: "scripts/itemdetailpage",
autoFocus: false,
transition: "fade"
});
defineRoute({
path: "/library.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/librarydisplay.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "dashboard/librarydisplay"
});
defineRoute({
path: "/librarysettings.html",
dependencies: ["emby-collapse", "emby-input", "emby-button", "emby-select"],
autoFocus: false,
roles: "admin",
controller: "dashboard/librarysettings"
});
defineRoute({
path: "/livetv.html",
dependencies: ["emby-button", "livetvcss"],
controller: "scripts/livetvsuggested",
autoFocus: false,
transition: "fade"
});
defineRoute({
path: "/livetvguideprovider.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/livetvseriestimer.html",
dependencies: ["emby-checkbox", "emby-input", "emby-button", "emby-collapse", "scripts/livetvcomponents", "scripts/livetvseriestimer", "livetvcss"],
autoFocus: false,
controller: "scripts/livetvseriestimer"
});
defineRoute({
path: "/livetvsettings.html",
dependencies: [],
autoFocus: false
});
defineRoute({
path: "/livetvstatus.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/livetvtuner.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "dashboard/livetvtuner"
});
defineRoute({
path: "/log.html",
dependencies: ["emby-checkbox"],
roles: "admin",
controller: "dashboard/logpage"
});
defineRoute({
path: "/login.html",
dependencies: ["emby-button", "emby-input"],
autoFocus: false,
anonymous: true,
startup: true,
controller: "scripts/loginpage"
});
defineRoute({
path: "/metadataadvanced.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/metadataimages.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/metadatanfo.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/movies.html",
dependencies: ["emby-button"],
autoFocus: false,
controller: "scripts/moviesrecommended",
transition: "fade"
});
defineRoute({
path: "/music.html",
dependencies: [],
controller: "scripts/musicrecommended",
autoFocus: false,
transition: "fade"
});
defineRoute({
path: "/mypreferencesdisplay.html",
dependencies: ["emby-checkbox", "emby-button", "emby-select"],
autoFocus: false,
transition: "fade",
controller: "scripts/mypreferencesdisplay"
});
defineRoute({
path: "/mypreferenceshome.html",
dependencies: [],
autoFocus: false,
transition: "fade",
controller: "scripts/mypreferenceshome"
});
defineRoute({
path: "/mypreferencessubtitles.html",
dependencies: [],
autoFocus: false,
transition: "fade",
controller: "scripts/mypreferencessubtitles"
});
defineRoute({
path: "/mypreferenceslanguages.html",
dependencies: ["emby-button", "emby-checkbox", "emby-select"],
autoFocus: false,
transition: "fade",
controller: "scripts/mypreferenceslanguages"
});
defineRoute({
path: "/mypreferencesmenu.html",
dependencies: ["emby-button"],
autoFocus: false,
transition: "fade",
controller: "scripts/mypreferencescommon"
});
defineRoute({
path: "/myprofile.html",
dependencies: ["emby-button", "emby-collapse", "emby-checkbox", "emby-input"],
autoFocus: false,
transition: "fade",
controller: "scripts/myprofile"
});
defineRoute({
path: "/notificationsetting.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/notificationsettings.html",
controller: "scripts/notificationsettings",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/nowplaying.html",
dependencies: ["paper-icon-button-light", "emby-slider", "emby-button", "emby-input", "emby-itemscontainer"],
controller: "scripts/nowplayingpage",
autoFocus: false,
transition: "fade",
fullscreen: true,
supportsThemeMedia: true,
enableMediaControl: false
});
defineRoute({
path: "/playbackconfiguration.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/plugincatalog.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "scripts/plugincatalogpage"
});
defineRoute({
path: "/plugins.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/scheduledtask.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "scripts/scheduledtaskpage"
});
defineRoute({
path: "/scheduledtasks.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "scripts/scheduledtaskspage"
});
defineRoute({
path: "/search.html",
dependencies: [],
controller: "scripts/searchpage"
});
defineRoute({
path: "/selectserver.html",
dependencies: ["listViewStyle", "emby-button"],
autoFocus: false,
anonymous: true,
startup: true,
controller: "scripts/selectserver"
});
defineRoute({
path: "/serveractivity.html",
dependencies: [],
autoFocus: false,
roles: "admin",
controller: "dashboard/serveractivity"
});
defineRoute({
path: "/serversecurity.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/streamingsettings.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/support.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/tv.html",
dependencies: ["paper-icon-button-light", "emby-button"],
autoFocus: false,
controller: "scripts/tvrecommended",
transition: "fade"
});
defineRoute({
path: "/useredit.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/userlibraryaccess.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/usernew.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/userparentalcontrol.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/userpassword.html",
dependencies: ["emby-input", "emby-button", "emby-checkbox"],
autoFocus: false,
controller: "scripts/userpasswordpage"
});
defineRoute({
path: "/userprofiles.html",
dependencies: [],
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/wizardremoteaccess.html",
dependencies: ["dashboardcss"],
autoFocus: false,
anonymous: true,
controller: "dashboard/wizardremoteaccess"
});
defineRoute({
path: "/wizardfinish.html",
dependencies: ["emby-button", "dashboardcss"],
autoFocus: false,
anonymous: true,
controller: "dashboard/wizardfinishpage"
});
defineRoute({
path: "/wizardlibrary.html",
dependencies: ["dashboardcss"],
autoFocus: false,
anonymous: true
});
defineRoute({
path: "/wizardsettings.html",
dependencies: ["dashboardcss"],
autoFocus: false,
anonymous: true,
controller: "dashboard/wizardsettings"
});
defineRoute({
path: "/wizardstart.html",
dependencies: ["dashboardcss"],
autoFocus: false,
anonymous: true,
controller: "dashboard/wizardstart"
});
defineRoute({
path: "/wizarduser.html",
dependencies: ["dashboardcss", "emby-input"],
controller: "scripts/wizarduserpage",
autoFocus: false,
anonymous: true
});
defineRoute({
path: "/videoosd.html",
dependencies: [],
transition: "fade",
controller: "scripts/videoosd",
autoFocus: false,
type: "video-osd",
supportsThemeMedia: true,
fullscreen: true,
enableMediaControl: false
});
defineRoute({
path: "/configurationpage",
dependencies: [],
autoFocus: false,
enableCache: false,
enableContentQueryString: true,
roles: "admin"
});
defineRoute({
path: "/",
isDefaultRoute: true,
autoFocus: false,
dependencies: []
});
}
function getPluginPageContentPath() {
if (window.ApiClient) {
return ApiClient.getUrl("web/ConfigurationPage");
}
return null;
}
function loadPlugins(externalPlugins, appHost, browser, shell) { function loadPlugins(externalPlugins, appHost, browser, shell) {
console.log("Loading installed plugins"); console.log("Loading installed plugins");
var list = [ var list = [
@ -1145,8 +632,7 @@ var AppInfo = {};
require(['appRouter', 'scripts/themeloader', 'libraryMenu'], function (pageObjects) { require(['appRouter', 'scripts/themeloader', 'libraryMenu'], function (pageObjects) {
window.Emby.Page = pageObjects; window.Emby.Page = pageObjects;
defineCoreRoutes(appHost); require(['scripts/routes'], function () {
Emby.Page.start({ Emby.Page.start({
click: false, click: false,
hashbang: true hashbang: true
@ -1238,7 +724,7 @@ var AppInfo = {};
(function () { (function () {
var urlArgs = "v=" + (window.dashboardVersion || new Date().getDate()); var urlArgs = "v=" + (window.dashboardVersion || new Date().getDate());
var bowerPath = getBowerPath(); var bowerPath = getBowerPath();
var apiClientBowerPath = bowerPath + "/emby-apiclient"; var apiClientBowerPath = bowerPath + "/apiclient";
var componentsPath = "components"; var componentsPath = "components";
var paths = { var paths = {
velocity: bowerPath + "/velocity/velocity.min", velocity: bowerPath + "/velocity/velocity.min",
@ -1258,7 +744,7 @@ var AppInfo = {};
libraryBrowser: "scripts/librarybrowser", libraryBrowser: "scripts/librarybrowser",
events: apiClientBowerPath + "/events", events: apiClientBowerPath + "/events",
credentialprovider: apiClientBowerPath + "/credentials", credentialprovider: apiClientBowerPath + "/credentials",
connectionManagerFactory: bowerPath + "/emby-apiclient/connectionmanager", connectionManagerFactory: bowerPath + "/apiclient/connectionmanager",
visibleinviewport: componentsPath + "/visibleinviewport", visibleinviewport: componentsPath + "/visibleinviewport",
browserdeviceprofile: componentsPath + "/browserdeviceprofile", browserdeviceprofile: componentsPath + "/browserdeviceprofile",
browser: componentsPath + "/browser", browser: componentsPath + "/browser",
@ -1511,7 +997,7 @@ var AppInfo = {};
return window.ApiClient; return window.ApiClient;
}; };
}); });
define("appRouter", [componentsPath + "/router", "itemHelper"], function (appRouter, itemHelper) { define("appRouter", [componentsPath + "/appRouter", "itemHelper"], function (appRouter, itemHelper) {
function showItem(item, serverId, options) { function showItem(item, serverId, options) {
if ("string" == typeof item) { if ("string" == typeof item) {
require(["connectionManager"], function (connectionManager) { require(["connectionManager"], function (connectionManager) {