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

move around half the dashboard controllers to a subdirectory

This commit is contained in:
dkanada 2019-12-15 20:47:47 +09:00
parent e108997376
commit 34c0d6019e
12 changed files with 64 additions and 69 deletions

View file

@ -16,28 +16,14 @@ define([
function defineRoute(newRoute) { function defineRoute(newRoute) {
var path = newRoute.path; var path = newRoute.path;
console.log("Defining route: " + path); console.log("defining route: " + path);
newRoute.dictionary = "core"; newRoute.dictionary = "core";
Emby.Page.addRoute(path, newRoute); Emby.Page.addRoute(path, newRoute);
} }
console.log("Defining core routes"); console.log("defining core routes");
defineRoute({ // authentication
path: "/addplugin.html",
autoFocus: false,
roles: "admin",
controller: "addpluginpage"
});
defineRoute({
path: "/autoorganizelog.html",
roles: "admin"
});
defineRoute({
path: "/channelsettings.html",
autoFocus: false,
roles: "admin"
});
defineRoute({ defineRoute({
path: "/addserver.html", path: "/addserver.html",
autoFocus: false, autoFocus: false,
@ -45,15 +31,51 @@ define([
startup: true, startup: true,
controller: "addserver" controller: "addserver"
}); });
defineRoute({
path: "/forgotpassword.html",
anonymous: true,
startup: true,
controller: "forgotpassword"
});
defineRoute({
path: "/forgotpasswordpin.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "forgotpasswordpin"
});
// playback
defineRoute({
path: "/nowplaying.html",
controller: "nowplayingpage",
autoFocus: false,
transition: "fade",
fullscreen: true,
supportsThemeMedia: true,
enableMediaControl: false
});
defineRoute({
path: "/videoosd.html",
transition: "fade",
controller: "videoosd",
autoFocus: false,
type: "video-osd",
supportsThemeMedia: true,
fullscreen: true,
enableMediaControl: false
});
// dashboard
defineRoute({ defineRoute({
path: "/dashboard.html", path: "/dashboard.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "dashboardpage" controller: "dashboard/dashboard"
}); });
defineRoute({ defineRoute({
path: "/dashboardgeneral.html", path: "/dashboardgeneral.html",
controller: "dashboardgeneral", controller: "dashboard/general",
autoFocus: false, autoFocus: false,
roles: "admin" roles: "admin"
}); });
@ -61,7 +83,7 @@ define([
path: "/networking.html", path: "/networking.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "networking" controller: "dashboard/networking"
}); });
defineRoute({ defineRoute({
path: "/devices.html", path: "/devices.html",
@ -104,19 +126,6 @@ define([
roles: "admin", roles: "admin",
controller: "encodingsettings" controller: "encodingsettings"
}); });
defineRoute({
path: "/forgotpassword.html",
anonymous: true,
startup: true,
controller: "forgotpassword"
});
defineRoute({
path: "/forgotpasswordpin.html",
autoFocus: false,
anonymous: true,
startup: true,
controller: "forgotpasswordpin"
});
defineRoute({ defineRoute({
path: "/home.html", path: "/home.html",
autoFocus: false, autoFocus: false,
@ -130,11 +139,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",
@ -191,7 +195,7 @@ define([
defineRoute({ defineRoute({
path: "/log.html", path: "/log.html",
roles: "admin", roles: "admin",
controller: "logpage" controller: "dashboard/logs"
}); });
defineRoute({ defineRoute({
path: "/login.html", path: "/login.html",
@ -269,52 +273,49 @@ define([
path: "/notificationsetting.html", path: "/notificationsetting.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "notificationsetting" controller: "dashboard/notifications/notification"
}); });
defineRoute({ defineRoute({
path: "/notificationsettings.html", path: "/notificationsettings.html",
controller: "notificationsettings", controller: "dashboard/notifications/notifications",
autoFocus: false, autoFocus: false,
roles: "admin" roles: "admin"
}); });
defineRoute({
path: "/nowplaying.html",
controller: "nowplayingpage",
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: "playbackconfiguration"
}); });
defineRoute({
path: "/addplugin.html",
autoFocus: false,
roles: "admin",
controller: "dashboard/plugins/add"
});
defineRoute({ defineRoute({
path: "/availableplugins.html", path: "/availableplugins.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "availableplugins" controller: "dashboard/plugins/available"
}); });
defineRoute({ defineRoute({
path: "/installedplugins.html", path: "/installedplugins.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "installedplugins" controller: "dashboard/plugins/installed"
}); });
defineRoute({ defineRoute({
path: "/scheduledtask.html", path: "/scheduledtask.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "scheduledtaskpage" controller: "scheduledtasks/scheduledtask"
}); });
defineRoute({ defineRoute({
path: "/scheduledtasks.html", path: "/scheduledtasks.html",
autoFocus: false, autoFocus: false,
roles: "admin", roles: "admin",
controller: "scheduledtaskspage" controller: "scheduledtasks/scheduledtasks"
}); });
defineRoute({ defineRoute({
path: "/search.html", path: "/search.html",
@ -345,11 +346,6 @@ define([
roles: "admin", roles: "admin",
controller: "streamingsettings" controller: "streamingsettings"
}); });
defineRoute({
path: "/support.html",
autoFocus: false,
roles: "admin"
});
defineRoute({ defineRoute({
path: "/tv.html", path: "/tv.html",
autoFocus: false, autoFocus: false,
@ -391,6 +387,8 @@ define([
roles: "admin", roles: "admin",
controller: "userprofilespage" controller: "userprofilespage"
}); });
// startup wizard
defineRoute({ defineRoute({
path: "/wizardremoteaccess.html", path: "/wizardremoteaccess.html",
autoFocus: false, autoFocus: false,
@ -427,16 +425,6 @@ define([
autoFocus: false, autoFocus: false,
anonymous: true anonymous: true
}); });
defineRoute({
path: "/videoosd.html",
transition: "fade",
controller: "videoosd",
autoFocus: false,
type: "video-osd",
supportsThemeMedia: true,
fullscreen: true,
enableMediaControl: false
});
defineRoute({ defineRoute({
path: "/configurationpage", path: "/configurationpage",
autoFocus: false, autoFocus: false,
@ -444,9 +432,16 @@ define([
enableContentQueryString: true, enableContentQueryString: true,
roles: "admin" roles: "admin"
}); });
// root
defineRoute({ defineRoute({
path: "/", path: "/",
isDefaultRoute: true, isDefaultRoute: true,
autoFocus: false autoFocus: false
}); });
defineRoute({
path: "/index.html",
autoFocus: false,
isDefaultRoute: true
});
}); });