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

@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.0.49",
"_release": "1.0.49",
"version": "1.0.54",
"_release": "1.0.54",
"_resolution": {
"type": "version",
"tag": "1.0.49",
"commit": "460488b5fd0723a72995cc23f9f8cb5a860bd370"
"tag": "1.0.54",
"commit": "a4de1d3f633579c3583d83990577cc252a9187ad"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.0.0",

View file

@ -29,7 +29,7 @@
window.removeEventListener('popstate', onHashChange);
if (!self.closedByBack) {
if (!self.closedByBack && isHistoryEnabled(dlg)) {
var state = history.state || {};
if (state.dialogId == hash) {
history.back();
@ -60,9 +60,15 @@
removeScrollLockOnClose = true;
}
historyManager.pushState({ dialogId: hash }, "Dialog", hash);
if (isHistoryEnabled(dlg)) {
historyManager.pushState({ dialogId: hash }, "Dialog", hash);
window.addEventListener('popstate', onHashChange);
window.addEventListener('popstate', onHashChange);
}
}
function isHistoryEnabled(dlg) {
return dlg.getAttribute('data-history') == 'true';
}
function open(dlg) {
@ -76,7 +82,11 @@
function close(dlg) {
if (dlg.opened) {
history.back();
if (isHistoryEnabled(dlg)) {
history.back();
} else {
dlg.close();
}
}
}
@ -111,6 +121,10 @@
dlg.setAttribute('data-lockscroll', 'true');
}
if (options.enableHistory !== false) {
dlg.setAttribute('data-history', 'true');
}
// without this safari will scroll the background instead of the dialog contents
// but not needed here since this is already on top of an existing dialog
// but skip it in IE because it's causing the entire browser to hang

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;