mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
update icons
This commit is contained in:
parent
86b1a35823
commit
f1f19e04dc
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-checkbox', 'paper-input'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-checkbox', 'paper-input', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
function onSubmit() {
|
||||
Dashboard.showLoadingMsg();
|
||||
@ -202,7 +202,7 @@
|
||||
var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection');
|
||||
|
||||
html += '<div class="dialogHeader">';
|
||||
html += '<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||
html += '<div class="dialogHeaderTitle">';
|
||||
html += title;
|
||||
html += '</div>';
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-item', 'paper-input', 'paper-fab', 'paper-item-body'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-item', 'paper-input', 'paper-fab', 'paper-item-body', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var systemInfo;
|
||||
function getSystemInfo() {
|
||||
@ -137,7 +137,7 @@
|
||||
html += '<div>';
|
||||
html += '<paper-input id="txtDirectoryPickerPath" type="text" required="required" style="width:82%;display:inline-block;" label="' + Globalize.translate('LabelCurrentPath') + '"></paper-input>';
|
||||
|
||||
html += '<paper-icon-button icon="refresh" class="btnRefreshDirectories" title="' + Globalize.translate('ButtonRefresh') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnRefreshDirectories" title="' + Globalize.translate('ButtonRefresh') + '"><iron-icon icon="refresh"></iron-icon></button>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="results paperList" style="height: 180px; overflow-y: auto;"></div>';
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'paper-checkbox', 'paper-input', 'paper-button'], function (dialogHelper) {
|
||||
define(['dialogHelper', 'paper-checkbox', 'paper-input', 'paper-button', 'paper-icon-button-light'], function (dialogHelper) {
|
||||
|
||||
var extractedName;
|
||||
var extractedYear;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
</div>
|
||||
</div>
|
||||
@ -13,7 +13,7 @@
|
||||
<label for="selectSeries" class="selectLabel">${LabelSeries}</label>
|
||||
<select id="selectSeries" data-mini="true" required="required"></select>
|
||||
</div>
|
||||
<paper-icon-button id="btnNewSeries" icon="add" title="${ButtonNew}"></paper-icon-button>
|
||||
<button type="button" is="paper-icon-button-light" id="btnNewSeries" title="${ButtonNew}"><iron-icon icon="add"></iron-icon></button>
|
||||
</div>
|
||||
<div class="fldSelectSeriesFolder hide" style="margin: 1em 0 1em;">
|
||||
<div style="width:100%;display:inline-block;">
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-input', 'paper-button', 'emby-collapsible', 'paper-checkbox'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-input', 'paper-button', 'emby-collapsible', 'paper-checkbox', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
function renderLibrarySharingList(context, result) {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
${HeaderInviteUser}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-checkbox', 'paper-fab'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-checkbox', 'paper-fab', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var currentItemId;
|
||||
var currentItemType;
|
||||
@ -107,8 +107,8 @@
|
||||
if (showControls) {
|
||||
html += '<div data-role="controlgroup" data-type="horizontal" style="display:inline-block;">';
|
||||
|
||||
html += '<paper-icon-button icon="arrow-back" title="' + Globalize.translate('ButtonPreviousPage') + '" class="btnPreviousPage" ' + (startIndex ? '' : 'disabled') + '></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="arrow-forward" title="' + Globalize.translate('ButtonNextPage') + '" class="btnNextPage" ' + (startIndex + limit >= totalRecordCount ? 'disabled' : '') + '></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" title="' + Globalize.translate('ButtonPreviousPage') + '" class="btnPreviousPage" ' + (startIndex ? '' : 'disabled') + '><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||
html += '<button is="paper-icon-button-light" title="' + Globalize.translate('ButtonNextPage') + '" class="btnNextPage" ' + (startIndex + limit >= totalRecordCount ? 'disabled' : '') + '><iron-icon icon="arrow-forward"></iron-icon></button>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '<paper-icon-button icon="cloud-download" class="btnDownloadRemoteImage" raised data-imageprovider="' + image.ProviderName + '" data-imageurl="' + image.Url + '" data-imagetype="' + image.Type + '" title="' + Globalize.translate('ButtonDownload') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnDownloadRemoteImage" raised data-imageprovider="' + image.ProviderName + '" data-imageurl="' + image.Url + '" data-imagetype="' + image.Type + '" title="' + Globalize.translate('ButtonDownload') + '"><iron-icon icon="cloud-download"></iron-icon></button>';
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'css!css/metadataeditor.css', 'paper-fab'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'css!css/metadataeditor.css', 'paper-fab', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var currentItem;
|
||||
var currentDeferred;
|
||||
@ -81,24 +81,24 @@
|
||||
if (image.ImageType == "Backdrop" || image.ImageType == "Screenshot") {
|
||||
|
||||
if (i > 0) {
|
||||
html += '<paper-icon-button class="btnMoveImage" icon="chevron-left" data-imagetype="' + image.ImageType + '" data-index="' + image.ImageIndex + '" data-newindex="' + (image.ImageIndex - 1) + '" title="' + Globalize.translate('ButtonMoveLeft') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" class="btnMoveImage" data-imagetype="' + image.ImageType + '" data-index="' + image.ImageIndex + '" data-newindex="' + (image.ImageIndex - 1) + '" title="' + Globalize.translate('ButtonMoveLeft') + '"><iron-icon icon="chevron-left"></iron-icon></button>';
|
||||
} else {
|
||||
html += '<paper-icon-button icon="chevron-left" disabled title="' + Globalize.translate('ButtonMoveLeft') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" disabled title="' + Globalize.translate('ButtonMoveLeft') + '"><iron-icon icon="chevron-left"></iron-icon></button>';
|
||||
}
|
||||
|
||||
if (i < length - 1) {
|
||||
html += '<paper-icon-button class="btnMoveImage" icon="chevron-right" data-imagetype="' + image.ImageType + '" data-index="' + image.ImageIndex + '" data-newindex="' + (image.ImageIndex + 1) + '" title="' + Globalize.translate('ButtonMoveRight') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" class="btnMoveImage" data-imagetype="' + image.ImageType + '" data-index="' + image.ImageIndex + '" data-newindex="' + (image.ImageIndex + 1) + '" title="' + Globalize.translate('ButtonMoveRight') + '"><iron-icon icon="chevron-right"></iron-icon></button>';
|
||||
} else {
|
||||
html += '<paper-icon-button icon="chevron-right" disabled title="' + Globalize.translate('ButtonMoveRight') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" disabled title="' + Globalize.translate('ButtonMoveRight') + '"><iron-icon icon="chevron-right"></iron-icon></button>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (imageProviders.length) {
|
||||
html += '<paper-icon-button icon="search" data-imagetype="' + image.ImageType + '" class="btnSearchImages" title="' + Globalize.translate('ButtonBrowseOnlineImages') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" data-imagetype="' + image.ImageType + '" class="btnSearchImages" title="' + Globalize.translate('ButtonBrowseOnlineImages') + '"><iron-icon icon="search"></iron-icon></button>';
|
||||
}
|
||||
}
|
||||
|
||||
html += '<paper-icon-button icon="delete" data-imagetype="' + image.ImageType + '" data-index="' + (image.ImageIndex != null ? image.ImageIndex : "null") + '" class="btnDeleteImage" title="' + Globalize.translate('Delete') + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" data-imagetype="' + image.ImageType + '" data-index="' + (image.ImageIndex != null ? image.ImageIndex : "null") + '" class="btnDeleteImage" title="' + Globalize.translate('Delete') + '"><iron-icon icon="delete"></iron-icon></button>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'loading', 'jQuery', 'paper-fab', 'paper-input', 'paper-checkbox'], function (dialogHelper, loading, $) {
|
||||
define(['dialogHelper', 'loading', 'jQuery', 'paper-fab', 'paper-input', 'paper-checkbox', 'paper-icon-button-light'], function (dialogHelper, loading, $) {
|
||||
|
||||
var currentItem;
|
||||
var currentItemType;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-input', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-input', 'paper-fab', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var currentDeferred;
|
||||
var hasChanges;
|
||||
@ -124,7 +124,7 @@
|
||||
html += path;
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<paper-icon-button icon="remove-circle" class="btnRemovePath" data-index="' + index + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light"" class="btnRemovePath" data-index="' + index + '"><iron-icon icon="remove-circle"></iron-icon></button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
${ButtonAddMediaLibrary}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-fab', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var currentDeferred;
|
||||
var hasChanges;
|
||||
@ -65,7 +65,7 @@
|
||||
html += path;
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<paper-icon-button icon="remove-circle" class="btnRemovePath" data-index="' + index + '"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnRemovePath" data-index="' + index + '"><iron-icon icon="remove-circle"></iron-icon></button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'datetime', 'jQuery', 'paper-checkbox', 'paper-input', 'paper-item-body', 'paper-icon-item', 'paper-textarea', 'paper-fab'], function (dialogHelper, datetime, $) {
|
||||
define(['dialogHelper', 'datetime', 'jQuery', 'paper-checkbox', 'paper-input', 'paper-item-body', 'paper-icon-item', 'paper-textarea', 'paper-fab', 'paper-icon-button-light'], function (dialogHelper, datetime, $) {
|
||||
|
||||
var currentContext;
|
||||
var metadataEditorInfo;
|
||||
@ -512,7 +512,7 @@
|
||||
html += '<paper-input style="display:inline-block;width:80%;" class="txtExternalId" value="' + value + '" data-providerkey="' + idInfo.Key + '" data-formatstring="' + formatString + '" data-buttonclass="' + buttonId + '" id="' + id + '" label="' + labelText + '"></paper-input>';
|
||||
|
||||
if (formatString) {
|
||||
html += '<a class="clearLink ' + buttonId + '" href="#" target="_blank" data-role="none" style="float: none; width: 1.75em"><paper-icon-button icon="open-in-browser"></paper-icon-button></a>';
|
||||
html += '<a class="clearLink ' + buttonId + '" href="#" target="_blank" data-role="none" style="float: none; width: 1.75em"><button type="button" is="paper-icon-button-light"><iron-icon icon="open-in-browser"></iron-icon></button></a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
@ -996,7 +996,7 @@
|
||||
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<paper-icon-button icon="delete" data-index="' + i + '" class="btnRemoveFromEditorList"></paper-icon-button>';
|
||||
html += '<button type="button" is="paper-icon-button-light" data-index="' + i + '" class="btnRemoveFromEditorList"><iron-icon icon="delete"></iron-icon></button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
@ -1033,7 +1033,7 @@
|
||||
html += '</a>';
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<paper-icon-button icon="delete" data-index="' + i + '" class="btnDeletePerson"></paper-icon-button>';
|
||||
html += '<button type="button" is="paper-icon-button-light" data-index="' + i + '" class="btnDeletePerson"><iron-icon icon="delete"></iron-icon></button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
${ButtonEdit}
|
||||
</div>
|
||||
@ -8,7 +8,7 @@
|
||||
<iron-icon icon="check"></iron-icon>
|
||||
<span>${ButtonSave}</span>
|
||||
</paper-button>
|
||||
<paper-icon-button icon="more-vert" tabindex="-1" class="btnMore"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnMore" tabindex="-1"><iron-icon icon="more-vert"></iron-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
return {
|
||||
show: function (person) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
${ButtonEdit}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'paper-input'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'paper-input', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var lastPlaylistId = '';
|
||||
|
||||
@ -208,7 +208,7 @@
|
||||
var title = Globalize.translate('HeaderAddToPlaylist');
|
||||
|
||||
html += '<div class="dialogHeader">';
|
||||
html += '<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||
html += '<div class="dialogHeaderTitle">';
|
||||
html += title;
|
||||
html += '</div>';
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'jQuery', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-toggle-button'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-toggle-button', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var currentProgramId;
|
||||
var currentDialog;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dialogHeader">
|
||||
<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>
|
||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||
<div class="dialogHeaderTitle">
|
||||
${HeaderNewRecording}
|
||||
</div>
|
||||
|
@ -1,159 +0,0 @@
|
||||
define(['appSettings', 'paper-button'], function (appSettings) {
|
||||
|
||||
function getReleases() {
|
||||
|
||||
return fetch('https://api.github.com/repos/MediaBrowser/Emby/releases', {
|
||||
method: 'GET'
|
||||
|
||||
}).then(function (response) {
|
||||
|
||||
return response.json();
|
||||
|
||||
}, function () {
|
||||
|
||||
return [];
|
||||
|
||||
}).then(function (releases) {
|
||||
|
||||
var result = {};
|
||||
for (var i = 0, length = releases.length; i < length; i++) {
|
||||
|
||||
var release = releases[i];
|
||||
if (release.prerelease) {
|
||||
if (!result.beta && release.target_commitish == 'beta') {
|
||||
result.beta = release;
|
||||
}
|
||||
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 && result.stable) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function replaceAll(str, find, replace) {
|
||||
|
||||
return str.split(find).join(replace);
|
||||
}
|
||||
|
||||
function showInternal(releases) {
|
||||
|
||||
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');
|
||||
|
||||
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 += '<h1>Welcome Emby Tester!</h1>';
|
||||
|
||||
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 += '<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>';
|
||||
}
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function compareVersions(a, b) {
|
||||
|
||||
// -1 a is smaller
|
||||
// 1 a is larger
|
||||
// 0 equal
|
||||
a = a.split('.');
|
||||
b = b.split('.');
|
||||
|
||||
for (var i = 0, length = Math.max(a.length, b.length) ; i < length; i++) {
|
||||
var aVal = parseInt(a[i] || '0');
|
||||
var bVal = parseInt(b[i] || '0');
|
||||
|
||||
if (aVal < bVal) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (aVal > bVal) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function show(apiClient) {
|
||||
|
||||
var key = 'servertestermessagetime';
|
||||
var lastShown = parseInt(appSettings.get(key) || '0');
|
||||
|
||||
if ((new Date().getTime() - lastShown) < 345600000) {
|
||||
return;
|
||||
}
|
||||
|
||||
appSettings.set(key, new Date().getTime());
|
||||
|
||||
if (!lastShown) {
|
||||
// don't show the first time
|
||||
return;
|
||||
}
|
||||
|
||||
getReleases().then(function (releases) {
|
||||
apiClient.getPublicSystemInfo().then(function (info) {
|
||||
if (releases.stable && compareVersions(info.Version, releases.stable.tag_name) == 1) {
|
||||
showInternal(releases);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
show: show
|
||||
};
|
||||
});
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'appStorage', 'jQuery', 'paper-fab', 'paper-item-body', 'paper-icon-item'], function (dialogHelper, appStorage, $) {
|
||||
define(['dialogHelper', 'appStorage', 'jQuery', 'paper-fab', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'], function (dialogHelper, appStorage, $) {
|
||||
|
||||
var currentItem;
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
itemHtml += '</paper-item-body>';
|
||||
|
||||
if (s.Path) {
|
||||
itemHtml += '<paper-icon-button icon="delete" data-index="' + s.Index + '" title="' + Globalize.translate('Delete') + '" class="btnDelete"></paper-icon-button>';
|
||||
itemHtml += '<button is="paper-icon-button-light" data-index="' + s.Index + '" title="' + Globalize.translate('Delete') + '" class="btnDelete"><iron-icon icon="delete"></iron-icon></button>';
|
||||
}
|
||||
|
||||
itemHtml += '</paper-icon-item>';
|
||||
@ -363,7 +363,7 @@
|
||||
|
||||
var html = '';
|
||||
html += '<div class="dialogHeader">';
|
||||
html += '<paper-icon-button icon="arrow-back" class="btnCancel" tabindex="-1"></paper-icon-button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||
html += '<div class="dialogHeaderTitle">';
|
||||
html += item.Name;
|
||||
html += '</div>';
|
||||
|
@ -12,9 +12,7 @@
|
||||
<label for="selectLanguage" class="selectLabel">${LabelLanguage}</label>
|
||||
<select autofocus id="selectLanguage" required="required" data-mini="true"></select>
|
||||
</div>
|
||||
<button type="submit" class="clearButton btnSearchSubtitles" style="width:auto;">
|
||||
<paper-icon-button icon="search" title="${ButtonSearch}"></paper-icon-button>
|
||||
</button>
|
||||
<button is="paper-icon-button-light" title="${ButtonSearch}" class="btnSearchSubtitles"><iron-icon icon="search"></iron-icon></button>
|
||||
</form>
|
||||
<br />
|
||||
<div class="subtitleResults"></div>
|
||||
|
@ -1115,7 +1115,6 @@
|
||||
|
||||
Events.on(ConnectionManager, 'localusersignedin', function (e, user) {
|
||||
setDrawerClass();
|
||||
var apiClient = ConnectionManager.getApiClient(user.ServerId);
|
||||
ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(function (user) {
|
||||
refreshLibraryDrawer(user);
|
||||
|
||||
@ -1125,12 +1124,6 @@
|
||||
userRequiresUpdateAfterHeader = user;
|
||||
}
|
||||
});
|
||||
|
||||
if (!AppInfo.isNativeApp) {
|
||||
require(['components/servertestermessage'], function (message) {
|
||||
message.show(apiClient);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Events.on(ConnectionManager, 'localusersignedout', updateUserInHeader);
|
||||
|
Loading…
Reference in New Issue
Block a user