mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update user data queries
This commit is contained in:
parent
f7e2648d79
commit
144e773ee4
37 changed files with 196 additions and 238 deletions
|
@ -283,7 +283,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
function showMoreMenu(context, button) {
|
||||
function showMoreMenu(context, button, user) {
|
||||
|
||||
var items = [];
|
||||
|
||||
|
@ -293,11 +293,13 @@
|
|||
ironIcon: 'photo'
|
||||
});
|
||||
|
||||
items.push({
|
||||
name: Globalize.translate('ButtonIdentify'),
|
||||
id: 'identify',
|
||||
ironIcon: 'info'
|
||||
});
|
||||
if (LibraryBrowser.canIdentify(user, currentItem.Type)) {
|
||||
items.push({
|
||||
name: Globalize.translate('ButtonIdentify'),
|
||||
id: 'identify',
|
||||
ironIcon: 'info'
|
||||
});
|
||||
}
|
||||
|
||||
items.push({
|
||||
name: Globalize.translate('ButtonRefresh'),
|
||||
|
@ -378,7 +380,10 @@
|
|||
|
||||
context.querySelector('.btnMore').addEventListener('click', function (e) {
|
||||
|
||||
showMoreMenu(context, e.target);
|
||||
Dashboard.getCurrentUser().then(function (user) {
|
||||
showMoreMenu(context, e.target, user);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
context.querySelector('.btnHeaderSave').addEventListener('click', function (e) {
|
||||
|
@ -676,16 +681,6 @@
|
|||
$('#fldYear', context).show();
|
||||
}
|
||||
|
||||
Dashboard.getCurrentUser().then(function (user) {
|
||||
|
||||
if (LibraryBrowser.getMoreCommands(item, user).indexOf('identify') != -1) {
|
||||
|
||||
$('#btnIdentify', context).show();
|
||||
} else {
|
||||
$('#btnIdentify', context).hide();
|
||||
}
|
||||
});
|
||||
|
||||
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "BoxSet") {
|
||||
$('#keywordsCollapsible', context).show();
|
||||
} else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['dialogHelper', 'jQuery', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-toggle-button', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
define(['dialogHelper', 'jQuery', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-icon-button-light'], function (dialogHelper, $) {
|
||||
|
||||
var currentProgramId;
|
||||
var currentDialog;
|
||||
|
@ -202,20 +202,6 @@
|
|||
closeDialog(false);
|
||||
});
|
||||
|
||||
context.querySelector('.chkAdvanced').addEventListener('change', function (e) {
|
||||
|
||||
var elems = context.querySelectorAll('.advancedToggle');
|
||||
var isChecked = e.target.checked;
|
||||
|
||||
for (var i = 0, length = elems.length; i < length; i++) {
|
||||
if (isChecked) {
|
||||
slideDownToShow(elems[i]);
|
||||
} else {
|
||||
slideUpToHide(elems[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('form', context).off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
var supporterButtons = context.querySelectorAll('.btnSupporter');
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
|
||||
<form class="liveTvNewRecordingForm" style="margin: 0 auto;">
|
||||
|
||||
<div style="text-align: right; display: flex; justify-content: flex-end;">
|
||||
<paper-toggle-button class="chkAdvanced">${ButtonAdvanced}</paper-toggle-button>
|
||||
</div>
|
||||
|
||||
<p><span class="itemName inlineItemName"></span></p>
|
||||
<p class="itemEpisodeName"></p>
|
||||
<p class="itemMiscInfo"></p>
|
||||
|
@ -52,14 +48,12 @@
|
|||
<div class="fieldDescription paperCheckboxFieldDescription btnSupporterForConverting hide"><a href="https://emby.media/premiere" target="_blank" class="accent">${FeatureRequiresEmbyPremiere}</a></div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="advancedToggle hide">
|
||||
<div>
|
||||
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<paper-input type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPostPaddingMinutes}"></paper-input>
|
||||
</div>
|
||||
<div>
|
||||
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<paper-input type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPostPaddingMinutes}"></paper-input>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['browser', 'datetime', 'jQuery', 'paper-fab', 'paper-slider'], function (browser, datetime, $) {
|
||||
define(['browser', 'datetime', 'jQuery', 'libraryBrowser', 'paper-fab', 'paper-slider'], function (browser, datetime, $, libraryBrowser) {
|
||||
|
||||
function showSlideshowMenu(context) {
|
||||
require(['scripts/slideshow'], function () {
|
||||
|
@ -202,7 +202,7 @@
|
|||
}
|
||||
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), item.Id).then(function (fullItem) {
|
||||
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = LibraryBrowser.getUserDataIconsHtml(fullItem, false);
|
||||
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = libraryBrowser.getUserDataIconsHtml(fullItem, false);
|
||||
});
|
||||
} else {
|
||||
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = '';
|
||||
|
@ -417,7 +417,7 @@
|
|||
|
||||
if (playlistOpen) {
|
||||
|
||||
html += LibraryBrowser.getListViewHtml({
|
||||
html += libraryBrowser.getListViewHtml({
|
||||
items: MediaController.playlist(),
|
||||
smallIcon: true
|
||||
});
|
||||
|
@ -459,7 +459,7 @@
|
|||
}
|
||||
|
||||
function isPlaylistOpen(context) {
|
||||
return LibraryBrowser.selectedTab(context.querySelector('.mdl-tabs')) == 2;
|
||||
return libraryBrowser.selectedTab(context.querySelector('.mdl-tabs')) == 2;
|
||||
}
|
||||
|
||||
function onStateChanged(e, state) {
|
||||
|
@ -609,7 +609,7 @@
|
|||
|
||||
var mediaItem = parentWithClass(e.target, 'mediaItem');
|
||||
if (mediaItem != null) {
|
||||
var info = LibraryBrowser.getListItemInfo(mediaItem);
|
||||
var info = libraryBrowser.getListItemInfo(mediaItem);
|
||||
|
||||
MediaController.currentPlaylistIndex(info.index);
|
||||
|
||||
|
@ -793,7 +793,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
function init(context) {
|
||||
function init(ownerView, context) {
|
||||
|
||||
require(['css!css/nowplaying.css']);
|
||||
bindEvents(context);
|
||||
|
@ -821,6 +821,8 @@
|
|||
context.querySelector('.libraryViewNav').classList.remove('bottom');
|
||||
}
|
||||
|
||||
libraryBrowser.configurePaperLibraryTabs(ownerView, mdlTabs);
|
||||
|
||||
mdlTabs.addEventListener('tabchange', function (e) {
|
||||
if (e.detail.selectedTabIndex == 2 && playlistNeedsRefresh) {
|
||||
loadPlaylist(context);
|
||||
|
@ -851,7 +853,7 @@
|
|||
updateCastIcon(context);
|
||||
}
|
||||
|
||||
self.init = function (context) {
|
||||
self.init = function (ownerView, context) {
|
||||
|
||||
dlg = context;
|
||||
|
||||
|
@ -861,7 +863,7 @@
|
|||
}
|
||||
|
||||
componentHandler.upgradeAllRegistered(dlg);
|
||||
init(dlg);
|
||||
init(ownerView, dlg);
|
||||
};
|
||||
|
||||
self.onShow = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue