mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Showing favorite label on favorite videos.
This commit is contained in:
parent
e485b8ff0b
commit
79a080ec6c
1 changed files with 11 additions and 2 deletions
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue