mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 19:02:15 +00:00
video moved
This commit is contained in:
parent
582c9ecbbe
commit
f863b5a0b9
3 changed files with 10 additions and 7 deletions
|
|
@ -22,13 +22,13 @@ const renderPoster = (poster) => {
|
|||
);
|
||||
}
|
||||
|
||||
const renderTitle = (number, title) => {
|
||||
const renderTitle = (episode, title) => {
|
||||
if (title.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles['title']}>{number}. {title.length > MAX_TITLE_SYMBOLS ? title.slice(0, MAX_TITLE_SYMBOLS) + '...' : title}</div>
|
||||
<div className={styles['title']}>{episode}. {title.length > MAX_TITLE_SYMBOLS ? title.slice(0, MAX_TITLE_SYMBOLS) + '...' : title}</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ const Video = (props) => {
|
|||
<div className={styles['flex-row-container']}>
|
||||
{renderPoster(props.poster)}
|
||||
<div className={styles['info-container']}>
|
||||
{renderTitle(props.number, props.title)}
|
||||
{renderTitle(props.episode, props.title)}
|
||||
{renderReleasedDate(props.released)}
|
||||
{renderLabels(props.isUpcoming, props.isWatched)}
|
||||
</div>
|
||||
|
|
@ -111,7 +111,7 @@ const Video = (props) => {
|
|||
Video.propTypes = {
|
||||
className: PropTypes.string,
|
||||
poster: PropTypes.string.isRequired,
|
||||
number: PropTypes.number.isRequired,
|
||||
episode: PropTypes.number.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
released: PropTypes.instanceOf(Date).isRequired,
|
||||
isWatched: PropTypes.bool.isRequired,
|
||||
|
|
@ -121,7 +121,7 @@ Video.propTypes = {
|
|||
};
|
||||
Video.defaultProps = {
|
||||
poster: '',
|
||||
number: 0,
|
||||
episode: 0,
|
||||
title: '',
|
||||
released: new Date(''), //Invalid Date
|
||||
isWatched: false,
|
||||
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
.upcoming-label, .watched-label {
|
||||
font-size: 10px;
|
||||
line-height: 15px;
|
||||
border-width: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
|
|
@ -84,15 +86,16 @@
|
|||
.upcoming-label, .watched-label {
|
||||
padding: 0 0.6em;
|
||||
font-weight: 600;
|
||||
border-style: solid;
|
||||
color: @colorwhite;
|
||||
}
|
||||
|
||||
.upcoming-label {
|
||||
background-color: @colorsignal5;
|
||||
border-color: @colorsignal5;
|
||||
}
|
||||
|
||||
.watched-label {
|
||||
background-color: @colorprimlight;
|
||||
border-color: @colorprimlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue