diff --git a/package.json b/package.json index 28e45663ec..d1831b13ee 100644 --- a/package.json +++ b/package.json @@ -157,11 +157,11 @@ "src/components/syncPlay/playbackPermissionManager.js", "src/components/syncPlay/syncPlayManager.js", "src/components/syncPlay/timeSyncManager.js", - "src/controllers/auth/addserver.js", - "src/controllers/auth/forgotpassword.js", - "src/controllers/auth/forgotpasswordpin.js", - "src/controllers/auth/login.js", - "src/controllers/auth/selectserver.js", + "src/controllers/session/addServer/index.js", + "src/controllers/session/forgotPassword/index.js", + "src/controllers/session/redeemPassword/index.js", + "src/controllers/session/login/index.js", + "src/controllers/sessopm/selectServer/index.js", "src/controllers/dashboard/apikeys.js", "src/controllers/dashboard/dashboard.js", "src/controllers/dashboard/devices/device.js", @@ -178,7 +178,7 @@ "src/controllers/dashboard/metadatanfo.js", "src/controllers/dashboard/networking.js", "src/controllers/dashboard/playback.js", - "src/controllers/dashboard/plugins/repositories.js", + "src/controllers/dashboard/plugins/repositories/index.js", "src/controllers/dashboard/scheduledtasks/scheduledtask.js", "src/controllers/dashboard/scheduledtasks/scheduledtasks.js", "src/controllers/dashboard/serveractivity.js", diff --git a/src/notificationsetting.html b/src/controllers/dashboard/notifications/notification/index.html similarity index 100% rename from src/notificationsetting.html rename to src/controllers/dashboard/notifications/notification/index.html diff --git a/src/controllers/dashboard/notifications/notification.js b/src/controllers/dashboard/notifications/notification/index.js similarity index 100% rename from src/controllers/dashboard/notifications/notification.js rename to src/controllers/dashboard/notifications/notification/index.js diff --git a/src/notificationsettings.html b/src/controllers/dashboard/notifications/notifications/index.html similarity index 100% rename from src/notificationsettings.html rename to src/controllers/dashboard/notifications/notifications/index.html diff --git a/src/controllers/dashboard/notifications/notifications.js b/src/controllers/dashboard/notifications/notifications/index.js similarity index 100% rename from src/controllers/dashboard/notifications/notifications.js rename to src/controllers/dashboard/notifications/notifications/index.js diff --git a/src/addplugin.html b/src/controllers/dashboard/plugins/add/index.html similarity index 100% rename from src/addplugin.html rename to src/controllers/dashboard/plugins/add/index.html diff --git a/src/controllers/dashboard/plugins/add.js b/src/controllers/dashboard/plugins/add/index.js similarity index 100% rename from src/controllers/dashboard/plugins/add.js rename to src/controllers/dashboard/plugins/add/index.js diff --git a/src/availableplugins.html b/src/controllers/dashboard/plugins/available/index.html similarity index 100% rename from src/availableplugins.html rename to src/controllers/dashboard/plugins/available/index.html diff --git a/src/controllers/dashboard/plugins/available.js b/src/controllers/dashboard/plugins/available/index.js similarity index 100% rename from src/controllers/dashboard/plugins/available.js rename to src/controllers/dashboard/plugins/available/index.js diff --git a/src/installedplugins.html b/src/controllers/dashboard/plugins/installed/index.html similarity index 100% rename from src/installedplugins.html rename to src/controllers/dashboard/plugins/installed/index.html diff --git a/src/controllers/dashboard/plugins/installed.js b/src/controllers/dashboard/plugins/installed/index.js similarity index 100% rename from src/controllers/dashboard/plugins/installed.js rename to src/controllers/dashboard/plugins/installed/index.js diff --git a/src/repositories.html b/src/controllers/dashboard/plugins/repositories/index.html similarity index 100% rename from src/repositories.html rename to src/controllers/dashboard/plugins/repositories/index.html diff --git a/src/controllers/dashboard/plugins/repositories.js b/src/controllers/dashboard/plugins/repositories/index.js similarity index 100% rename from src/controllers/dashboard/plugins/repositories.js rename to src/controllers/dashboard/plugins/repositories/index.js diff --git a/src/addserver.html b/src/controllers/session/addServer/index.html similarity index 100% rename from src/addserver.html rename to src/controllers/session/addServer/index.html diff --git a/src/controllers/auth/addserver.js b/src/controllers/session/addServer/index.js similarity index 100% rename from src/controllers/auth/addserver.js rename to src/controllers/session/addServer/index.js diff --git a/src/forgotpassword.html b/src/controllers/session/forgotPassword/index.html similarity index 100% rename from src/forgotpassword.html rename to src/controllers/session/forgotPassword/index.html diff --git a/src/controllers/auth/forgotpassword.js b/src/controllers/session/forgotPassword/index.js similarity index 100% rename from src/controllers/auth/forgotpassword.js rename to src/controllers/session/forgotPassword/index.js diff --git a/src/login.html b/src/controllers/session/login/index.html similarity index 100% rename from src/login.html rename to src/controllers/session/login/index.html diff --git a/src/controllers/auth/login.js b/src/controllers/session/login/index.js similarity index 100% rename from src/controllers/auth/login.js rename to src/controllers/session/login/index.js diff --git a/src/forgotpasswordpin.html b/src/controllers/session/resetPassword/index.html similarity index 100% rename from src/forgotpasswordpin.html rename to src/controllers/session/resetPassword/index.html diff --git a/src/controllers/auth/forgotpasswordpin.js b/src/controllers/session/resetPassword/index.js similarity index 100% rename from src/controllers/auth/forgotpasswordpin.js rename to src/controllers/session/resetPassword/index.js diff --git a/src/selectserver.html b/src/controllers/session/selectServer/index.html similarity index 100% rename from src/selectserver.html rename to src/controllers/session/selectServer/index.html diff --git a/src/controllers/auth/selectserver.js b/src/controllers/session/selectServer/index.js similarity index 100% rename from src/controllers/auth/selectserver.js rename to src/controllers/session/selectServer/index.js diff --git a/src/scripts/routes.js b/src/scripts/routes.js index d446312e5f..d79819456a 100644 --- a/src/scripts/routes.js +++ b/src/scripts/routes.js @@ -24,40 +24,45 @@ define([ console.debug('defining core routes'); defineRoute({ - path: '/addserver.html', + alias: '/addserver.html', + path: '/controllers/session/addServer/index.html', autoFocus: false, anonymous: true, startup: true, - controller: 'auth/addserver' + controller: 'session/addServer/index' }); defineRoute({ - path: '/selectserver.html', + alias: '/selectserver.html', + path: '/controllers/session/selectServer/index.html', autoFocus: false, anonymous: true, startup: true, - controller: 'auth/selectserver', + controller: 'session/selectServer/index', type: 'selectserver' }); defineRoute({ - path: '/login.html', + alias: '/login.html', + path: '/controllers/session/login/index.html', autoFocus: false, anonymous: true, startup: true, - controller: 'auth/login', + controller: 'session/login/index', type: 'login' }); defineRoute({ - path: '/forgotpassword.html', + alias: '/forgotpassword.html', + path: '/controllers/session/forgotPassword/index.html', anonymous: true, startup: true, - controller: 'auth/forgotpassword' + controller: 'session/forgotPassword/index' }); defineRoute({ - path: '/forgotpasswordpin.html', + alias: '/forgotpasswordpin.html', + path: '/controllers/session/redeemPassword/index.html', autoFocus: false, anonymous: true, startup: true, - controller: 'auth/forgotpasswordpin' + controller: 'session/redeemPassword/index' }); defineRoute({ @@ -146,10 +151,11 @@ define([ controller: 'dashboard/dlna/profiles' }); defineRoute({ - path: '/addplugin.html', + alias: '/addplugin.html', + path: '/controllers/dashboard/plugins/add/index.html', autoFocus: false, roles: 'admin', - controller: 'dashboard/plugins/add' + controller: 'dashboard/plugins/add/index' }); defineRoute({ path: '/library.html', @@ -198,14 +204,16 @@ define([ controller: 'dashboard/metadatanfo' }); defineRoute({ - path: '/notificationsetting.html', + alias: '/notificationsetting.html', + path: '/controllers/dashboard/notifications/notification/index.html', autoFocus: false, roles: 'admin', - controller: 'dashboard/notifications/notification' + controller: 'dashboard/notifications/notification/index' }); defineRoute({ - path: '/notificationsettings.html', - controller: 'dashboard/notifications/notifications', + alias: '/notificationsettings.html', + path: '/controllers/dashboard/notifications/notifications/index.html', + controller: 'dashboard/notifications/notifications/index', autoFocus: false, roles: 'admin' }); @@ -216,16 +224,18 @@ define([ controller: 'dashboard/playback' }); defineRoute({ - path: '/availableplugins.html', + alias: '/availableplugins.html', + path: '/controllers/dashboard/plugins/available/index.html', autoFocus: false, roles: 'admin', - controller: 'dashboard/plugins/available' + controller: 'dashboard/plugins/available/index' }); defineRoute({ - path: '/repositories.html', + alias: '/repositories.html', + path: '/controllers/dashboard/plugins/repositories/index.html', autoFocus: false, roles: 'admin', - controller: 'dashboard/plugins/repositories' + controller: 'dashboard/plugins/repositories/index' }); defineRoute({ @@ -294,10 +304,11 @@ define([ transition: 'fade' }); defineRoute({ - path: '/installedplugins.html', + alias: '/installedplugins.html', + path: '/controllers/dashboard/plugins/installed/index.html', autoFocus: false, roles: 'admin', - controller: 'dashboard/plugins/installed' + controller: 'dashboard/plugins/installed/index' }); defineRoute({ path: '/scheduledtask.html',