jellyfish-web/src/scripts/routes.js

439 lines
11 KiB
JavaScript
Raw Normal View History

define([
2019-04-03 00:12:02 +01:00
"jQuery",
"emby-button",
"emby-input",
"scripts/livetvcomponents",
"paper-icon-button-light",
"emby-itemscontainer",
"emby-collapse",
"emby-select",
"livetvcss",
"emby-checkbox",
"emby-slider",
"listViewStyle",
2019-04-03 00:12:02 +01:00
"dashboardcss",
"detailtablecss"], function () {
2019-03-18 23:48:34 +00:00
function defineRoute(newRoute) {
var path = newRoute.path;
console.log("defining route: " + path);
2019-03-18 23:48:34 +00:00
newRoute.dictionary = "core";
Emby.Page.addRoute(path, newRoute);
}
console.log("defining core routes");
2019-03-18 23:41:40 +00:00
2019-12-15 22:42:33 +09:00
defineRoute({
path: "/addplugin.html",
2019-12-15 22:42:33 +09:00
autoFocus: false,
roles: "admin",
controller: "dashboard/plugins/add"
2019-12-15 22:42:33 +09:00
});
defineRoute({
path: "/mypreferencesmenu.html",
autoFocus: false,
transition: "fade",
controller: "user/menu"
});
defineRoute({
path: "/myprofile.html",
autoFocus: false,
transition: "fade",
controller: "user/profile"
});
defineRoute({
path: "/addserver.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "auth/addserver"
});
2019-12-15 22:42:33 +09:00
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"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/dashboard.html",
autoFocus: false,
roles: "admin",
controller: "dashboard/dashboard"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/dashboardgeneral.html",
controller: "dashboard/general",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin"
});
defineRoute({
2019-06-10 15:25:07 -07:00
path: "/networking.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin",
controller: "dashboard/networking"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/devices.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin",
controller: "devices"
});
defineRoute({
path: "/device.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin",
controller: "device"
});
defineRoute({
path: "/dlnaprofile.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "dlnaprofile"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/dlnaprofiles.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "dlnaprofiles"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/dlnasettings.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "dlnasettings"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/edititemmetadata.html",
controller: "edititemmetadata",
autoFocus: false
});
defineRoute({
path: "/encodingsettings.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "encodingsettings"
2019-03-18 23:41:40 +00:00
});
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: "/home.html",
autoFocus: false,
controller: "home",
transition: "fade",
type: "home"
});
defineRoute({
path: "/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"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/library.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "medialibrarypage"
2019-03-18 23:41:40 +00:00
});
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: "livetv/livetvsuggested",
autoFocus: false,
transition: "fade"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/livetvguideprovider.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "livetvguideprovider"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/livetvsettings.html",
2019-04-03 00:12:02 +01:00
autoFocus: false,
controller: "livetvsettings"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/livetvstatus.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "livetvstatus"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/livetvtuner.html",
autoFocus: false,
roles: "admin",
controller: "livetvtuner"
});
defineRoute({
path: "/log.html",
roles: "admin",
controller: "dashboard/logs"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/login.html",
autoFocus: false,
anonymous: true,
startup: true,
2020-01-25 01:18:07 +03:00
controller: "auth/login",
type: "login"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/metadataimages.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "metadataimagespage"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/metadatanfo.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "metadatanfo"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/movies.html",
autoFocus: false,
controller: "movies/moviesrecommended",
transition: "fade"
});
defineRoute({
path: "/music.html",
controller: "music/musicrecommended",
autoFocus: false,
transition: "fade"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/notificationsetting.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "dashboard/notifications/notification"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/notificationsettings.html",
controller: "dashboard/notifications/notifications",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin"
});
defineRoute({
path: "/nowplaying.html",
controller: "playback/nowplaying",
2019-03-18 23:41:40 +00:00
autoFocus: false,
transition: "fade",
fullscreen: true,
supportsThemeMedia: true,
enableMediaControl: false
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/playbackconfiguration.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "playbackconfiguration"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/availableplugins.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin",
controller: "dashboard/plugins/available"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/installedplugins.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
roles: "admin",
controller: "dashboard/plugins/installed"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/scheduledtask.html",
autoFocus: false,
roles: "admin",
2019-12-15 22:42:33 +09:00
controller: "dashboard/scheduledtasks/scheduledtask"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/scheduledtasks.html",
autoFocus: false,
roles: "admin",
2019-12-15 22:42:33 +09:00
controller: "dashboard/scheduledtasks/scheduledtasks"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/search.html",
controller: "searchpage"
});
defineRoute({
path: "/selectserver.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "auth/selectserver"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/serveractivity.html",
autoFocus: false,
roles: "admin",
controller: "serveractivity"
});
defineRoute({
2019-06-10 15:25:07 -07:00
path: "/apikeys.html",
2019-03-18 23:41:40 +00:00
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
2019-06-10 15:25:07 -07:00
controller: "apikeys"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/streamingsettings.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "streamingsettings"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/tv.html",
autoFocus: false,
controller: "shows/tvrecommended",
transition: "fade"
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/useredit.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "useredit"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/userlibraryaccess.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "userlibraryaccess"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/usernew.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "usernew"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/userparentalcontrol.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "userparentalcontrol"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/userpassword.html",
autoFocus: false,
controller: "userpasswordpage"
});
defineRoute({
path: "/userprofiles.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
roles: "admin",
controller: "userprofilespage"
2019-03-18 23:41:40 +00:00
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/wizardremoteaccess.html",
autoFocus: false,
anonymous: true,
2020-01-12 02:23:16 +09:00
controller: "wizard/remoteaccess"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/wizardfinish.html",
autoFocus: false,
anonymous: true,
controller: "wizard/finish"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/wizardlibrary.html",
autoFocus: false,
2019-04-03 00:12:02 +01:00
anonymous: true,
controller: "medialibrarypage"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/wizardsettings.html",
autoFocus: false,
anonymous: true,
controller: "wizard/settings"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/wizardstart.html",
autoFocus: false,
anonymous: true,
controller: "wizard/start"
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/wizarduser.html",
controller: "wizard/user",
2019-03-18 23:41:40 +00:00
autoFocus: false,
anonymous: true
});
2019-03-18 23:41:40 +00:00
defineRoute({
path: "/videoosd.html",
transition: "fade",
controller: "playback/videoosd",
autoFocus: false,
type: "video-osd",
supportsThemeMedia: true,
fullscreen: true,
enableMediaControl: false
2019-03-18 23:41:40 +00:00
});
defineRoute({
path: "/configurationpage",
autoFocus: false,
enableCache: false,
enableContentQueryString: true,
roles: "admin"
});
defineRoute({
path: "/",
isDefaultRoute: true,
autoFocus: false
});
});