diff --git a/Moonlight.Client/UI/Screens/AuthenticationScreen.razor b/Moonlight.Client/UI/Screens/AuthenticationScreen.razor
index 2fdc2862..cd6298a2 100644
--- a/Moonlight.Client/UI/Screens/AuthenticationScreen.razor
+++ b/Moonlight.Client/UI/Screens/AuthenticationScreen.razor
@@ -131,8 +131,8 @@ else
$"&redirect_uri={authStartData.RedirectUri}" +
$"&response_type=code";
- Navigation.NavigateTo(uri, true);
- return;
+ //Navigation.NavigateTo(uri, true);
+ //return;
try
{
@@ -140,7 +140,7 @@ else
uri,
"OAuth2 Flow",
600,
- 450
+ 470
);
IsAuthenticating = true;
diff --git a/Moonlight.Client/UI/Views/Admin/Sys/Index.razor b/Moonlight.Client/UI/Views/Admin/Sys/Index.razor
index be694ea7..92dfaddb 100644
--- a/Moonlight.Client/UI/Views/Admin/Sys/Index.razor
+++ b/Moonlight.Client/UI/Views/Admin/Sys/Index.razor
@@ -11,17 +11,12 @@
-
-
-
-
diff --git a/Moonlight.Client/wwwroot/js/moonlight.js b/Moonlight.Client/wwwroot/js/moonlight.js
index 5b216873..fb80e39c 100644
--- a/Moonlight.Client/wwwroot/js/moonlight.js
+++ b/Moonlight.Client/wwwroot/js/moonlight.js
@@ -1,11 +1,24 @@
window.moonlight = {
window: {
- open: function (url, title, w, h) {
- let height = w;
- let width = h;
- var left = (screen.width - width) / 2;
- var top = (screen.height - height) / 2;
- var newWindow = window.open(url, title, 'resizable = yes, width=' + width + ', height=' + height + ', top=' + top + ', left=' + left);
+ open: function (url, title, h, w) {
+ const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
+ const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
+
+ const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
+ const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
+
+ const systemZoom = width / window.screen.availWidth;
+ const left = (width - w) / 2 / systemZoom + dualScreenLeft
+ const top = (height - h) / 2 / systemZoom + dualScreenTop
+ const newWindow = window.open(url, title,
+ `
+ scrollbars=yes,
+ width=${w / systemZoom},
+ height=${h / systemZoom},
+ top=${top},
+ left=${left}
+ `
+ )
if (window.focus) newWindow.focus();
},