Showing favorite label on favorite videos.

This commit is contained in:
Roland 2022-01-03 16:32:41 -07:00
parent e485b8ff0b
commit 79a080ec6c
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -100,10 +100,19 @@ export function VideoCard({video}) {
}
let poster_url = video.poster_path ? `/media/${encodeURIComponent(video.poster_path)}` : null;
let imageLabel = null;
if (video.favorite) {
imageLabel = {as: 'a', corner: 'left', icon: 'heart', color: 'green'};
}
return (
<Card>
<Link to={video_url}>
<Image src={poster_url} wrapped style={{position: 'relative', width: '100%'}}/>
<Image wrapped
src={poster_url}
label={imageLabel}
style={{position: 'relative', width: '100%'}}
/>
</Link>
<Duration video={video}/>
<Card.Content>
@ -501,7 +510,7 @@ export function ClearButton({onClick, style, label, icon = 'close'}) {
</Button>
}
export function SearchInput({initValue, onSubmit, size, placeholder='Search...'}) {
export function SearchInput({initValue, onSubmit, size, placeholder = 'Search...'}) {
let [value, setValue] = useState(initValue || '');
size = size || 'small';