From c86571708ac0ca7e39e6678efce10b4e57f3b1e3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 21 Jul 2016 16:25:55 -0400 Subject: [PATCH 1/3] restore external player context menu --- .../emby-webcomponents/itemcontextmenu.js | 26 ++++++++++++------- .../emby-webcomponents/playmenu.js | 18 +++++++++++-- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index 526663ce97..734a068297 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -1,9 +1,6 @@ -define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', 'playbackManager', 'loading'], function (appHost, globalize, connectionManager, itemHelper, embyRouter, playbackManager, loading) { +define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', 'playbackManager', 'loading', 'appSettings'], function (appHost, globalize, connectionManager, itemHelper, embyRouter, playbackManager, loading, appSettings) { - var isTheater = true; - appHost.appInfo().then(function (result) { - isTheater = result.appName.toLowerCase().indexOf('theater') != -1; - }); + var isMobileApp = window.Dashboard != null; function getCommands(options) { @@ -48,7 +45,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (itemHelper.canEdit(user, item.Type)) { - if (!isTheater) { + if (isMobileApp) { if (options.edit !== false) { var text = item.Type == 'Timer' ? globalize.translate('sharedcomponents#Edit') : globalize.translate('sharedcomponents#EditInfo'); @@ -63,7 +60,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (itemHelper.canEditImages(user, item.Type)) { - if (!isTheater) { + if (isMobileApp) { if (options.editImages !== false) { commands.push({ name: globalize.translate('sharedcomponents#EditImages'), @@ -92,7 +89,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', }); } - if (!isTheater && options.identify !== false) { + if (isMobileApp && options.identify !== false) { if (itemHelper.canIdentify(user, item.Type)) { commands.push({ name: globalize.translate('sharedcomponents#Identify'), @@ -125,6 +122,13 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', name: globalize.translate('sharedcomponents#Play'), id: 'resume' }); + + if (isMobileApp && appSettings.enableExternalPlayers()) { + commands.push({ + name: globalize.translate('ButtonPlayExternalPlayer'), + id: 'externalplayer' + }); + } } if (options.playAllFromHere && item.Type != 'Program' && item.Type != 'TvChannel') { @@ -201,7 +205,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', } } - if (!isTheater && options.sync !== false) { + if (isMobileApp && options.sync !== false) { if (itemHelper.canSync(user, item)) { commands.push({ name: globalize.translate('sharedcomponents#Sync'), @@ -385,6 +389,10 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', }); break; } + case 'externalplayer': + LibraryBrowser.playInExternalPlayer(itemId); + getResolveFunction(resolve, id)(); + break; case 'album': { embyRouter.showItem(item.AlbumId, item.ServerId); diff --git a/dashboard-ui/bower_components/emby-webcomponents/playmenu.js b/dashboard-ui/bower_components/emby-webcomponents/playmenu.js index eca1a1d580..4023a83150 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/playmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/playmenu.js @@ -1,4 +1,6 @@ -define(['actionsheet', 'datetime', 'playbackManager', 'globalize'], function (actionsheet, datetime, playbackManager, globalize) { +define(['actionsheet', 'datetime', 'playbackManager', 'globalize', 'appSettings'], function (actionsheet, datetime, playbackManager, globalize, appSettings) { + + var isMobileApp = window.Dashboard != null; function show(options) { @@ -11,7 +13,9 @@ define(['actionsheet', 'datetime', 'playbackManager', 'globalize'], function (ac var serverId = item.ServerId; var resumePositionTicks = item.UserData ? item.UserData.PlaybackPositionTicks : null; - if (!resumePositionTicks && mediaType != "Audio" && !isFolder) { + var showExternalPlayer = isMobileApp && mediaType == 'Video' && !isFolder && appSettings.enableExternalPlayers(); + + if (!resumePositionTicks && mediaType != "Audio" && !isFolder && !showExternalPlayer) { playbackManager.play({ items: [item] }); @@ -37,6 +41,13 @@ define(['actionsheet', 'datetime', 'playbackManager', 'globalize'], function (ac }); } + if (showExternalPlayer) { + menuItems.push({ + name: globalize.translate('ButtonPlayExternalPlayer'), + id: 'externalplayer' + }); + } + if (playbackManager.canQueueMediaType(mediaType)) { menuItems.push({ name: globalize.translate('sharedcomponents#Queue'), @@ -72,6 +83,9 @@ define(['actionsheet', 'datetime', 'playbackManager', 'globalize'], function (ac serverId: item.ServerId }); break; + case 'externalplayer': + LibraryBrowser.playInExternalPlayer(itemId); + break; case 'resume': playbackManager.play({ ids: [itemId], From 3838831828e8aba0bc9468bf413701d0d6d6f992 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 21 Jul 2016 16:51:43 -0400 Subject: [PATCH 2/3] update icons --- .../emby-webcomponents/.bower.json | 8 +- .../itemhovermenu/itemhovermenu.js | 5 +- .../emby-webcomponents/listview/listview.js | 6 +- .../multiselect/multiselect.js | 3 +- .../subtitleeditor/subtitleeditor.js | 6 +- .../iron-autogrow-textarea/.bower.json | 10 +- .../.github/ISSUE_TEMPLATE.md | 33 +++++ .../iron-autogrow-textarea/.travis.yml | 26 ++-- .../iron-autogrow-textarea/CONTRIBUTING.md | 2 +- .../iron-autogrow-textarea/bower.json | 4 +- .../iron-autogrow-textarea.html | 118 +++++++++--------- .../iron-behaviors/.bower.json | 6 +- dashboard-ui/components/apphost.js | 4 +- 13 files changed, 135 insertions(+), 96 deletions(-) create mode 100644 dashboard-ui/bower_components/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 339f527baf..0e56485572 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.112", - "_release": "1.4.112", + "version": "1.4.113", + "_release": "1.4.113", "_resolution": { "type": "version", - "tag": "1.4.112", - "commit": "3dcd3f9498f9c9963f5d195179b3ae0f85a1e909" + "tag": "1.4.113", + "commit": "03c34e718b6b72ec847567dcedb114e32ff8a1f0" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js index 1436d6f4da..c13168ab0d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemhovermenu/itemhovermenu.js @@ -1,4 +1,4 @@ -define(['connectionManager', 'itemHelper', 'mediaInfo', 'userdataButtons', 'playbackManager', 'globalize', 'dom', 'css!./itemhovermenu', 'emby-button'], function (connectionManager, itemHelper, mediaInfo, userdataButtons, playbackManager, globalize, dom) { +define(['connectionManager', 'itemHelper', 'mediaInfo', 'userdataButtons', 'playbackManager', 'globalize', 'dom', 'apphost', 'css!./itemhovermenu', 'emby-button'], function (connectionManager, itemHelper, mediaInfo, userdataButtons, playbackManager, globalize, dom, appHost) { var preventHover = false; var showOverlayTimeout; @@ -136,7 +136,8 @@ buttonCount++; } - html += ''; + var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : ''; + html += ''; buttonCount++; html += userdataButtons.getIconsHtml({ diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js index fabbbee2d3..af081437e0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js @@ -1,4 +1,4 @@ -define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutManager', 'globalize', 'userdataButtons', 'css!./listview'], function (itemHelper, mediaInfo, indicators, connectionManager, layoutManager, globalize, userdataButtons) { +define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutManager', 'globalize', 'userdataButtons', 'apphost', 'css!./listview'], function (itemHelper, mediaInfo, indicators, connectionManager, layoutManager, globalize, userdataButtons, appHost) { function getIndex(item, options) { @@ -253,6 +253,8 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan html += '
'; + var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : ''; + for (var i = 0, textLinesLength = textlines.length; i < textLinesLength; i++) { if (i == 0 && isLargeStyle) { @@ -295,7 +297,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan } if (!clickEntireItem) { - html += ''; + html += ''; html += ''; html += userdataButtons.getIconsHtml({ item: item, diff --git a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js index 9ff5d6f023..fe51e814db 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js +++ b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js @@ -174,7 +174,8 @@ html += ''; html += '
'; - html += ''; + var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : ''; + html += ''; selectionCommandsPanel.innerHTML = html; diff --git a/dashboard-ui/bower_components/emby-webcomponents/subtitleeditor/subtitleeditor.js b/dashboard-ui/bower_components/emby-webcomponents/subtitleeditor/subtitleeditor.js index d202d5dc62..bf60469843 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/subtitleeditor/subtitleeditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/subtitleeditor/subtitleeditor.js @@ -1,4 +1,4 @@ -define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'scrollHelper', 'appStorage', 'connectionManager', 'loading', 'focusManager', 'dom', 'emby-select', 'listViewStyle', 'paper-icon-button-light', 'css!./../formdialog', 'material-icons', 'css!./subtitleeditor', 'emby-button'], function (dialogHelper, require, layoutManager, globalize, scrollHelper, appStorage, connectionManager, loading, focusManager, dom) { +define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'scrollHelper', 'appStorage', 'connectionManager', 'loading', 'focusManager', 'dom', 'apphost', 'emby-select', 'listViewStyle', 'paper-icon-button-light', 'css!./../formdialog', 'material-icons', 'css!./subtitleeditor', 'emby-button'], function (dialogHelper, require, layoutManager, globalize, scrollHelper, appStorage, connectionManager, loading, focusManager, dom, appHost) { var currentItem; var hasChanges; @@ -210,6 +210,8 @@ context.querySelector('.noSearchResults').classList.add('hide'); + var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : ''; + for (var i = 0, length = results.length; i < length; i++) { var result = results[i]; @@ -255,7 +257,7 @@ html += '
' + /*(result.CommunityRating || 0) + ' / ' +*/ (result.DownloadCount || 0) + '
'; if (!layoutManager.tv) { - html += ''; + html += ''; } html += ''; diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json b/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json index e6d37e625c..e143ff52ab 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-autogrow-textarea", - "version": "1.0.12", + "version": "1.0.13", "description": "A textarea element that automatically grows with input", "authors": [ "The Polymer Authors" @@ -25,7 +25,7 @@ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", @@ -36,11 +36,11 @@ "paper-styles": "PolymerElements/paper-styles#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.12", + "_release": "1.0.13", "_resolution": { "type": "version", - "tag": "v1.0.12", - "commit": "86f8fd61b412bcea6bc7b8feaee9b24bc2ad48ea" + "tag": "v1.0.13", + "commit": "399cfdbb3fac0c7b61d14a8cf8402c0195b0ff04" }, "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md b/dashboard-ui/bower_components/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..0b70c29de3 --- /dev/null +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ + +### Description + + +### Expected outcome + + + +### Actual outcome + + + +### Live Demo + + +### Steps to reproduce + + + +### Browsers Affected + +- [ ] Chrome +- [ ] Firefox +- [ ] Safari 9 +- [ ] Safari 8 +- [ ] Safari 7 +- [ ] Edge +- [ ] IE 11 +- [ ] IE 10 diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml b/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml index 771bf35d1e..d7b9300102 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/.travis.yml @@ -1,25 +1,23 @@ language: node_js -sudo: false +sudo: required before_script: - - npm install -g bower polylint web-component-tester - - bower install - - polylint +- npm install -g bower polylint web-component-tester +- bower install +- polylint env: global: - - secure: lIogwlz5kFUKYy1OWASXxQgZE4YTyjUY0QcEgnqbv6wQ0GX8wRMgbI3zhbAv+xXU5ieYXg6Bd47ZFZZ1kVEWzQynAdd2od14Eu1vfN60/yc/llz62VTYuFsPt8r+Tgw41Iz8plwejK4a+V26Da5tXW+soJQOJKvE/MOiPzKi2m0= - - secure: cj3uSCQwLY6pyP3oTdGFjJoTRjv3G1lSe73fMd6i15XnMMxM4DVarfDtK+a0dPPxDY8BBhfr4sFClZuWX71bAHQuqUA84oigbeWt2xfl8d3HUuvr9aEnQxAGe2eQE7atpYJPC9M447sw48QKiUVgQo33DeJ1BGj6SBqkw0BJXO8= - - CXX=g++-4.8 + - secure: TqFz1Cdu4BtLCHYLFPES0q+6wPfCnj9bnTfven9LIU+gtek70FPDT3UlnviNwp5ob3o0sbLgsLWG5OkCsRHli+HCgPEVDazSrghfwaT9mL+h/DlM/PVB079VDdIKvZM6L7xEF0zPv7t26kljBRQcZJ81O3K7h1mNjeBj6sDXHzE= + - secure: ihYM52Uu3H7FGU+x+f+hzMcWt00B7l6GZOtxzT1xYx4hb4E9/WwXYR5z9bqN+s5p10yf3FG64zbmMTuJeBvknDpSyBt/vKP+QBBZT0hxv05GifS38hiSoYT3HBxEpwhYdpjlsSJtIbKfYGR3xIXutRzRrRKSYigcrQNX83MGWFY= node_js: stable addons: - firefox: latest + firefox: '46.0' apt: sources: - - google-chrome - - ubuntu-toolchain-r-test + - google-chrome packages: - - google-chrome-stable - - g++-4.8 + - google-chrome-stable sauce_connect: true script: - - xvfb-run wct - - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" +- xvfb-run wct +- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi +dist: trusty diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md index f147978a3e..093090d435 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/CONTRIBUTING.md @@ -1,4 +1,3 @@ - + # Polymer Elements ## Guide for Contributors diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json b/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json index 67be4a6686..2622be9986 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/bower.json @@ -1,6 +1,6 @@ { "name": "iron-autogrow-textarea", - "version": "1.0.12", + "version": "1.0.13", "description": "A textarea element that automatically grows with input", "authors": [ "The Polymer Authors" @@ -25,7 +25,7 @@ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0", "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", diff --git a/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html b/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html index b04f89b3bd..d3ff0741d0 100644 --- a/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html +++ b/dashboard-ui/bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html @@ -38,66 +38,66 @@ Custom property | Description | Default --> - -