Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Sep 15, 2024
1 parent d0a3396 commit c188dd9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/media/RatingsRotator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Rating {
votes: number;
}

const starClasses = "fill-muted stroke-muted-foreground size-6";
const starClasses = "fill-muted stroke-muted-foreground size-6 opacity-50";

const RatingsRotator: React.FC<{ ratings: Rating[] }> = ({ ratings }) => {
const [currentIndex, setCurrentIndex] = useState(0);
Expand Down Expand Up @@ -97,7 +97,7 @@ const RatingsRotator: React.FC<{ ratings: Rating[] }> = ({ ratings }) => {
transition={{ duration: 0.5 }}
className="flex flex-col items-center justify-center gap-2"
>
<div className="flex">
<div className="flex gap-2">
{getStarIcons(starCount)}
</div>
<p className="flex items-center justify-center gap-2">
Expand Down
18 changes: 13 additions & 5 deletions src/renderer/windows/main/pages/Media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import RatingsRotator from '@/renderer/components/media/RatingsRotator';
import TrailerRotator from '@/renderer/components/media/TrailerRotator';
import { useLibraryContext } from '@/renderer/context/library-context';
import styles from '@/renderer/styles/effects.module.scss';
import { Link2Icon } from 'lucide-react';

type Props = {};

Expand Down Expand Up @@ -198,14 +199,21 @@ export function Media(_props: Props) {

</div>
<div className="flex flex-col gap-4 mt-6">
{trailer && (
<Button size="lg" onClick={() => handleUrl(trailerUrl)}>
<Button size="lg" onClick={handlePlay}>
Play Movie
</Button>
<div className="flex gap-4">
{trailer && (
<Button className="flex-1" size="lg" variant="outline" onClick={() => handleUrl(trailerUrl)}>
Watch Trailer
</Button>
)}
<Button size="lg" variant="outline" onClick={handlePlay}>
Play Movie
</Button>
{omdb?.imdbid && (
<Button className={trailer ? "" : "flex-1"} size="lg" variant="outline" onClick={() => handleUrl(`https://www.imdb.com/title/${omdb?.imdbid}`)}>
<Link2Icon className="mr-2 h-4 w-4" /> IMDB
</Button>
)}
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit c188dd9

Please sign in to comment.