diff --git a/dashboard-ui/components/servertestermessage.js b/dashboard-ui/components/servertestermessage.js index bb3ad5fb13..b719b1a7b8 100644 --- a/dashboard-ui/components/servertestermessage.js +++ b/dashboard-ui/components/servertestermessage.js @@ -26,9 +26,13 @@ if (!result.dev && release.target_commitish == 'dev') { result.dev = release; } + } else { + if (!result.stable && release.target_commitish == 'master') { + result.stable = release; + } } - if (result.beta && result.dev) { + if (result.beta && result.dev && result.stable) { break; } } @@ -43,62 +47,59 @@ return str.split(find).join(replace); } - function showInternal() { + function showInternal(releases) { - getReleases().then(function (releases) { + require(['dialogHelper'], function (dialogHelper) { + var dlg = dialogHelper.createDialog({ + size: 'small', + removeOnClose: true, + autoFocus: false + }); - require(['dialogHelper'], function (dialogHelper) { - var dlg = dialogHelper.createDialog({ - size: 'small', - removeOnClose: true, - autoFocus: false - }); + dlg.classList.add('ui-body-b'); + dlg.classList.add('background-theme-b'); - dlg.classList.add('ui-body-b'); - dlg.classList.add('background-theme-b'); + var html = ''; - var html = ''; + html += '
'; + html += ''; + html += '
'; + html += 'Emby'; + html += '
'; + html += '
'; - html += '
'; - html += ''; - html += '
'; - html += 'Emby'; + html += '

Welcome Emby Tester!

'; + + html += '

If you\'re seeing this message, it\s because you\'re running a pre-release version of Emby Server. Thank you for being a part of the Emby pre-release testing process.

'; + + html += '

Please take a moment to leave your testing feedback about this version in the Emby Community.

'; + + html += 'Visit Emby Community'; + + if (releases.beta) { + html += '

Beta Release Notes

'; + + html += '
'; + html += replaceAll((releases.beta.body || ''), '*', '
'); html += '
'; + } + + if (releases.dev) { + html += '

Dev Release Notes

'; + + html += '
'; + html += replaceAll((releases.dev.body || ''), '*', '
'); html += '
'; + } - html += '

Welcome Emby Tester!

'; + dlg.innerHTML = html; + document.body.appendChild(dlg); - html += '

If you\'re seeing this message, it\s because you\'re running a pre-release version of Emby Server. Thank you for being a part of the Emby pre-release testing process.

'; + dialogHelper.open(dlg); - html += '

Please take a moment to leave your testing feedback about this version in the Emby Community.

'; + dlg.querySelector('.btnCancel', dlg).addEventListener('click', function () { - html += 'Visit Emby Community'; - - if (releases.beta) { - html += '

Beta Release Notes

'; - - html += '
'; - html += replaceAll((releases.beta.body || ''), '*', '
'); - html += '
'; - } - - if (releases.dev) { - html += '

Dev Release Notes

'; - - html += '
'; - html += replaceAll((releases.dev.body || ''), '*', '
'); - html += '
'; - } - - dlg.innerHTML = html; - document.body.appendChild(dlg); - - dialogHelper.open(dlg); - - dlg.querySelector('.btnCancel', dlg).addEventListener('click', function () { - - dialogHelper.close(dlg); - }); + dialogHelper.close(dlg); }); }); } @@ -132,7 +133,7 @@ var key = 'servertestermessagetime'; var lastShown = parseInt(appSettings.get(key) || '0'); - if ((new Date().getTime() - lastShown) < 259200000) { + if ((new Date().getTime() - lastShown) < 345600000) { return; } @@ -143,11 +144,12 @@ return; } - apiClient.getPublicSystemInfo().then(function (info) { - - if (compareVersions(info.Version, '3.0.5934') == 1) { - showInternal(); - } + getReleases().then(function (releases) { + apiClient.getPublicSystemInfo().then(function (info) { + if (releases.stable && compareVersions(info.Version, releases.stable.tag_name) == 1) { + showInternal(releases); + } + }); }); } diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index 69ec12eeca..72736892a6 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -3,7 +3,7 @@ outline: 0 !important; vertical-align: middle; width: auto; - margin: 0 .7em; + margin: 0; } .btnNotificationsInner { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 2522e0caf3..53d93cfad1 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1380,19 +1380,10 @@ } if (imgUrl) { - var minLazyIndex = 16; if (options.smallIcon) { - if (index < minLazyIndex) { - html += '
'; - } else { - html += '
'; - } + html += '
'; } else { - if (index < minLazyIndex) { - html += '
'; - } else { - html += '
'; - } + html += '
'; } } else { if (options.smallIcon) { diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index d31f5250c9..4550c28e27 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -34,7 +34,7 @@ html += ''; - html += ''; + html += '
0
'; html += ''; @@ -1119,7 +1119,7 @@ var headerCreated; var userRequiresUpdateAfterHeader; - require(['paper-icon-button', 'emby-icons'], function () { + require(['paper-icon-button', 'emby-icons', 'paper-button'], function () { renderHeader(); headerCreated = true;