mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update packages
This commit is contained in:
parent
65da95c2ab
commit
253cbaa5b2
5 changed files with 94 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['libraryBrowser', 'jQuery', 'scrollStyles'], function (LibraryBrowser, $) {
|
||||
define(['libraryBrowser', 'jQuery', 'appSettings', 'scrollStyles'], function (LibraryBrowser, $, appSettings) {
|
||||
|
||||
function getUserViews(userId) {
|
||||
|
||||
|
@ -163,9 +163,54 @@
|
|||
html += getLibraryButtonsHtml(items);
|
||||
html += '</div>';
|
||||
|
||||
elem.innerHTML = html;
|
||||
return getAppInfo().then(function (infoHtml) {
|
||||
|
||||
handleLibraryLinkNavigations(elem);
|
||||
elem.innerHTML = html + infoHtml;
|
||||
|
||||
handleLibraryLinkNavigations(elem);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getAppInfo() {
|
||||
|
||||
if (AppInfo.nativeApp) {
|
||||
return Promise.resolve('');
|
||||
}
|
||||
|
||||
var cacheKey = 'lastappinfopresent5';
|
||||
if ((new Date().getTime() - parseInt(appSettings.get(cacheKey) || '0')) < 172800000) {
|
||||
return Promise.resolve('');
|
||||
}
|
||||
|
||||
function getCard(img) {
|
||||
|
||||
return '<div class="card backdropCard"><div class="cardBox"><div class="cardScalable"><div class="cardPadder"></div><a class="cardContent" href="https://emby.media/download" target="_blank"><div class="cardImage lazy" data-src="' + img + '"></div></a></div></div></div>';
|
||||
}
|
||||
|
||||
return Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) {
|
||||
|
||||
appSettings.set(cacheKey, new Date().getTime());
|
||||
|
||||
if (pluginSecurityInfo.IsMBSupporter) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var html = '';
|
||||
html += '<div>';
|
||||
html += '<h1>Try Emby Theater<paper-icon-button icon="close" onclick="jQuery(this.parentNode.parentNode).remove();" style="margin-left:1em;"></paper-icon-button></h1>';
|
||||
html += '<p>A beautiful app for your TV and large screen tablet. <a href="https://emby.media/download" target="_blank">Emby Theater</a> runs on Windows, Xbox One, Google Chrome, FireFox, Microsoft Edge and Opera.</p>';
|
||||
html += '<div class="itemsContainer">';
|
||||
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png');
|
||||
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png');
|
||||
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png');
|
||||
html += '</div>';
|
||||
html += '<br/>';
|
||||
html += '</div>';
|
||||
|
||||
appSettings.set(cacheKey, new Date().getTime());
|
||||
|
||||
return html;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -395,12 +440,15 @@
|
|||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
return getAppInfo().then(function (infoHtml) {
|
||||
|
||||
LibraryBrowser.createCardMenus(elem, { showDetailsMenu: false });
|
||||
elem.innerHTML = html + infoHtml;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
handleLibraryLinkNavigations(elem);
|
||||
LibraryBrowser.createCardMenus(elem, { showDetailsMenu: false });
|
||||
|
||||
handleLibraryLinkNavigations(elem);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue