1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-02-01 12:02:17 -05:00
parent 2a72f0256e
commit 048ba20590
26 changed files with 1377 additions and 136 deletions

View file

@ -1,4 +1,4 @@
define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'css!./style', 'html!./icons', 'iron-icon-set'], function (paperdialoghelper, inputmanager, connectionManager, browser) {
define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'css!./style', 'html!./icons', 'iron-icon-set', 'paper-fab', 'paper-icon-button'], function (paperdialoghelper, inputmanager, connectionManager, browser) {
return function (options) {
@ -9,7 +9,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
function createElements(options) {
dlg = paperdialoghelper.createDialog({
exitAnimationDuration: 800,
exitAnimationDuration: options.interactive ? 400 : 800,
size: 'fullscreen'
});
@ -22,7 +22,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
html += '<div>';
html += '<div class="slideshowSwiperContainer"><div class="swiper-wrapper"></div></div>';
html += '<paper-icon-button icon="slideshow:arrow-back" class="btnSlideshowExit" tabindex="-1"></paper-icon-button>';
html += '<paper-fab mini icon="slideshow:arrow-back" class="btnSlideshowExit" tabindex="-1"></paper-fab>';
html += '<div class="slideshowControlBar">';
html += '<paper-icon-button icon="slideshow:skip-previous" class="btnSlideshowPrevious slideshowButton"></paper-icon-button>';
@ -77,7 +77,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
swiperInstance = new Swiper(dlg.querySelector('.slideshowSwiperContainer'), {
// Optional parameters
direction: 'horizontal',
loop: true,
loop: options.loop !== false,
autoplay: options.interval || 8000,
// Disable preloading of all images
preloadImages: false,
@ -142,6 +142,15 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
function nextImage() {
if (swiperInstance) {
if (options.loop === false) {
if (swiperInstance.activeIndex >= swiperInstance.slides.length - 1) {
paperdialoghelper.close(dlg);
return;
}
}
swiperInstance.slideNext();
} else {
stopInterval();

View file

@ -10,6 +10,7 @@
background-repeat: no-repeat;
margin: 0 !important;
color: #fff;
line-height: normal;
}
.slideshowImage.cover {
@ -46,13 +47,17 @@
.btnSlideshowExit {
z-index: 1002;
position: absolute;
top: 1%;
left: .5%;
top: 1.5vh;
left: 1.5vh;
width: 6vh;
height: 6vh;
color: #eee;
}
paper-fab.btnSlideshowExit {
background-color: #444;
}
.slideshowControlBar {
position: fixed;
left: 0;