diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6e085c5853..8ce9ec3c3c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,6 +14,7 @@ - [LeoVerto](https://github.com/LeoVerto) - [cvium](https://github.com/cvium) - [grafixeyehero](https://github.com/grafixeyehero) + - [Drago96](https://github.com/drago-96) # Emby Contributors diff --git a/src/bower_components/emby-webcomponents/router.js b/src/bower_components/emby-webcomponents/router.js index b5d272c071..f342d2789e 100644 --- a/src/bower_components/emby-webcomponents/router.js +++ b/src/bower_components/emby-webcomponents/router.js @@ -665,6 +665,13 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM } return page.canGoBack(); } + + function showDirect(path) { + return new Promise(function(resolve, reject) { + resolveOnNextShow = resolve, page.show(baseUrl()+path) + }) + } + function show(path, options) { if (path.indexOf('/') !== 0 && path.indexOf('://') === -1) { @@ -869,6 +876,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM appRouter.param = param; appRouter.back = back; appRouter.show = show; + appRouter.showDirect = showDirect; appRouter.start = start; appRouter.baseUrl = baseUrl; appRouter.canGoBack = canGoBack; diff --git a/src/dashboard/wizardfinishpage.js b/src/dashboard/wizardfinishpage.js index 9d1ab5dada..3286f52f49 100644 --- a/src/dashboard/wizardfinishpage.js +++ b/src/dashboard/wizardfinishpage.js @@ -6,7 +6,7 @@ define(["loading"], function(loading) { url: ApiClient.getUrl("Startup/Complete"), type: "POST" }).then(function() { - Dashboard.navigate("dashboard.html"), loading.hide() + Dashboard.navigate_direct("/dashboard.html"), loading.hide() }) } return function(view, params) { @@ -16,4 +16,4 @@ define(["loading"], function(loading) { document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader") }) } -}); \ No newline at end of file +}); diff --git a/src/scripts/site.js b/src/scripts/site.js index 8c1e6a01a4..fdcb860817 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -89,6 +89,13 @@ var Dashboard = { }) }) }, + navigate_direct: function(path) { + return new Promise(function(resolve, reject) { + require(["appRouter"], function(appRouter) { + return appRouter.showDirect(path).then(resolve, reject) + }) + }) + }, processPluginConfigurationUpdateResult: function() { require(["loading", "toast"], function(loading, toast) { loading.hide(), toast(Globalize.translate("MessageSettingsSaved"))