diff --git a/src/bower_components/emby-webcomponents/router.js b/src/bower_components/emby-webcomponents/router.js index c53b576496..e09e5ab5f6 100644 --- a/src/bower_components/emby-webcomponents/router.js +++ b/src/bower_components/emby-webcomponents/router.js @@ -3,9 +3,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM var appRouter = { showLocalLogin: function (serverId, manualLogin) { - var pageName = manualLogin ? 'manuallogin' : 'login'; - show('/startup/' + pageName + '.html?serverid=' + serverId); }, showSelectServer: function () { @@ -45,65 +43,42 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM }; function beginConnectionWizard() { - backdrop.clear(); - loading.show(); - connectionManager.connect({ - enableAutoLogin: appSettings.enableAutoLogin() - }).then(function (result) { handleConnectionResult(result, loading); }); } function handleConnectionResult(result, loading) { - switch (result.State) { - case 'SignedIn': - { - loading.hide(); - skinManager.loadUserSkin(); - } + loading.hide(); + skinManager.loadUserSkin(); break; case 'ServerSignIn': - { - result.ApiClient.getPublicUsers().then(function (users) { - - if (users.length) { - appRouter.showLocalLogin(result.Servers[0].Id); - } else { - appRouter.showLocalLogin(result.Servers[0].Id, true); - } - }); - } + result.ApiClient.getPublicUsers().then(function (users) { + if (users.length) { + appRouter.showLocalLogin(result.Servers[0].Id); + } else { + appRouter.showLocalLogin(result.Servers[0].Id, true); + } + }); break; case 'ServerSelection': - { - appRouter.showSelectServer(); - } - break; - case 'ConnectSignIn': - { - appRouter.showWelcome(); - } + appRouter.showSelectServer(); break; case 'ServerUpdateNeeded': - { - require(['alert'], function (alert) { - alert({ - - text: globalize.translate('sharedcomponents#ServerUpdateNeeded', 'https://github.com/jellyfin/jellyfin'), - html: globalize.translate('sharedcomponents#ServerUpdateNeeded', 'https://github.com/jellyfin/jellyfin') - - }).then(function () { - appRouter.showSelectServer(); - }); + require(['alert'], function (alert) { + alert({ + text: globalize.translate('sharedcomponents#ServerUpdateNeeded', 'https://github.com/jellyfin/jellyfin'), + html: globalize.translate('sharedcomponents#ServerUpdateNeeded', 'https://github.com/jellyfin/jellyfin') + }).then(function () { + appRouter.showSelectServer(); }); - } + }); break; default: break; @@ -111,9 +86,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } function loadContentUrl(ctx, next, route, request) { - var url; - if (route.contentPath && typeof (route.contentPath) === 'function') { url = route.contentPath(ctx.querystring); } else { @@ -121,10 +94,8 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } if (url.indexOf('://') === -1) { - // Put a slash at the beginning but make sure to avoid a double slash if (url.indexOf('/') !== 0) { - url = '/' + url; } @@ -136,26 +107,22 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } require(['text!' + url], function (html) { - loadContent(ctx, route, html, request); }); } function handleRoute(ctx, next, route) { - authenticate(ctx, route, function () { initRoute(ctx, next, route); }); } function initRoute(ctx, next, route) { - var onInitComplete = function (controllerFactory) { sendRouteToViewManager(ctx, next, route, controllerFactory); }; require(route.dependencies || [], function () { - if (route.controller) { require([route.controller], onInitComplete); } else { @@ -173,14 +140,12 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM var currentViewLoadRequest; function sendRouteToViewManager(ctx, next, route, controllerFactory) { - if (isDummyBackToHome && route.type === 'home') { isDummyBackToHome = false; return; } cancelCurrentLoadRequest(); - var isBackNav = ctx.isBack; var currentRequest = { @@ -201,9 +166,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM var onNewViewNeeded = function () { if (typeof route.path === 'string') { - loadContentUrl(ctx, next, route, currentRequest); - } else { // ? TODO next(); @@ -226,7 +189,6 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM }; }).catch(function (result) { - if (!result || !result.cancelled) { onNewViewNeeded(); } @@ -236,7 +198,6 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM var msgTimeout; var forcedLogoutMsg; function onForcedLogoutMessageTimeout() { - var msg = forcedLogoutMsg; forcedLogoutMsg = null; @@ -248,7 +209,6 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } function showForcedLogoutMessage(msg) { - forcedLogoutMsg = msg; if (msgTimeout) { clearTimeout(msgTimeout); @@ -277,14 +237,12 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } function onBeforeExit(e) { - if (browser.web0s) { page.restorePreviousState(); } } function normalizeImageOptions(options) { - var scaleFactor = browser.tv ? 0.8 : 1; var setQuality; @@ -331,9 +289,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } function getMaxBandwidth() { - if (navigator.connection) { - var max = navigator.connection.downlinkMax; if (max && max > 0 && max < Number.POSITIVE_INFINITY) { diff --git a/src/mysync.html b/src/mysync.html deleted file mode 100644 index 37e2779027..0000000000 --- a/src/mysync.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/scripts/librarymenu.js b/src/scripts/librarymenu.js index 718e5dd1ec..d89cc11038 100644 --- a/src/scripts/librarymenu.js +++ b/src/scripts/librarymenu.js @@ -113,7 +113,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", " if (user.localUser) { html += '' + globalize.translate("ButtonSettings") + ""; } - html += '' + globalize.translate("sharedcomponents#Sync") + ""; if (AppInfo.isNativeApp) { html += '' + globalize.translate("ButtonSelectServer") + ""; } diff --git a/src/scripts/mysync.js b/src/scripts/mysync.js deleted file mode 100644 index d971a870b4..0000000000 --- a/src/scripts/mysync.js +++ /dev/null @@ -1,18 +0,0 @@ -define(["apphost", "globalize", "syncJobList", "events", "localsync", "emby-button", "paper-icon-button-light"], function(appHost, globalize, syncJobList, events, localSync) { - "use strict"; - return function(view, params) { - var interval, mySyncJobList = new syncJobList({ - mode: params.mode, - enableRemoteSyncManagement: !1, - serverId: ApiClient.serverId(), - userId: "offline" === params.mode ? null : ApiClient.getCurrentUserId(), - element: view.querySelector(".syncActivity"), - mode: params.mode - }); - view.addEventListener("viewbeforehide", function() { - interval && (clearInterval(interval), interval = null) - }), view.addEventListener("viewdestroy", function() { - mySyncJobList.destroy() - }) - } -}); \ No newline at end of file diff --git a/src/scripts/site.js b/src/scripts/site.js index 335af28580..a7748cda20 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -670,12 +670,6 @@ var Dashboard = { autoFocus: !1, transition: "fade", controller: "scripts/myprofile" - }), defineRoute({ - path: "/mysync.html", - dependencies: [], - autoFocus: !1, - transition: "fade", - controller: "scripts/mysync" }), defineRoute({ path: "/camerauploadsettings.html", dependencies: [],