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-08-20 02:27:48 -04:00
parent 1846f1afcf
commit 965bf947c8
16 changed files with 111 additions and 63 deletions

View file

@ -14,12 +14,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.4.175", "version": "1.4.176",
"_release": "1.4.175", "_release": "1.4.176",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.4.175", "tag": "1.4.176",
"commit": "aa687c378a3252d0679dfb8b16c5e6e0e1350c7a" "commit": "a69a071e40e18eb0f20b800f27de8f1c62c38fec"
}, },
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1", "_target": "^1.2.1",

View file

@ -182,12 +182,12 @@
height: 100%; height: 100%;
} }
.cardImage.coveredImage, .cardImageContainer.coveredImage, .coveredImage .cardImage { .coveredImage {
background-size: 100% 100%; background-size: 100% 100%;
background-position: center center; background-position: center center;
} }
.coveredImage.noScale, .coveredImage.noScale .cardImage { .coveredImage-noScale {
background-size: cover; background-size: cover;
} }

View file

@ -1034,7 +1034,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
cardImageContainerClass += ' coveredImage'; cardImageContainerClass += ' coveredImage';
if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder') { if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder') {
cardImageContainerClass += ' noScale'; cardImageContainerClass += ' coveredImage-noScale';
} }
} }

View file

@ -1,6 +1,7 @@
.emby-tab-button { .emby-tab-button {
background: transparent; background: transparent;
border: 0 !important; border: 2px solid transparent !important;
border-width: 0 0 2px 0 !important;
cursor: pointer; cursor: pointer;
outline: none !important; outline: none !important;
width: auto; width: auto;
@ -23,12 +24,13 @@
overflow: hidden; overflow: hidden;
} }
.emby-tab-button:focus { .emby-tab-button:focus {
font-weight: bold !important; font-weight: bold !important;
} }
.emby-tab-button-active { .emby-tab-button-active {
color: #52B54B !important; color: #52B54B !important;
border-color: #52B54B !important;
} }
.emby-tabs-slider { .emby-tabs-slider {
@ -39,7 +41,7 @@
position: absolute; position: absolute;
left: 0; left: 0;
/* Need this or it will be partially covered by the drop-shadow on android */ /* Need this or it will be partially covered by the drop-shadow on android */
bottom: 1px; bottom: 0;
height: 2px; height: 2px;
z-index: 1000; z-index: 1000;
background: #52B54B; background: #52B54B;

View file

@ -15,37 +15,10 @@
} }
} }
function getButtonSelectionBar(tabButton) {
var elem = tabButton.querySelector('.' + buttonClass + '-selection-bar');
if (!elem) {
elem = document.createElement('div');
elem.classList.add(buttonClass + '-selection-bar');
tabButton.appendChild(elem);
}
return elem;
}
function hideButtonSelectionBar(tabButton) {
var elem = getButtonSelectionBar(tabButton);
elem.classList.add('hide');
elem.classList.remove('emby-tab-button-selection-bar-active');
}
function showButtonSelectionBar(tabButton) {
var elem = getButtonSelectionBar(tabButton);
elem.classList.remove('hide');
elem.classList.add('emby-tab-button-selection-bar-active');
}
function animtateSelectionBar(bar, start, pos, duration, onFinish) { function animtateSelectionBar(bar, start, pos, duration, onFinish) {
var endTransform = pos ? ('translateX(' + pos + 'px)') : 'none'; var endTransform = pos ? ('translateX(' + Math.round(pos) + 'px)') : 'none';
var startTransform = start ? ('translateX(' + start + 'px)') : 'none'; var startTransform = start ? ('translateX(' + Math.round(start) + 'px)') : 'none';
if (!duration || !bar.animate) { if (!duration || !bar.animate) {
bar.style.transform = endTransform; bar.style.transform = endTransform;
@ -66,16 +39,14 @@
iterations: 1, iterations: 1,
easing: 'linear', easing: 'linear',
fill: 'forwards' fill: 'forwards'
}).onFinish = onFinish; });
// for some reason onFinish is not firing. temporary browser issue?
setTimeout(onFinish, duration);
} }
function moveSelectionBar(tabs, newButton, oldButton, animate) { function moveSelectionBar(tabs, newButton, oldButton, animate) {
if (oldButton) {
hideButtonSelectionBar(oldButton);
}
hideButtonSelectionBar(newButton);
var selectionBar = tabs.selectionBar; var selectionBar = tabs.selectionBar;
if (selectionBar) { if (selectionBar) {
@ -104,13 +75,14 @@
var delay = animate ? 100 : 0; var delay = animate ? 100 : 0;
tabs.currentOffset = endPosition; tabs.currentOffset = endPosition;
newButton.classList.add(activeButtonClass);
var onAnimationFinish = function() { var onAnimationFinish = function () {
//if (tabs.getAttribute('data-selectionbar') != 'false') {
// showButtonSelectionBar(newButton);
//}
newButton.classList.add(activeButtonClass);
if (tabs.getAttribute('data-selectionbar') != 'false') {
showButtonSelectionBar(newButton);
}
if (selectionBar) { if (selectionBar) {
selectionBar.classList.add('hide'); selectionBar.classList.add('hide');
} }

View file

@ -152,8 +152,9 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
xhr.onload = function (e) { xhr.onload = function (e) {
if (this.status < 400) { if (this.status < 400) {
resolve(JSON.parse(this.response)); resolve(JSON.parse(this.response));
} else {
resolve({});
} }
resolve({});
}; };
xhr.onerror = function () { xhr.onerror = function () {

View file

@ -0,0 +1,25 @@
if (!Array.prototype.filter) {
Array.prototype.filter = function (fun /*, thisp*/) {
"use strict";
if (this == null)
throw new TypeError();
var t = Object(this);
var len = t.length >>> 0;
if (typeof fun != "function")
throw new TypeError();
var res = [];
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in t) {
var val = t[i]; // in case fun mutates this
if (fun.call(thisp, val, i, t))
res.push(val);
}
}
return res;
};
}

View file

@ -0,0 +1,27 @@
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5
// internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () { },
fBound = function () {
return fToBind.apply(this instanceof fNOP
? this
: oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
if (this.prototype) {
// Function.prototype doesn't have a prototype property
fNOP.prototype = this.prototype;
}
fBound.prototype = new fNOP();
return fBound;
};
}

View file

@ -16,7 +16,7 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
return false; return false;
} }
return true; return browser.edge && !browser.mobile;
} }
function loadView(options) { function loadView(options) {
@ -261,7 +261,7 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
selectedPageIndex = -1; selectedPageIndex = -1;
} }
if (enableAnimation() && !document.documentElement.animate) { if (enableAnimation() && !browser.animate) {
require(['webAnimations']); require(['webAnimations']);
} }

View file

@ -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.10", "_release": "1.0.10",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.10", "tag": "v1.0.10",
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734" "commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
}, },
"_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"
} }

