Revert "fixes after first senior review"

This reverts commit 250d85ddc7.
This commit is contained in:
kKaskak 2023-10-10 14:45:01 +03:00
parent 250d85ddc7
commit 379b35cd1c
11 changed files with 59 additions and 41 deletions

1
.gitignore vendored
View file

@ -4,4 +4,3 @@
/npm-debug.log /npm-debug.log
.DS_Store .DS_Store
.prettierignore .prettierignore
bun.lockb

View file

@ -24,7 +24,6 @@
--color-twitter: #1DA1F2; --color-twitter: #1DA1F2;
--color-imdb: #f5c518; --color-imdb: #f5c518;
--color-placeholder: #60606080; --color-placeholder: #60606080;
--color-released: #707070;
--color-placeholder-text: @color-surface-50; --color-placeholder-text: @color-surface-50;
--color-placeholder-background: @color-surface-dark5-20; --color-placeholder-background: @color-surface-dark5-20;
--primary-background-color: rgba(12, 11, 17, 1); --primary-background-color: rgba(12, 11, 17, 1);

View file

@ -30,15 +30,4 @@
color: var(--primary-foreground-color); color: var(--primary-foreground-color);
} }
} }
.uninstall-button {
background-color: rgba(72, 69, 114, 1);
&:hover {
outline: var(--focus-outline-size) solid rgba(72, 69, 114, 1);
background-color: transparent;
}
&:focus {
outline-color: var(--primary-foreground-color);
}
}
} }

View file

