diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index dda04e7675..63226bbf06 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -123,6 +123,7 @@ .headerButtonRight { border-width: 0 !important; display: inline-block; + flex-shrink: 0; } .headerButtonRight:first-child { diff --git a/dashboard-ui/css/nowplayingbar.css b/dashboard-ui/css/nowplayingbar.css index f1088cdd1f..611ab7a21b 100644 --- a/dashboard-ui/css/nowplayingbar.css +++ b/dashboard-ui/css/nowplayingbar.css @@ -84,6 +84,7 @@ .mediaButton.remoteControlButton, .mediaButton.muteButton, .mediaButton.unmuteButton { height: 26px; + width: 26px; } .nowPlayingDoubleText { @@ -127,6 +128,7 @@ .toggleRepeatButton { height: 32px; + width: 32px; } .repeatActive { diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index da0443a8ef..49e470e07c 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -651,7 +651,7 @@ progress { .supporterPromotion:not(.inlineSupporterPromotion) { position: absolute; - top: 70px; + top: 110px; right: 20px; margin: 0; } diff --git a/dashboard-ui/dashboardhosting.html b/dashboard-ui/dashboardhosting.html index f83509a3fe..e17dd2477d 100644 --- a/dashboard-ui/dashboardhosting.html +++ b/dashboard-ui/dashboardhosting.html @@ -5,48 +5,56 @@
diff --git a/dashboard-ui/scripts/dashboardhosting.js b/dashboard-ui/scripts/dashboardhosting.js index 1cfc27559c..9a30fb97d3 100644 --- a/dashboard-ui/scripts/dashboardhosting.js +++ b/dashboard-ui/scripts/dashboardhosting.js @@ -4,25 +4,48 @@ Dashboard.showLoadingMsg(); var form = this; + var localAddress = form.querySelector('#txtLocalAddress').value; + var enableUpnp = $('#chkEnableUpnp', form).checked(); - ApiClient.getServerConfiguration().then(function (config) { + confirmSelections(localAddress, enableUpnp, function () { - config.HttpServerPortNumber = $('#txtPortNumber', form).val(); - config.PublicPort = $('#txtPublicPort', form).val(); - config.PublicHttpsPort = $('#txtPublicHttpsPort', form).val(); - config.EnableHttps = $('#chkEnableHttps', form).checked(); - config.HttpsPortNumber = $('#txtHttpsPort', form).val(); - config.EnableUPnP = $('#chkEnableUpnp', form).checked(); - config.WanDdns = $('#txtDdns', form).val(); - config.CertificatePath = $('#txtCertificatePath', form).val(); + ApiClient.getServerConfiguration().then(function (config) { - ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult, Dashboard.processErrorResponse); + config.HttpServerPortNumber = $('#txtPortNumber', form).val(); + config.PublicPort = $('#txtPublicPort', form).val(); + config.PublicHttpsPort = $('#txtPublicHttpsPort', form).val(); + config.EnableHttps = $('#chkEnableHttps', form).checked(); + config.HttpsPortNumber = $('#txtHttpsPort', form).val(); + config.EnableUPnP = enableUpnp; + config.WanDdns = $('#txtDdns', form).val(); + config.CertificatePath = $('#txtCertificatePath', form).val(); + + config.LocalNetworkAddresses = localAddress ? [localAddress] : []; + + ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult, Dashboard.processErrorResponse); + }); }); // Disable default form submission return false; } + function confirmSelections(localAddress, enableUpnp, callback) { + + if (localAddress) { + + require(['alert'], function (alert) { + alert({ + title: Globalize.translate('TitleHostingSettings'), + text: Globalize.translate('SettingsWarning') + }).then(callback); + }); + + } else { + callback(); + } + } + function getTabs() { return [ { @@ -45,6 +68,8 @@ $('#txtPublicPort', page).val(config.PublicPort); $('#txtPublicHttpsPort', page).val(config.PublicHttpsPort); + page.querySelector('#txtLocalAddress').value = config.LocalNetworkAddresses[0] || ''; + var chkEnableHttps = page.querySelector('#chkEnableHttps'); chkEnableHttps.checked = config.EnableHttps; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index c30529cb7e..2b24ec8639 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2440,7 +2440,7 @@ var AppInfo = {}; defineRoute({ path: '/dashboardhosting.html', - dependencies: ['paper-checkbox', 'paper-input', 'emby-button'], + dependencies: ['paper-checkbox', 'emby-input', 'emby-button'], autoFocus: false, roles: 'admin', controller: 'scripts/dashboardhosting' diff --git a/dashboard-ui/strings/en-US.json b/dashboard-ui/strings/en-US.json index ba161b7041..6a41a82efe 100644 --- a/dashboard-ui/strings/en-US.json +++ b/dashboard-ui/strings/en-US.json @@ -2367,5 +2367,9 @@ "XmlTvKidsCategoriesHelp": "Programs with these categories will be displayed as programs for children. Separate multiple with '|'.", "LabelMovieCategories": "Movie categories:", "XmlTvMovieCategoriesHelp": "Programs with these categories will be displayed as movies. Separate multiple with '|'.", - "XmlTvPathHelp": "A path to an xml tv file. Emby will read this file and periodically check it for updates. You are responsible for creating and updating the file." + "XmlTvPathHelp": "A path to an xml tv file. Emby will read this file and periodically check it for updates. You are responsible for creating and updating the file.", + "LabelBindToLocalNetworkAddress": "Bind to local network address:", + "LabelBindToLocalNetworkAddressHelp": "Optional. Override the local address to bind the http server to. If left empty, the server will bind to all availabile addresses. Changing this value requires restarting Emby Server.", + "TitleHostingSettings": "Hosting Settings", + "SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default." }