View file

@ -263,8 +263,12 @@ globalize.translate('CancelSyncJobConfirmation');
id: 'delete' id: 'delete'
}); });
} else { } else {
var txt = listInstance.options.isLocalSync ?
globalize.translate('RemoveDownload') :
globalize.translate('ButtonCancelSyncJob');
menuItems.push({ menuItems.push({
name: globalize.translate('ButtonCancelSyncJob'), name: globalize.translate(txt),
id: 'cancel' id: 'cancel'
}); });
} }

View file

@ -54,6 +54,10 @@ body:not(.dashboardDocument) .mainDrawerButton {
color: #52B54B !important; color: #52B54B !important;
} }
.emby-tab-button-active {
border-color: transparent !important;
}
.criticReviewPaperList { .criticReviewPaperList {
background-color: #262626; background-color: #262626;
} }

View file

@ -146,7 +146,7 @@
type: "Primary" type: "Primary"
}); });
html += '<div class="cardImageContainer coveredImage noScale" style="background-image:url(\'' + imgUrl + '\');"></div>'; html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + '\');"></div>';
} }
else { else {
@ -154,7 +154,7 @@
imgUrl = 'css/images/logindefault.png'; imgUrl = 'css/images/logindefault.png';
html += '<div class="cardImageContainer coveredImage noScale" style="background-image:url(\'' + imgUrl + '\');background-color:' + background + ';"></div>'; html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + '\');background-color:' + background + ';"></div>';
} }
html += '</a>'; html += '</a>';

View file

@ -1430,7 +1430,11 @@ var AppInfo = {};
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency); define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
define('fetch', [bowerPath + '/fetch/fetch']); define('fetch', [bowerPath + '/fetch/fetch']);
define('objectassign', [embyWebComponentsBowerPath + '/objectassign']);
define('functionbind', [embyWebComponentsBowerPath + '/polyfills/bind']);
define('arraypolyfills', [embyWebComponentsBowerPath + '/polyfills/array']);
define('objectassign', [embyWebComponentsBowerPath + '/polyfills/objectassign']);
define('native-promise-only', [bowerPath + '/native-promise-only/lib/npo.src']); define('native-promise-only', [bowerPath + '/native-promise-only/lib/npo.src']);
define("clearButtonStyle", ['css!' + embyWebComponentsBowerPath + '/clearbutton']); define("clearButtonStyle", ['css!' + embyWebComponentsBowerPath + '/clearbutton']);
define("userdataButtons", [embyWebComponentsBowerPath + "/userdatabuttons/userdatabuttons"], returnFirstDependency); define("userdataButtons", [embyWebComponentsBowerPath + "/userdatabuttons/userdatabuttons"], returnFirstDependency);
@ -1782,7 +1786,15 @@ var AppInfo = {};
} }
if (typeof Object.assign != 'function') { if (typeof Object.assign != 'function') {
deps.push('objectassign'); list.push('objectassign');
}
if (!Array.prototype.filter) {
list.push('arraypolyfills');
}
if (!Function.prototype.bind) {
list.push('functionbind');
} }
require(deps, function () { require(deps, function () {

View file

@ -2315,6 +2315,7 @@
"EnablePhotosHelp": "Photos will be detected and displayed alongside other media files.", "EnablePhotosHelp": "Photos will be detected and displayed alongside other media files.",
"MakeAvailableOffline": "Make available offline", "MakeAvailableOffline": "Make available offline",
"ConfirmRemoveDownload": "Remove download?", "ConfirmRemoveDownload": "Remove download?",
"RemoveDownload": "Remove download",
"SyncToOtherDevices": "Sync to other devices", "SyncToOtherDevices": "Sync to other devices",
"ManageOfflineDownloads": "Manage offline downloads", "ManageOfflineDownloads": "Manage offline downloads",
"MessageDownloadScheduled": "Download scheduled" "MessageDownloadScheduled": "Download scheduled"