@ -195,12 +195,6 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
</div> </div>
<div className={styles['action-buttons-container']}> <div className={styles['action-buttons-container']}>
<div className={styles['action-button-wrapper']}> <div className={styles['action-button-wrapper']}>
{
typeof toggleInLibrary === 'function' && compact ?
<div className={styles['label']}>{inLibrary ? t('REMOVE_FROM_LIB') : t('ADD_TO_LIB')}</div>
:
null
}
{ {
typeof toggleInLibrary === 'function' ? typeof toggleInLibrary === 'function' ?
<ActionButton <ActionButton
@ -213,14 +207,14 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
: :
null null
} }
</div>
<div className={styles['action-button-wrapper']}>
{ {
typeof trailerHref === 'string' && compact ? typeof toggleInLibrary === 'function' && compact ?
<div className={styles['label']}>{t('WATCH_TRAILER')}</div> <div className={styles['label']}>{inLibrary ? t('REMOVE_FROM_LIB') : t('ADD_TO_LIB')}</div>
: :
null null
} }
</div>
<div className={styles['action-button-wrapper']}>
{ {
typeof trailerHref === 'string' ? typeof trailerHref === 'string' ?
<ActionButton <ActionButton
@ -233,11 +227,17 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
: :
null null
} }
{
typeof trailerHref === 'string' && compact ?
<div className={styles['label']}>{t('WATCH_TRAILER')}</div>
:
null
}
</div> </div>
{ {
typeof showHref === 'string' && compact ? typeof showHref === 'string' && compact ?
<ActionButton <ActionButton
className={classnames(styles['action-button'], styles['show-button'])} className={`${styles['action-button']} ${styles['show-button']}`}
icon={'play'} icon={'play'}
label={t('SHOW')} label={t('SHOW')}
tabIndex={compact ? -1 : 0} tabIndex={compact ? -1 : 0}

View file

@ -156,7 +156,6 @@
align-self: stretch; align-self: stretch;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: flex-end;
max-height: 10rem; max-height: 10rem;
padding-top: 2rem; padding-top: 2rem;
flex-wrap: wrap; flex-wrap: wrap;
@ -167,10 +166,9 @@
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
position: relative;
gap: 1rem 0;
.label { .label {
opacity: 0;
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
max-width: 6rem; max-width: 6rem;
text-align: center; text-align: center;

View file

@ -75,7 +75,7 @@ const ModalDialog = ({ className, title, buttons, children, dataset, onCloseRequ
Array.isArray(buttons) && buttons.length > 0 ? Array.isArray(buttons) && buttons.length > 0 ?
<div className={styles['buttons-container']}> <div className={styles['buttons-container']}>
{buttons.map(({ className, label, icon, props }, index) => ( {buttons.map(({ className, label, icon, props }, index) => (
<Button title={label} {...props} key={index} className={classnames(className, styles['action-button'])}> <Button title={label} {...props} key={index} className={classnames(className, label === 'Uninstall' ? styles['uninstall-button'] : styles['action-button'])}>
{ {
typeof icon === 'string' && icon.length > 0 ? typeof icon === 'string' && icon.length > 0 ?
<Icon className={styles['icon']} name={icon} /> <Icon className={styles['icon']} name={icon} />

View file

@ -64,7 +64,7 @@
flex: 1; flex: 1;
align-self: stretch; align-self: stretch;
overflow-y: auto; overflow-y: auto;
padding: 2rem 0; padding: 32px 0;
&:last-child { &:last-child {
margin-bottom: 2rem; margin-bottom: 2rem;
@ -84,7 +84,7 @@
} }
} }
} }
.action-button { .base-button() {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -93,11 +93,9 @@
height: 3.5rem; height: 3.5rem;
border-radius: 3.5rem; border-radius: 3.5rem;
padding: 1.2rem; padding: 1.2rem;
background-color: var(--secondary-accent-color);
&:hover { &:hover {
background-color: transparent; background-color: transparent;
outline: var(--focus-outline-size) solid var(--secondary-accent-color);
} }
&:focus { &:focus {
@ -126,7 +124,24 @@
text-align: center; text-align: center;
color: var(--primary-foreground-color); color: var(--primary-foreground-color);
} }
}
.uninstall-button {
.base-button();
background-color: rgba(72, 69, 114, 1);
&:hover {
outline: var(--focus-outline-size) solid rgba(72, 69, 114, 1);
}
}
.action-button {
.base-button();
background-color: var(--secondary-accent-color);
&:hover {
outline: var(--focus-outline-size) solid var(--secondary-accent-color);
}
} }
@media only screen and (max-width: @minimum) { @media only screen and (max-width: @minimum) {

View file

@ -83,7 +83,7 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio
<Button href={href} download={forceDownload} {...props} onClick={onClick} className={classnames(className, styles['stream-container'])} title={addonName}> <Button href={href} download={forceDownload} {...props} onClick={onClick} className={classnames(className, styles['stream-container'])} title={addonName}>
{ {
typeof thumbnail === 'string' && thumbnail.length > 0 ? typeof thumbnail === 'string' && thumbnail.length > 0 ?
<div className={styles['thumbnail-container']} title={name || addonName}> <div className={styles['thumbnail-container']} title={name?.replace(/\|/g, '') || addonName?.replace(/\|/g, '')}>
<Image <Image
className={styles['thumbnail']} className={styles['thumbnail']}
src={thumbnail} src={thumbnail}
@ -92,8 +92,8 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio
/> />
</div> </div>
: :
<div className={styles['addon-name-container']} title={name || addonName}> <div className={styles['addon-name-container']} title={name?.replace(/\|/g, '') || addonName?.replace(/\|/g, '')}>
<div className={styles['addon-name']}>{name || addonName}</div> <div className={styles['addon-name']}>{name?.replace(/\|/g, '') || addonName?.replace(/\|/g, '')}</div>
</div> </div>
} }
{ {

View file

@ -3,6 +3,11 @@
@import (reference) '~@stremio/stremio-colors/less/stremio-colors.less'; @import (reference) '~@stremio/stremio-colors/less/stremio-colors.less';
@import (reference) '~stremio/common/screen-sizes.less'; @import (reference) '~stremio/common/screen-sizes.less';
:import('~stremio/common/PlayIconCircleCentered/styles.less') {
play-icon-circle-centered-background: background;
play-icon-circle-centered-icon: icon;
}
.stream-container { .stream-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -17,8 +22,16 @@
} }
&:hover, &:focus, &:global(.selected) { &:hover, &:focus, &:global(.selected) {
.icon { .play-icon {
opacity: 1; opacity: 1;
.play-icon-circle-centered-background {
fill: var(--secondary-accent-color);
}
.play-icon-circle-centered-icon {
fill: var(--primary-foreground-color);
}
} }
} }
@ -57,7 +70,6 @@
flex: 1; flex: 1;
max-height: 3.6em; max-height: 3.6em;
padding: 0 0.5rem 0 1.5rem; padding: 0 0.5rem 0 1.5rem;
opacity: 0.6;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
@ -89,7 +101,6 @@
height: 3rem; height: 3rem;
padding: 0.7rem; padding: 0.7rem;
border-radius: 50%; border-radius: 50%;
opacity: 0;
color: var(--primary-foreground-color); color: var(--primary-foreground-color);
background-color: var(--secondary-accent-color); background-color: var(--secondary-accent-color);
} }
@ -112,5 +123,11 @@
font-weight: 500; font-weight: 500;
} }
} }
.play-icon {
.play-icon-circle-centered-icon {
fill: var(--primary-foreground-color);
}
}
} }
} }

View file

@ -102,7 +102,8 @@ const StreamsList = ({ className, video, ...props }) => {
<Icon className={styles['icon']} name={'chevron-back'} /> <Icon className={styles['icon']} name={'chevron-back'} />
</Button> </Button>
<div className={styles['episode-title']}> <div className={styles['episode-title']}>
{`S${video?.season}E${video?.episode} ${(video?.title)}`} {`S${video?.season}E${video?.episode} ${(video?.title)?.toLowerCase()?.replace(/\b\w/g, (char) => char.toUpperCase())}
`}
</div> </div>
</React.Fragment> </React.Fragment>
) )

View file

@ -84,7 +84,7 @@
font-weight: 500; font-weight: 500;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
color: var(--color-released); color: #707070;
opacity: 0.9; opacity: 0.9;
} }