mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
acb094fa46
commit
59ede5b1e6
7 changed files with 52 additions and 34 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.2.51",
|
"version": "1.2.53",
|
||||||
"_release": "1.2.51",
|
"_release": "1.2.53",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.2.51",
|
"tag": "1.2.53",
|
||||||
"commit": "0de31178ecd029314513167a880a1cf645140917"
|
"commit": "818133a9b1b4b241b6f0e8e1733da3358bb02df5"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -20,9 +20,11 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMenu(apiClient, itemId) {
|
function showMenu(options) {
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
var itemId = options.itemId;
|
||||||
|
var apiClient = options.apiClient || connectionManager.getApiClient(options.serverId);
|
||||||
var userId = apiClient.getCurrentUserId();
|
var userId = apiClient.getCurrentUserId();
|
||||||
|
|
||||||
return apiClient.getItem(userId, itemId).then(function () {
|
return apiClient.getItem(userId, itemId).then(function () {
|
||||||
|
|
|
@ -133,6 +133,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
if (appHost.supports('filedownload')) {
|
if (appHost.supports('filedownload')) {
|
||||||
html += '<paper-icon-button icon="slideshow:file-download" class="btnDownload slideshowButton"></paper-icon-button>';
|
html += '<paper-icon-button icon="slideshow:file-download" class="btnDownload slideshowButton"></paper-icon-button>';
|
||||||
}
|
}
|
||||||
|
if (appHost.supports('sharing')) {
|
||||||
|
html += '<paper-icon-button icon="slideshow:share" class="btnShare slideshowButton"></paper-icon-button>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
html += '<paper-icon-button icon="slideshow:close" class="btnSlideshowExit" tabindex="-1"></paper-icon-button>';
|
html += '<paper-icon-button icon="slideshow:close" class="btnSlideshowExit" tabindex="-1"></paper-icon-button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -145,6 +148,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
if (appHost.supports('filedownload')) {
|
if (appHost.supports('filedownload')) {
|
||||||
html += '<paper-icon-button icon="slideshow:file-download" class="btnDownload slideshowButton"></paper-icon-button>';
|
html += '<paper-icon-button icon="slideshow:file-download" class="btnDownload slideshowButton"></paper-icon-button>';
|
||||||
}
|
}
|
||||||
|
if (appHost.supports('sharing')) {
|
||||||
|
html += '<paper-icon-button icon="slideshow:share" class="btnShare slideshowButton"></paper-icon-button>';
|
||||||
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
@ -240,7 +246,8 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
originalImage: getImgUrl(item, true),
|
originalImage: getImgUrl(item, true),
|
||||||
//title: item.Name,
|
//title: item.Name,
|
||||||
//description: item.Overview
|
//description: item.Overview
|
||||||
Id: item.Id
|
Id: item.Id,
|
||||||
|
ServerId: item.ServerId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,7 +272,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
function getSwiperSlideHtmlFromSlide(item) {
|
function getSwiperSlideHtmlFromSlide(item) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
html += '<div class="swiper-slide" data-original="' + item.originalImage + '" data-itemid="' + item.Id + '">';
|
html += '<div class="swiper-slide" data-original="' + item.originalImage + '" data-itemid="' + item.Id + '" data-serverid="' + item.ServerId + '">';
|
||||||
html += '<img data-src="' + item.imageUrl + '" class="swiper-lazy">';
|
html += '<img data-src="' + item.imageUrl + '" class="swiper-lazy">';
|
||||||
html += '<paper-spinner></paper-spinner>';
|
html += '<paper-spinner></paper-spinner>';
|
||||||
if (item.title || item.subtitle) {
|
if (item.title || item.subtitle) {
|
||||||
|
@ -316,21 +323,19 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCurrentItemId() {
|
function getCurrentImageInfo() {
|
||||||
|
|
||||||
|
|
||||||
if (swiperInstance) {
|
if (swiperInstance) {
|
||||||
return document.querySelector('.swiper-slide-active').getAttribute('data-itemid');
|
var slide = document.querySelector('.swiper-slide-active');
|
||||||
} else {
|
|
||||||
|
if (slide) {
|
||||||
|
return {
|
||||||
|
url: slide.getAttribute('data-original'),
|
||||||
|
itemId: slide.getAttribute('data-itemid'),
|
||||||
|
serverId: slide.getAttribute('data-serverid')
|
||||||
|
};
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCurrentImageUrl() {
|
|
||||||
|
|
||||||
|
|
||||||
if (swiperInstance) {
|
|
||||||
return document.querySelector('.swiper-slide-active').getAttribute('data-original');
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -338,20 +343,20 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
|
|
||||||
function download() {
|
function download() {
|
||||||
|
|
||||||
var url = getCurrentImageUrl();
|
var imageInfo = getCurrentImageInfo();
|
||||||
var itemId = getCurrentItemId();
|
|
||||||
|
|
||||||
require(['fileDownloader'], function (fileDownloader) {
|
require(['fileDownloader'], function (fileDownloader) {
|
||||||
fileDownloader.download([
|
fileDownloader.download([imageInfo]);
|
||||||
{
|
|
||||||
url: url,
|
|
||||||
itemId: itemId
|
|
||||||
}]);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function share() {
|
function share() {
|
||||||
|
|
||||||
|
var imageInfo = getCurrentImageInfo();
|
||||||
|
|
||||||
|
require(['sharingmanager'], function (sharingManager) {
|
||||||
|
sharingManager.showMenu(imageInfo);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function play() {
|
function play() {
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||||
"_release": "1.0.8",
|
"_release": "1.0.8",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.8",
|
"tag": "v1.0.8",
|
||||||
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-icon"
|
"_originalSource": "polymerelements/iron-icon"
|
||||||
}
|
}
|
|
@ -34,6 +34,6 @@
|
||||||
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.1.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "Polymer/polymer"
|
"_originalSource": "Polymer/polymer"
|
||||||
}
|
}
|
|
@ -950,6 +950,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var serverId = ApiClient.serverInfo().Id;
|
||||||
|
|
||||||
require(['actionsheet'], function (actionsheet) {
|
require(['actionsheet'], function (actionsheet) {
|
||||||
|
|
||||||
actionsheet.show({
|
actionsheet.show({
|
||||||
|
@ -961,7 +963,10 @@
|
||||||
|
|
||||||
case 'share':
|
case 'share':
|
||||||
require(['sharingmanager'], function (sharingManager) {
|
require(['sharingmanager'], function (sharingManager) {
|
||||||
sharingManager.showMenu(ApiClient, itemId);
|
sharingManager.showMenu({
|
||||||
|
serverId: serverId,
|
||||||
|
itemId: itemId
|
||||||
|
});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'addtocollection':
|
case 'addtocollection':
|
||||||
|
@ -990,7 +995,8 @@
|
||||||
fileDownloader.download([
|
fileDownloader.download([
|
||||||
{
|
{
|
||||||
url: downloadHref,
|
url: downloadHref,
|
||||||
itemId: itemId
|
itemId: itemId,
|
||||||
|
serverId: serverId
|
||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -249,6 +249,7 @@
|
||||||
|
|
||||||
var albumid = card.getAttribute('data-albumid');
|
var albumid = card.getAttribute('data-albumid');
|
||||||
var artistid = card.getAttribute('data-artistid');
|
var artistid = card.getAttribute('data-artistid');
|
||||||
|
var serverId = ApiClient.serverInfo().Id;
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function (user) {
|
Dashboard.getCurrentUser().then(function (user) {
|
||||||
|
|
||||||
|
@ -494,7 +495,8 @@
|
||||||
fileDownloader.download([
|
fileDownloader.download([
|
||||||
{
|
{
|
||||||
url: downloadHref,
|
url: downloadHref,
|
||||||
itemId: itemId
|
itemId: itemId,
|
||||||
|
serverId: serverId
|
||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -577,7 +579,10 @@
|
||||||
break;
|
break;
|
||||||
case 'share':
|
case 'share':
|
||||||
require(['sharingmanager'], function (sharingManager) {
|
require(['sharingmanager'], function (sharingManager) {
|
||||||
sharingManager.showMenu(ApiClient, itemId);
|
sharingManager.showMenu({
|
||||||
|
serverId: serverId,
|
||||||
|
itemId: itemId
|
||||||
|
});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'removefromplaylist':
|
case 'removefromplaylist':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue