From 4bf12b1682bf51595aa3410c6602f78febe494a8 Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 15 Dec 2019 22:42:33 +0900 Subject: [PATCH] order all routes by category --- src/scripts/routes.js | 223 +++++++++++++++++++++--------------------- 1 file changed, 112 insertions(+), 111 deletions(-) diff --git a/src/scripts/routes.js b/src/scripts/routes.js index c4e7dbb58a..87f55650fd 100644 --- a/src/scripts/routes.js +++ b/src/scripts/routes.js @@ -24,6 +24,13 @@ define([ console.log("defining core routes"); // authentication + defineRoute({ + path: "/selectserver.html", + autoFocus: false, + anonymous: true, + startup: true, + controller: "selectserver" + }); defineRoute({ path: "/addserver.html", autoFocus: false, @@ -31,6 +38,13 @@ define([ startup: true, controller: "addserver" }); + defineRoute({ + path: "/login.html", + autoFocus: false, + anonymous: true, + startup: true, + controller: "loginpage" + }); defineRoute({ path: "/forgotpassword.html", anonymous: true, @@ -66,6 +80,93 @@ define([ enableMediaControl: false }); + // media + defineRoute({ + path: "/home.html", + autoFocus: false, + controller: "home", + transition: "fade", + type: "home" + }); + defineRoute({ + path: "/list.html", + autoFocus: false, + controller: "list", + transition: "fade" + }); + defineRoute({ + path: "/search.html", + controller: "searchpage" + }); + defineRoute({ + path: "/itemdetails.html", + controller: "itemdetailpage", + autoFocus: false, + transition: "fade" + }); + defineRoute({ + path: "/livetv.html", + controller: "livetv/livetvsuggested", + autoFocus: false, + transition: "fade" + }); + defineRoute({ + path: "/movies.html", + autoFocus: false, + controller: "movies/moviesrecommended", + transition: "fade" + }); + defineRoute({ + path: "/music.html", + controller: "music/musicrecommended", + autoFocus: false, + transition: "fade" + }); + defineRoute({ + path: "/tv.html", + autoFocus: false, + controller: "shows/tvrecommended", + transition: "fade" + }); + + // user + defineRoute({ + path: "/mypreferencesmenu.html", + autoFocus: false, + transition: "fade", + controller: "user/menu" + }); + defineRoute({ + path: "/myprofile.html", + autoFocus: false, + transition: "fade", + controller: "user/profile" + }); + defineRoute({ + path: "/mypreferencesdisplay.html", + autoFocus: false, + transition: "fade", + controller: "user/display" + }); + defineRoute({ + path: "/mypreferenceshome.html", + autoFocus: false, + transition: "fade", + controller: "user/home" + }); + defineRoute({ + path: "/mypreferencesplayback.html", + autoFocus: false, + transition: "fade", + controller: "user/playback" + }); + defineRoute({ + path: "/mypreferencessubtitles.html", + autoFocus: false, + transition: "fade", + controller: "user/subtitles" + }); + // dashboard defineRoute({ path: "/dashboard.html", @@ -126,25 +227,6 @@ define([ roles: "admin", controller: "encodingsettings" }); - defineRoute({ - path: "/home.html", - autoFocus: false, - controller: "home", - transition: "fade", - type: "home" - }); - defineRoute({ - path: "/list.html", - autoFocus: false, - controller: "list", - transition: "fade" - }); - defineRoute({ - path: "/itemdetails.html", - controller: "itemdetailpage", - autoFocus: false, - transition: "fade" - }); defineRoute({ path: "/library.html", autoFocus: false, @@ -163,12 +245,6 @@ define([ roles: "admin", controller: "librarysettings" }); - defineRoute({ - path: "/livetv.html", - controller: "livetv/livetvsuggested", - autoFocus: false, - transition: "fade" - }); defineRoute({ path: "/livetvguideprovider.html", autoFocus: false, @@ -197,18 +273,6 @@ define([ roles: "admin", controller: "dashboard/logs" }); - 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, @@ -221,54 +285,6 @@ define([ roles: "admin", controller: "metadatanfo" }); - defineRoute({ - path: "/movies.html", - autoFocus: false, - controller: "movies/moviesrecommended", - transition: "fade" - }); - defineRoute({ - path: "/music.html", - controller: "music/musicrecommended", - autoFocus: false, - transition: "fade" - }); - defineRoute({ - path: "/mypreferencesmenu.html", - autoFocus: false, - transition: "fade", - controller: "user/menu" - }); - defineRoute({ - path: "/myprofile.html", - autoFocus: false, - transition: "fade", - controller: "user/profile" - }); - defineRoute({ - path: "/mypreferencesdisplay.html", - autoFocus: false, - transition: "fade", - controller: "user/display" - }); - defineRoute({ - path: "/mypreferenceshome.html", - autoFocus: false, - transition: "fade", - controller: "user/home" - }); - defineRoute({ - path: "/mypreferencesplayback.html", - autoFocus: false, - transition: "fade", - controller: "user/playback" - }); - defineRoute({ - path: "/mypreferencessubtitles.html", - autoFocus: false, - transition: "fade", - controller: "user/subtitles" - }); defineRoute({ path: "/notificationsetting.html", autoFocus: false, @@ -309,24 +325,13 @@ define([ path: "/scheduledtask.html", autoFocus: false, roles: "admin", - controller: "scheduledtasks/scheduledtask" + controller: "dashboard/scheduledtasks/scheduledtask" }); defineRoute({ path: "/scheduledtasks.html", autoFocus: false, roles: "admin", - controller: "scheduledtasks/scheduledtasks" - }); - defineRoute({ - path: "/search.html", - controller: "searchpage" - }); - defineRoute({ - path: "/selectserver.html", - autoFocus: false, - anonymous: true, - startup: true, - controller: "selectserver" + controller: "dashboard/scheduledtasks/scheduledtasks" }); defineRoute({ path: "/serveractivity.html", @@ -346,12 +351,6 @@ define([ roles: "admin", controller: "streamingsettings" }); - defineRoute({ - path: "/tv.html", - autoFocus: false, - controller: "shows/tvrecommended", - transition: "fade" - }); defineRoute({ path: "/useredit.html", autoFocus: false, @@ -388,6 +387,15 @@ define([ controller: "userprofilespage" }); + // plugins + defineRoute({ + path: "/configurationpage", + autoFocus: false, + enableCache: false, + enableContentQueryString: true, + roles: "admin" + }); + // startup wizard defineRoute({ path: "/wizardremoteaccess.html", @@ -425,13 +433,6 @@ define([ autoFocus: false, anonymous: true }); - defineRoute({ - path: "/configurationpage", - autoFocus: false, - enableCache: false, - enableContentQueryString: true, - roles: "admin" - }); // root defineRoute({