mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
refactor(ui): add icons to PlayButton dropdown (#1457)
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { PlayIcon } from '@heroicons/react/outline';
|
import React, { ReactNode } from 'react';
|
||||||
import React from 'react';
|
|
||||||
import ButtonWithDropdown from '../ButtonWithDropdown';
|
import ButtonWithDropdown from '../ButtonWithDropdown';
|
||||||
|
|
||||||
interface PlayButtonProps {
|
interface PlayButtonProps {
|
||||||
@@ -9,6 +8,7 @@ interface PlayButtonProps {
|
|||||||
export interface PlayButtonLink {
|
export interface PlayButtonLink {
|
||||||
text: string;
|
text: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
svg: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PlayButton: React.FC<PlayButtonProps> = ({ links }) => {
|
const PlayButton: React.FC<PlayButtonProps> = ({ links }) => {
|
||||||
@@ -21,8 +21,8 @@ const PlayButton: React.FC<PlayButtonProps> = ({ links }) => {
|
|||||||
buttonType="ghost"
|
buttonType="ghost"
|
||||||
text={
|
text={
|
||||||
<>
|
<>
|
||||||
<PlayIcon className="w-5 h-5 mr-1" />
|
{links[0].svg}
|
||||||
<span>{links[0].text}</span>
|
{links[0].text}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -39,6 +39,7 @@ const PlayButton: React.FC<PlayButtonProps> = ({ links }) => {
|
|||||||
}}
|
}}
|
||||||
buttonType="ghost"
|
buttonType="ghost"
|
||||||
>
|
>
|
||||||
|
{link.svg}
|
||||||
{link.text}
|
{link.text}
|
||||||
</ButtonWithDropdown.Item>
|
</ButtonWithDropdown.Item>
|
||||||
);
|
);
|
||||||
|
@@ -1,4 +1,9 @@
|
|||||||
import { ArrowCircleRightIcon, CogIcon } from '@heroicons/react/outline';
|
import {
|
||||||
|
ArrowCircleRightIcon,
|
||||||
|
CogIcon,
|
||||||
|
FilmIcon,
|
||||||
|
PlayIcon,
|
||||||
|
} from '@heroicons/react/outline';
|
||||||
import {
|
import {
|
||||||
CheckCircleIcon,
|
CheckCircleIcon,
|
||||||
DocumentRemoveIcon,
|
DocumentRemoveIcon,
|
||||||
@@ -111,6 +116,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
mediaLinks.push({
|
mediaLinks.push({
|
||||||
text: intl.formatMessage(messages.playonplex),
|
text: intl.formatMessage(messages.playonplex),
|
||||||
url: data.mediaInfo?.plexUrl,
|
url: data.mediaInfo?.plexUrl,
|
||||||
|
svg: <PlayIcon className="w-5 h-5 mr-1" />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +129,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
mediaLinks.push({
|
mediaLinks.push({
|
||||||
text: intl.formatMessage(messages.play4konplex),
|
text: intl.formatMessage(messages.play4konplex),
|
||||||
url: data.mediaInfo?.plexUrl4k,
|
url: data.mediaInfo?.plexUrl4k,
|
||||||
|
svg: <PlayIcon className="w-5 h-5 mr-1" />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +142,7 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
mediaLinks.push({
|
mediaLinks.push({
|
||||||
text: intl.formatMessage(messages.watchtrailer),
|
text: intl.formatMessage(messages.watchtrailer),
|
||||||
url: trailerUrl,
|
url: trailerUrl,
|
||||||
|
svg: <FilmIcon className="w-5 h-5 mr-1" />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,9 @@
|
|||||||
import { ArrowCircleRightIcon, CogIcon } from '@heroicons/react/outline';
|
import {
|
||||||
|
ArrowCircleRightIcon,
|
||||||
|
CogIcon,
|
||||||
|
FilmIcon,
|
||||||
|
PlayIcon,
|
||||||
|
} from '@heroicons/react/outline';
|
||||||
import {
|
import {
|
||||||
CheckCircleIcon,
|
CheckCircleIcon,
|
||||||
DocumentRemoveIcon,
|
DocumentRemoveIcon,
|
||||||
@@ -119,6 +124,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
mediaLinks.push({
|
mediaLinks.push({
|
||||||
text: intl.formatMessage(messages.playonplex),
|
text: intl.formatMessage(messages.playonplex),
|
||||||
url: data.mediaInfo?.plexUrl,
|
url: data.mediaInfo?.plexUrl,
|
||||||
|
svg: <PlayIcon className="w-5 h-5 mr-1" />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,6 +137,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
mediaLinks.push({
|
mediaLinks.push({
|
||||||
text: intl.formatMessage(messages.play4konplex),
|
text: intl.formatMessage(messages.play4konplex),
|
||||||
url: data.mediaInfo?.plexUrl4k,
|
url: data.mediaInfo?.plexUrl4k,
|
||||||
|
svg: <PlayIcon className="w-5 h-5 mr-1" />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,6 +150,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
mediaLinks.push({
|
mediaLinks.push({
|
||||||
text: intl.formatMessage(messages.watchtrailer),
|
text: intl.formatMessage(messages.watchtrailer),
|
||||||
url: trailerUrl,
|
url: trailerUrl,
|
||||||
|
svg: <FilmIcon className="w-5 h-5 mr-1" />,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user