|
|
@ -27,7 +27,6 @@ import { useToasts } from 'react-toast-notifications';
|
|
|
|
import RequestModal from '../../RequestModal';
|
|
|
|
import RequestModal from '../../RequestModal';
|
|
|
|
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
const messages = defineMessages({
|
|
|
|
requestedby: 'Requested by {username}',
|
|
|
|
|
|
|
|
seasons: 'Seasons',
|
|
|
|
seasons: 'Seasons',
|
|
|
|
notavailable: 'N/A',
|
|
|
|
notavailable: 'N/A',
|
|
|
|
failedretry: 'Something went wrong while retrying the request.',
|
|
|
|
failedretry: 'Something went wrong while retrying the request.',
|
|
|
@ -163,10 +162,15 @@ const RequestItem: React.FC<RequestItemProps> = ({
|
|
|
|
{isMovie(title) ? title.title : title.name}
|
|
|
|
{isMovie(title) ? title.title : title.name}
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
<div className="text-sm">
|
|
|
|
<div className="flex items-center">
|
|
|
|
{intl.formatMessage(messages.requestedby, {
|
|
|
|
<img
|
|
|
|
username: requestData.requestedBy.displayName,
|
|
|
|
src={requestData.requestedBy.avatar}
|
|
|
|
})}
|
|
|
|
alt=""
|
|
|
|
|
|
|
|
className="w-5 mr-2 rounded-full"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<span className="text-sm">
|
|
|
|
|
|
|
|
{requestData.requestedBy.displayName}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{requestData.seasons.length > 0 && (
|
|
|
|
{requestData.seasons.length > 0 && (
|
|
|
|
<div className="items-center hidden mt-2 text-sm sm:flex">
|
|
|
|
<div className="items-center hidden mt-2 text-sm sm:flex">
|
|
|
@ -216,18 +220,24 @@ const RequestItem: React.FC<RequestItemProps> = ({
|
|
|
|
<div className="flex flex-col">
|
|
|
|
<div className="flex flex-col">
|
|
|
|
{requestData.modifiedBy ? (
|
|
|
|
{requestData.modifiedBy ? (
|
|
|
|
<span className="text-sm text-gray-300">
|
|
|
|
<span className="text-sm text-gray-300">
|
|
|
|
<span className="mr-1">{requestData.modifiedBy.displayName}</span>
|
|
|
|
<div className="flex items-center">
|
|
|
|
<span>
|
|
|
|
<img
|
|
|
|
(
|
|
|
|
src={requestData.modifiedBy.avatar}
|
|
|
|
<FormattedRelativeTime
|
|
|
|
alt=""
|
|
|
|
value={Math.floor(
|
|
|
|
className="w-5 mr-2 rounded-full"
|
|
|
|
(new Date(requestData.updatedAt).getTime() - Date.now()) /
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
updateIntervalInSeconds={1}
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
<span className="text-sm">
|
|
|
|
</span>
|
|
|
|
{requestData.modifiedBy.displayName} (
|
|
|
|
|
|
|
|
<FormattedRelativeTime
|
|
|
|
|
|
|
|
value={Math.floor(
|
|
|
|
|
|
|
|
(new Date(requestData.updatedAt).getTime() - Date.now()) /
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
updateIntervalInSeconds={1}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
<span className="text-sm text-gray-300">N/A</span>
|
|
|
|
<span className="text-sm text-gray-300">N/A</span>
|
|
|
|