1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update package creator

This commit is contained in:
Luke Pulverenti 2016-05-05 22:18:14 -04:00
parent e65b47e772
commit 6fb76e7481
4 changed files with 59 additions and 66 deletions

View file

@ -26,9 +26,13 @@
if (!result.dev && release.target_commitish == 'dev') { if (!result.dev && release.target_commitish == 'dev') {
result.dev = release; 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; break;
} }
} }
@ -43,62 +47,59 @@
return str.split(find).join(replace); 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) { dlg.classList.add('ui-body-b');
var dlg = dialogHelper.createDialog({ dlg.classList.add('background-theme-b');
size: 'small',
removeOnClose: true,
autoFocus: false
});
dlg.classList.add('ui-body-b'); var html = '';
dlg.classList.add('background-theme-b');
var html = ''; html += '<div class="dialogHeader">';
html += '<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>';
html += '<div class="dialogHeaderTitle">';
html += 'Emby';
html += '</div>';
html += '</div>';
html += '<div class="dialogHeader">'; html += '<h1>Welcome Emby Tester!</h1>';
html += '<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>';
html += '<div class="dialogHeaderTitle">'; html += '<p>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.</p>';
html += 'Emby';
html += '<p>Please take a moment to leave your testing feedback about this version in the <a target="_blank" href="https://emby.media/community">Emby Community.</a></p>';
html += '<a target="_blank" href="https://emby.media/community" class="clearLink" style="display:block;"><paper-button raised class="accent block">Visit Emby Community</paper-button></a>';
if (releases.beta) {
html += '<h1 style="margin-bottom:0;margin-top:1.5em;">Beta Release Notes</h1>';
html += '<div style="margin-top:0;">';
html += replaceAll((releases.beta.body || ''), '*', '<br/>');
html += '</div>'; html += '</div>';
}
if (releases.dev) {
html += '<h1 style="margin-bottom:0;margin-top:1.5em;">Dev Release Notes</h1>';
html += '<div style="margin-top:0;">';
html += replaceAll((releases.dev.body || ''), '*', '<br/>');
html += '</div>'; html += '</div>';
}
html += '<h1>Welcome Emby Tester!</h1>'; dlg.innerHTML = html;
document.body.appendChild(dlg);
html += '<p>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.</p>'; dialogHelper.open(dlg);
html += '<p>Please take a moment to leave your testing feedback about this version in the <a target="_blank" href="https://emby.media/community">Emby Community.</a></p>'; dlg.querySelector('.btnCancel', dlg).addEventListener('click', function () {
html += '<a target="_blank" href="https://emby.media/community" class="clearLink" style="display:block;"><paper-button raised class="accent block">Visit Emby Community</paper-button></a>'; dialogHelper.close(dlg);
if (releases.beta) {
html += '<h1 style="margin-bottom:0;margin-top:1.5em;">Beta Release Notes</h1>';
html += '<div style="margin-top:0;">';
html += replaceAll((releases.beta.body || ''), '*', '<br/>');
html += '</div>';
}
if (releases.dev) {
html += '<h1 style="margin-bottom:0;margin-top:1.5em;">Dev Release Notes</h1>';
html += '<div style="margin-top:0;">';
html += replaceAll((releases.dev.body || ''), '*', '<br/>');
html += '</div>';
}
dlg.innerHTML = html;
document.body.appendChild(dlg);
dialogHelper.open(dlg);
dlg.querySelector('.btnCancel', dlg).addEventListener('click', function () {
dialogHelper.close(dlg);
});
}); });
}); });
} }
@ -132,7 +133,7 @@
var key = 'servertestermessagetime'; var key = 'servertestermessagetime';
var lastShown = parseInt(appSettings.get(key) || '0'); var lastShown = parseInt(appSettings.get(key) || '0');
if ((new Date().getTime() - lastShown) < 259200000) { if ((new Date().getTime() - lastShown) < 345600000) {
return; return;
} }
@ -143,11 +144,12 @@
return; return;
} }
apiClient.getPublicSystemInfo().then(function (info) { getReleases().then(function (releases) {
apiClient.getPublicSystemInfo().then(function (info) {
if (compareVersions(info.Version, '3.0.5934') == 1) { if (releases.stable && compareVersions(info.Version, releases.stable.tag_name) == 1) {
showInternal(); showInternal(releases);
} }
});
}); });
} }

View file

@ -3,7 +3,7 @@
outline: 0 !important; outline: 0 !important;
vertical-align: middle; vertical-align: middle;
width: auto; width: auto;
margin: 0 .7em; margin: 0;
} }
.btnNotificationsInner { .btnNotificationsInner {

View file

@ -1380,19 +1380,10 @@
} }
if (imgUrl) { if (imgUrl) {
var minLazyIndex = 16;
if (options.smallIcon) { if (options.smallIcon) {
if (index < minLazyIndex) { html += '<div class="listviewImage lazy small" data-src="' + imgUrl + '" item-icon></div>';
html += '<div class="listviewImage small" style="background-image:url(\'' + imgUrl + '\');" item-icon></div>';
} else {
html += '<div class="listviewImage lazy small" data-src="' + imgUrl + '" item-icon></div>';
}
} else { } else {
if (index < minLazyIndex) { html += '<div class="listviewImage lazy" data-src="' + imgUrl + '" item-icon></div>';
html += '<div class="listviewImage" style="background-image:url(\'' + imgUrl + '\');" item-icon></div>';
} else {
html += '<div class="listviewImage lazy" data-src="' + imgUrl + '" item-icon></div>';
}
} }
} else { } else {
if (options.smallIcon) { if (options.smallIcon) {

View file

@ -34,7 +34,7 @@
html += '<paper-icon-button icon="mic" class="headerButton headerButtonRight headerVoiceButton hide"></paper-icon-button>'; html += '<paper-icon-button icon="mic" class="headerButton headerButtonRight headerVoiceButton hide"></paper-icon-button>';
html += '<button class="headerButton headerButtonRight btnNotifications clearButton" type="button" title="Notifications"><div class="btnNotificationsInner">0</div></button>'; html += '<paper-button class="headerButton headerButtonRight btnNotifications clearButton" type="button" title="Notifications"><div class="btnNotificationsInner">0</div></paper-button>';
html += '<paper-icon-button icon="person" class="headerButton headerButtonRight headerUserButton"></paper-icon-button>'; html += '<paper-icon-button icon="person" class="headerButton headerButtonRight headerUserButton"></paper-icon-button>';
@ -1119,7 +1119,7 @@
var headerCreated; var headerCreated;
var userRequiresUpdateAfterHeader; var userRequiresUpdateAfterHeader;
require(['paper-icon-button', 'emby-icons'], function () { require(['paper-icon-button', 'emby-icons', 'paper-button'], function () {
renderHeader(); renderHeader();
headerCreated = true; headerCreated = true;