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

beta fixes

This commit is contained in:
Luke Pulverenti 2015-05-11 15:59:59 -04:00
parent 9e9ffda3e6
commit bdc8187420
13 changed files with 203 additions and 18 deletions

View file

@ -48,7 +48,7 @@
} }
.largeCardMargin .cardBox { .largeCardMargin .cardBox {
margin: 7px; margin: 6px;
} }
/*@media all and (max-width: 600px) { /*@media all and (max-width: 600px) {
@ -174,6 +174,15 @@
max-width: 100%; max-width: 100%;
} }
.lightCardFooter {
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%) !important; /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.7))) !important; /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* IE10+ */
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* W3C */
}
.fullCardFooter { .fullCardFooter {
right: 0; right: 0;
} }

View file

@ -940,6 +940,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
color: #fff; color: #fff;
background: rgb(51, 136, 204); background: rgb(51, 136, 204);
background: rgba(51, 136, 204, .9); background: rgba(51, 136, 204, .9);
line-height: 1.2;
} }
.unidentifiedIndicator { .unidentifiedIndicator {

View file

@ -130,6 +130,10 @@ h1 a:hover {
font-weight: 400; font-weight: 400;
} }
.ui-listview > .ui-li-divider {
line-height: 1.5;
line-height: initial;
}
/* /*
Make all panels vertically scrollable Make all panels vertically scrollable
If this causes any problems then perhaps require a css class to activate If this causes any problems then perhaps require a css class to activate

View file

@ -282,7 +282,7 @@
items: result.Items, items: result.Items,
preferThumb: true, preferThumb: true,
shape: 'backdrop', shape: 'backdrop',
overlayText: true, overlayText: screenWidth >= 600 && !AppInfo.hasLowImageBandwidth,
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,
context: 'home', context: 'home',

View file

@ -1407,7 +1407,7 @@
cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key); cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key);
} }
if (options.showChildCountIndicator && item.ChildCount) { if (options.showChildCountIndicator && item.ChildCount && options.showLatestItemsPopup !== false) {
cssClass += ' groupedCard'; cssClass += ' groupedCard';
} }
@ -1513,7 +1513,7 @@
footerOverlayed = true; footerOverlayed = true;
} }
else if (progressHtml) { else if (progressHtml) {
html += '<div class="cardFooter">'; html += '<div class="cardFooter fullCardFooter lightCardFooter">';
html += "<div class='cardProgress cardText'>"; html += "<div class='cardProgress cardText'>";
html += progressHtml; html += progressHtml;
html += "</div>"; html += "</div>";

View file

@ -26,6 +26,7 @@
items: items, items: items,
showUnplayedIndicator: false, showUnplayedIndicator: false,
showChildCountIndicator: true, showChildCountIndicator: true,
showLatestItemsPopup: false,
shape: "square", shape: "square",
showTitle: true, showTitle: true,
showParentTitle: true, showParentTitle: true,

View file

@ -72,7 +72,7 @@
html += '<div class="cardImage" style="text-align:center;">'; html += '<div class="cardImage" style="text-align:center;">';
var icon = server.Id == 'new' ? 'plus-circle' : 'globe'; var icon = server.Id == 'new' ? 'plus-circle' : 'globe';
html += '<i class="fa fa-' + icon + '" style="color:#fff;vertical-align:middle;font-size:100px;margin-top:25%;"></i>'; html += '<i class="fa fa-' + icon + '" style="color:#fff;vertical-align:middle;font-size:100px;"></i>';
} }
html += "</div>"; html += "</div>";
@ -302,7 +302,7 @@
html += '<a class="cardContent" href="' + href + '">'; html += '<a class="cardContent" href="' + href + '">';
html += '<div class="cardImage" style="text-align:center;">'; html += '<div class="cardImage" style="text-align:center;">';
html += '<i class="fa fa-globe" style="color:#fff;vertical-align:middle;font-size:100px;margin-top:25%;"></i>'; html += '<i class="fa fa-globe" style="color:#fff;vertical-align:middle;font-size:100px;"></i>';
html += "</div>"; html += "</div>";
// cardContent // cardContent

View file

@ -1395,7 +1395,7 @@ var Dashboard = {
name = "Internet Explorer"; name = "Internet Explorer";
} else if ($.browser.opera) { } else if ($.browser.opera) {
name = "Opera"; name = "Opera";
} else if ($.browser.firefox || $.browser.mozilla) { } else if ($.browser.mozilla) {
name = "Firefox"; name = "Firefox";
} }

View file

@ -53,7 +53,8 @@
limit: query.Limit, limit: query.Limit,
totalRecordCount: result.TotalRecordCount, totalRecordCount: result.TotalRecordCount,
viewButton: true, viewButton: true,
showLimit: false showLimit: false,
updatePageSizeSetting: false
}); });
$('.listTopPaging', page).html(pagingHtml).trigger('create'); $('.listTopPaging', page).html(pagingHtml).trigger('create');

View file

@ -1,6 +1,6 @@
(function ($, document) { (function ($, document) {
var view = LibraryBrowser.getDefaultItemsView('Thumb', 'Thumb'); var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
// The base query options // The base query options
var query = { var query = {

View file

@ -909,7 +909,6 @@
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(safari)[ \/]([\w.]+)/.exec(ua) || /(safari)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[]; [];
@ -922,7 +921,7 @@
var browser = match[1] || ""; var browser = match[1] || "";
if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -1) { if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -1) {
// http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update // http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update
browser = "msie"; browser = "msie";
} }
@ -950,22 +949,22 @@
browser[matched.platform] = true; browser[matched.platform] = true;
} }
if (browser.webkit && !browser.chrome) { if (userAgent.toLowerCase().indexOf("webkit") != -1 && !browser.chrome && !browser.msie) {
browser.safari = true; browser.safari = true;
} }
// Chrome is Webkit, but Webkit is also Safari.
if (browser.chrome || browser.safari) {
browser.webkit = true;
}
var md = new MobileDetect(userAgent); var md = new MobileDetect(userAgent);
browser.mobile = md.mobile(); if (md.mobile()) {
browser.mobile = true;
} else {
browser.mobile = null;
}
if (browser.msie && !browser.mobile && userAgent.toLowerCase().indexOf("xbox") != -1) { if (browser.msie && !browser.mobile && userAgent.toLowerCase().indexOf("xbox") != -1) {
browser.tv = true; browser.tv = true;
} }
jQuery.browser = browser; jQuery.browser = browser;
})(jQuery, window); })(jQuery, window);

View file

@ -0,0 +1,170 @@
(function () {
// Reports media playback to the device for lock screen control
var currentPlayer;
var lastPlayerState;
function updatePlayerState(state) {
if (!state.NowPlayingItem) {
hideNowPlayingBar();
return;
}
lastPlayerState = state;
var playState = state.PlayState || {};
var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem) || '';
var parts = nameHtml.split('<br/>');
var artist = parts.length == 1 ? '' : parts[0];
var title = parts[parts.length - 1];
var album = state.NowPlayingItem || '';
var duration = state.NowPlayingItem.RunTimeTicks ? (state.NowPlayingItem / 10000000) : 0;
var elapsedTime = playState.PositionTicks ? (playState.PositionTicks / 10000000) : 0;
var url = '';
var imgHeight = 100;
var nowPlayingItem = state.NowPlayingItem;
if (nowPlayingItem.PrimaryImageTag) {
url = ApiClient.getScaledImageUrl(nowPlayingItem.PrimaryImageItemId, {
type: "Primary",
height: imgHeight,
tag: nowPlayingItem.PrimaryImageTag
});
}
else if (nowPlayingItem.BackdropImageTag) {
url = ApiClient.getScaledImageUrl(nowPlayingItem.BackdropItemId, {
type: "Backdrop",
height: imgHeight,
tag: nowPlayingItem.BackdropImageTag,
index: 0
});
} else if (nowPlayingItem.ThumbImageTag) {
url = ApiClient.getScaledImageUrl(nowPlayingItem.ThumbImageItemId, {
type: "Thumb",
height: imgHeight,
tag: nowPlayingItem.ThumbImageTag
});
}
var params = [artist, title, album, url, duration, elapsedTime];
window.remoteControls.updateMetas(onUpdateMetasSuccess, onUpdateMetasFail, params);
}
function onStateChanged(e, state) {
//console.log('nowplaying event: ' + e.type);
var player = this;
if (player.isDefaultPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
return;
}
updatePlayerState(state);
}
function onPlaybackStart(e, state) {
console.log('nowplaying event: ' + e.type);
var player = this;
player.beginPlayerUpdates();
onStateChanged.call(player, e, state);
}
function onPlaybackStopped(e, state) {
console.log('nowplaying event: ' + e.type);
var player = this;
player.endPlayerUpdates();
hideNowPlayingBar();
}
function releaseCurrentPlayer() {
if (currentPlayer) {
$(currentPlayer).off('.cordovaremote');
currentPlayer.endPlayerUpdates();
currentPlayer = null;
hideNowPlayingBar();
}
}
function hideNowPlayingBar() {
var artist = "";
var title = "";
var album = "";
var image = "";
var duration = 0;
var elapsedTime = 0;
var params = [artist, title, album, image, duration, elapsedTime];
window.remoteControls.updateMetas(onUpdateMetasSuccess, onUpdateMetasFail, params);
}
function onUpdateMetasSuccess() {
console.log('onUpdateMetasSuccess');
}
function onUpdateMetasFail(fail) {
console.log('onUpdateMetasFail' + fail);
}
function bindToPlayer(player) {
releaseCurrentPlayer();
currentPlayer = player;
if (!player.isLocalPlayer) {
return;
}
player.getPlayerState().done(function (state) {
if (state.NowPlayingItem) {
player.beginPlayerUpdates();
}
onStateChanged.call(player, { type: 'init' }, state);
});
$(player).on('playbackstart.cordovaremote', onPlaybackStart)
.on('playbackstop.cordovaremote', onPlaybackStopped)
.on('playstatechange.cordovaremote', onStateChanged)
.on('positionchange.cordovaremote', onStateChanged);
}
document.addEventListener("deviceready", function () {
$(function () {
$(MediaController).on('playerchange', function () {
bindToPlayer(MediaController.getCurrentPlayer());
});
bindToPlayer(MediaController.getCurrentPlayer());
});
}, false);
})();