mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Improve Up Next dialog
This commit is contained in:
parent
6d5ed18386
commit
3f59288158
4 changed files with 44 additions and 55 deletions
|
@ -6,18 +6,29 @@
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.osdPoster img,
|
|
||||||
.videoOsdBottom {
|
.videoOsdBottom {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
position: fixed;
|
||||||
|
background: linear-gradient(0deg, rgba(16, 16, 16, 0.6) 0%, rgba(16, 16, 16, 0) 100%);
|
||||||
|
padding-top: 7.5em;
|
||||||
|
padding-bottom: 1.75em;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
will-change: opacity;
|
||||||
|
transition: opacity 0.3s ease-out;
|
||||||
|
color: #fff;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-touch-callout: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.osdHeader {
|
.osdHeader {
|
||||||
transition: opacity 0.3s ease-out;
|
transition: opacity 0.3s ease-out;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background: linear-gradient(180deg, rgba(16, 16 16, 0.75) 0%, rgba(16, 16, 16, 0.15) 80%, rgba(16, 16, 16, 0) 100%);
|
background: linear-gradient(180deg, rgba(16, 16, 16, 0.6) 0%, rgba(16, 16, 16, 0) 100%);
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
color: #eee;
|
color: #eee;
|
||||||
height: 7.5em;
|
height: 7.5em;
|
||||||
|
@ -88,21 +99,6 @@
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.videoOsdBottom {
|
|
||||||
position: fixed;
|
|
||||||
background: linear-gradient(0deg, rgba(16, 16, 16, 0.75) 0%, rgba(16, 16, 16, 0.15) 80%, rgba(16, 16, 16, 0) 100%);
|
|
||||||
padding-top: 10em;
|
|
||||||
padding-bottom: 1.75em;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
will-change: opacity;
|
|
||||||
transition: opacity 0.3s ease-out;
|
|
||||||
color: #fff;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-touch-callout: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.videoOsdBottom-hidden {
|
.videoOsdBottom-hidden {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
@ -157,27 +153,6 @@
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.osdPoster {
|
|
||||||
width: 10%;
|
|
||||||
position: relative;
|
|
||||||
margin-right: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.osdPoster img {
|
|
||||||
position: absolute;
|
|
||||||
height: auto;
|
|
||||||
width: 100%;
|
|
||||||
-webkit-box-shadow: 0 0 1.9vh #000;
|
|
||||||
box-shadow: 0 0 1.9vh #000;
|
|
||||||
border: 0.08em solid #222;
|
|
||||||
user-drag: none;
|
|
||||||
user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.osdTitle,
|
.osdTitle,
|
||||||
.osdTitleSmall {
|
.osdTitleSmall {
|
||||||
margin: 0 1em 0 0;
|
margin: 0 1em 0 0;
|
||||||
|
|
|
@ -100,11 +100,10 @@ import 'emby-button';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMediaInfoHtml(item, options) {
|
export function getMediaInfoHtml(item, options = {}) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
const miscInfo = [];
|
const miscInfo = [];
|
||||||
options = options || {};
|
|
||||||
let text;
|
let text;
|
||||||
let date;
|
let date;
|
||||||
let minutes;
|
let minutes;
|
||||||
|
@ -289,7 +288,9 @@ import 'emby-button';
|
||||||
return getMediaInfoItem(m);
|
return getMediaInfoItem(m);
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
html += getStarIconsHtml(item);
|
if (options.starRating !== false) {
|
||||||
|
html += getStarIconsHtml(item);
|
||||||
|
}
|
||||||
|
|
||||||
if (item.HasSubtitles && options.subtitles !== false) {
|
if (item.HasSubtitles && options.subtitles !== false) {
|
||||||
html += '<div class="mediaInfoItem mediaInfoText closedCaptionMediaInfoText">CC</div>';
|
html += '<div class="mediaInfoItem mediaInfoText closedCaptionMediaInfoText">CC</div>';
|
||||||
|
@ -418,9 +419,8 @@ import 'emby-button';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPrimaryMediaInfoHtml(item, options) {
|
export function getPrimaryMediaInfoHtml(item, options = {}) {
|
||||||
options = options || {};
|
if (options.interactive === undefined) {
|
||||||
if (options.interactive == null) {
|
|
||||||
options.interactive = false;
|
options.interactive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,24 @@
|
||||||
.upNextDialog {
|
.upNextContainer {
|
||||||
width: 30vw;
|
box-sizing: border-box;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: auto;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
padding: 1em;
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
|
width: calc(100vh * (16 / 9));
|
||||||
|
height: 100vh;
|
||||||
|
justify-content: end;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upNextDialog-container {
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 30em;
|
||||||
|
height: 11em;
|
||||||
|
left: auto;
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
@ -17,9 +17,7 @@ import 'flexStyles';
|
||||||
function getHtml() {
|
function getHtml() {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<div class="upNextDialog-poster">';
|
html += '<div class="upNextDialog-container">';
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '<div class="flex flex-direction-column flex-grow">';
|
html += '<div class="flex flex-direction-column flex-grow">';
|
||||||
|
|
||||||
html += '<h2 class="upNextDialog-nextVideoText" style="margin:.25em 0;"> </h2>';
|
html += '<h2 class="upNextDialog-nextVideoText" style="margin:.25em 0;"> </h2>';
|
||||||
|
@ -29,8 +27,6 @@ import 'flexStyles';
|
||||||
html += '<div class="flex flex-direction-row upNextDialog-mediainfo">';
|
html += '<div class="flex flex-direction-row upNextDialog-mediainfo">';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="upNextDialog-overview" style="margin-top:1em;"></div>';
|
|
||||||
|
|
||||||
html += '<div class="flex flex-direction-row upNextDialog-buttons" style="margin-top:1em;">';
|
html += '<div class="flex flex-direction-row upNextDialog-buttons" style="margin-top:1em;">';
|
||||||
|
|
||||||
html += '<button type="button" is="emby-button" class="raised raised-mini btnStartNow upNextDialog-button">';
|
html += '<button type="button" is="emby-button" class="raised raised-mini btnStartNow upNextDialog-button">';
|
||||||
|
@ -46,6 +42,7 @@ import 'flexStyles';
|
||||||
|
|
||||||
// main
|
// main
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -73,9 +70,11 @@ import 'flexStyles';
|
||||||
|
|
||||||
const elem = instance.options.parent;
|
const elem = instance.options.parent;
|
||||||
|
|
||||||
elem.querySelector('.upNextDialog-overview').innerHTML = item.Overview || '';
|
|
||||||
|
|
||||||
elem.querySelector('.upNextDialog-mediainfo').innerHTML = mediaInfo.getPrimaryMediaInfoHtml(item, {
|
elem.querySelector('.upNextDialog-mediainfo').innerHTML = mediaInfo.getPrimaryMediaInfoHtml(item, {
|
||||||
|
criticRating: false,
|
||||||
|
originalAirDate: false,
|
||||||
|
starRating: false,
|
||||||
|
subtitles: false
|
||||||
});
|
});
|
||||||
|
|
||||||
let title = itemHelper.getDisplayName(item);
|
let title = itemHelper.getDisplayName(item);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue