mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
beta fixes
This commit is contained in:
parent
9e9ffda3e6
commit
bdc8187420
13 changed files with 203 additions and 18 deletions
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
|
||||
.largeCardMargin .cardBox {
|
||||
margin: 7px;
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
/*@media all and (max-width: 600px) {
|
||||
|
@ -174,6 +174,15 @@
|
|||
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 {
|
||||
right: 0;
|
||||
}
|
||||
|
|
|
@ -940,6 +940,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
color: #fff;
|
||||
background: rgb(51, 136, 204);
|
||||
background: rgba(51, 136, 204, .9);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.unidentifiedIndicator {
|
||||
|
|
|
@ -130,6 +130,10 @@ h1 a:hover {
|
|||
font-weight: 400;
|
||||
}
|
||||
|
||||
.ui-listview > .ui-li-divider {
|
||||
line-height: 1.5;
|
||||
line-height: initial;
|
||||
}
|
||||
/*
|
||||
Make all panels vertically scrollable
|
||||
If this causes any problems then perhaps require a css class to activate
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
items: result.Items,
|
||||
preferThumb: true,
|
||||
shape: 'backdrop',
|
||||
overlayText: true,
|
||||
overlayText: screenWidth >= 600 && !AppInfo.hasLowImageBandwidth,
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
context: 'home',
|
||||
|
|
|
@ -1407,7 +1407,7 @@
|
|||
cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key);
|
||||
}
|
||||
|
||||
if (options.showChildCountIndicator && item.ChildCount) {
|
||||
if (options.showChildCountIndicator && item.ChildCount && options.showLatestItemsPopup !== false) {
|
||||
cssClass += ' groupedCard';
|
||||
}
|
||||
|
||||
|
@ -1513,7 +1513,7 @@
|
|||
footerOverlayed = true;
|
||||
}
|
||||
else if (progressHtml) {
|
||||
html += '<div class="cardFooter">';
|
||||
html += '<div class="cardFooter fullCardFooter lightCardFooter">';
|
||||
html += "<div class='cardProgress cardText'>";
|
||||
html += progressHtml;
|
||||
html += "</div>";
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
items: items,
|
||||
showUnplayedIndicator: false,
|
||||
showChildCountIndicator: true,
|
||||
showLatestItemsPopup: false,
|
||||
shape: "square",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
html += '<div class="cardImage" style="text-align:center;">';
|
||||
|
||||
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>";
|
||||
|
@ -302,7 +302,7 @@
|
|||
html += '<a class="cardContent" href="' + href + '">';
|
||||
|
||||
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>";
|
||||
|
||||
// cardContent
|
||||
|
|
|
@ -1395,7 +1395,7 @@ var Dashboard = {
|
|||
name = "Internet Explorer";
|
||||
} else if ($.browser.opera) {
|
||||
name = "Opera";
|
||||
} else if ($.browser.firefox || $.browser.mozilla) {
|
||||
} else if ($.browser.mozilla) {
|
||||
name = "Firefox";
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@
|
|||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
viewButton: true,
|
||||
showLimit: false
|
||||
showLimit: false,
|
||||
updatePageSizeSetting: false
|
||||
});
|
||||
|
||||
$('.listTopPaging', page).html(pagingHtml).trigger('create');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(function ($, document) {
|
||||
|
||||
var view = LibraryBrowser.getDefaultItemsView('Thumb', 'Thumb');
|
||||
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
|
15
dashboard-ui/thirdparty/browser.js
vendored
15
dashboard-ui/thirdparty/browser.js
vendored
|
@ -909,7 +909,6 @@
|
|||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(safari)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
@ -950,22 +949,22 @@
|
|||
browser[matched.platform] = true;
|
||||
}
|
||||
|
||||
if (browser.webkit && !browser.chrome) {
|
||||
if (userAgent.toLowerCase().indexOf("webkit") != -1 && !browser.chrome && !browser.msie) {
|
||||
browser.safari = true;
|
||||
}
|
||||
|
||||
// Chrome is Webkit, but Webkit is also Safari.
|
||||
if (browser.chrome || browser.safari) {
|
||||
browser.webkit = true;
|
||||
}
|
||||
|
||||
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) {
|
||||
browser.tv = true;
|
||||
}
|
||||
|
||||
jQuery.browser = browser;
|
||||
|
||||
})(jQuery, window);
|
||||
|
|
170
dashboard-ui/thirdparty/cordova/remotecontrols.js
vendored
Normal file
170
dashboard-ui/thirdparty/cordova/remotecontrols.js
vendored
Normal 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);
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue