diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 8363494b02..d4c9e4bbb8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.84", - "_release": "1.4.84", + "version": "1.4.85", + "_release": "1.4.85", "_resolution": { "type": "version", - "tag": "1.4.84", - "commit": "15bfe5a5a9ca97a96f3f30c76dd463266f66e290" + "tag": "1.4.85", + "commit": "02ae5393a31e8266eb52f0e1a6471b9da8f964c7" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js index dbf6037645..500231a1fe 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js @@ -1,12 +1,74 @@ -define(['itemShortcuts', 'registerElement'], function (itemShortcuts) { +define(['itemShortcuts', 'connectionManager', 'registerElement'], function (itemShortcuts, connectionManager) { var ItemsContainerProtoType = Object.create(HTMLDivElement.prototype); + function parentWithClass(elem, className) { + + while (!elem.classList || !elem.classList.contains(className)) { + elem = elem.parentNode; + + if (!elem) { + return null; + } + } + + return elem; + } + + function parentWithAttribute(elem, name) { + + while (!elem.getAttribute(name)) { + elem = elem.parentNode; + + if (!elem) { + return null; + } + } + + return elem; + } + + function getItem(button) { + + button = parentWithAttribute(button, 'data-id'); + var serverId = button.getAttribute('data-serverid'); + var id = button.getAttribute('data-id'); + + var apiClient = connectionManager.getApiClient(serverId); + + return apiClient.getItem(apiClient.getCurrentUserId(), id); + } + + function showContextMenu(button) { + + getItem(button).then(function (item) { + + require(['itemContextMenu'], function (itemContextMenu) { + itemContextMenu.show({ + positionTo: button, + item: item + }); + }); + }); + } + + function onClick(e) { + + var menuButton = parentWithClass(e.target, 'menuButton'); + if (menuButton) { + showContextMenu(menuButton); + e.stopPropagation(); + return false; + } + } + ItemsContainerProtoType.attachedCallback = function () { + this.addEventListener('click', onClick); itemShortcuts.on(this); }; ItemsContainerProtoType.detachedCallback = function () { + this.removeEventListener('click', onClick); itemShortcuts.off(this); }; diff --git a/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css b/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css index fd920d50fe..dc35703038 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css +++ b/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css @@ -14,3 +14,52 @@ .timerIndicator { color: #CB272A; } + +.indicator + .indicator { + margin-left: .25em; +} + +.countIndicator { + background: rgba(82,181,75,1); + border-radius: 500px; + display: -ms-flex; + display: -webkit-flex; + display: flex; + align-items: center; + justify-content: center; + font-weight: 500; + color: #fff; +} + +.playedIndicator { + background: rgba(82,181,75,1); + border-radius: 500px; + display: -ms-flex; + display: -webkit-flex; + display: flex; + align-items: center; + justify-content: center; + color: #fff; +} + +.countIndicator, .playedIndicator { + width: 28px; + height: 28px; +} + + .playedIndicator i { + width: 22px; + height: 22px; + font-size: 22px; + } + +.layout-tv .countIndicator, .layout-tv .playedIndicator { + width: 3.8vh; + height: 3.8vh; +} + + .layout-tv .playedIndicator i { + width: 2.6vh; + height: 2.6vh; + font-size: 2.6vh; + } diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index 67b09637a1..40f84a5375 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -200,7 +200,10 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper'], function (ap require(['actionsheet'], function (actionSheet) { actionSheet.show({ - items: commands + + items: commands, + positionTo: options.positionTo + }).then(function (id) { executeCommand(options.item, id).then(resolve); }, reject); diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css index 739a4f6058..ffe066ae30 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css @@ -169,6 +169,14 @@ div.listItem { margin-top: 0; } +.listItem .indicators { + right: .5vh; + top: .5vh; + position: absolute; + display: flex; + align-items: center; +} + @supports (display: flex) { .listItem, .listItemBody, .listItemMediaInfo { diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js index bcbe88bf9c..f9498a2796 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js @@ -201,8 +201,6 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan if (options.showParentTitle) { if (item.Type == 'Episode') { textlines.push(item.SeriesName || ' '); - } else if (item.Type == 'MusicAlbum') { - textlines.push(item.AlbumArtist || ' '); } } @@ -213,13 +211,28 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan } textlines.push(displayName); - if (item.Type == 'Audio') { + if (item.ArtistItems && item.Type != 'MusicAlbum') { textlines.push(item.ArtistItems.map(function (a) { return a.Name; }).join(', ') || ' '); } + if (item.AlbumArtist && item.Type == 'MusicAlbum') { + textlines.push(item.AlbumArtist || ' '); + } + + if (item.Type == 'Game') { + textlines.push(item.GameSystem || ' '); + } + + if (item.Type == 'TvChannel') { + + if (item.CurrentProgram) { + textlines.push(itemHelper.getDisplayName(item.CurrentProgram)); + } + } + var lineCount = textlines.length; if (!options.enableSideMediaInfo) { lineCount++; @@ -241,7 +254,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan html += '