mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(frontend): fix button styling on details page on small screen sizes
This commit is contained in:
@@ -54,7 +54,7 @@ const ButtonWithDropdown: React.FC<ButtonWithDropdownProps> = ({
|
|||||||
{children && (
|
{children && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="relative inline-flex items-center px-2 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-700 border border-indigo-600 rounded-r-md hover:bg-indigo-500 focus:z-10 focus:outline-none active:bg-indigo-700 focus:ring-blue"
|
className="relative inline-flex items-center h-full px-2 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-700 border border-indigo-600 rounded-r-md hover:bg-indigo-500 focus:z-10 focus:outline-none active:bg-indigo-700 focus:ring-blue"
|
||||||
aria-label="Expand"
|
aria-label="Expand"
|
||||||
onClick={() => setIsOpen((state) => !state)}
|
onClick={() => setIsOpen((state) => !state)}
|
||||||
>
|
>
|
||||||
|
@@ -33,7 +33,7 @@ import Head from 'next/head';
|
|||||||
import ExternalLinkBlock from '../ExternalLinkBlock';
|
import ExternalLinkBlock from '../ExternalLinkBlock';
|
||||||
import { sortCrewPriority } from '../../utils/creditHelpers';
|
import { sortCrewPriority } from '../../utils/creditHelpers';
|
||||||
import StatusBadge from '../StatusBadge';
|
import StatusBadge from '../StatusBadge';
|
||||||
import RequestButton from './RequestButton';
|
import RequestButton from '../RequestButton';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
releasedate: 'Release Date',
|
releasedate: 'Release Date',
|
||||||
@@ -212,9 +212,14 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
{data.genres.map((g) => g.name).join(', ')}
|
{data.genres.map((g) => g.name).join(', ')}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="relative z-10 flex justify-end flex-shrink-0 mt-4 lg:mt-0">
|
<div className="relative z-10 flex flex-wrap justify-center flex-shrink-0 mt-4 sm:justify-end sm:flex-nowrap lg:mt-0">
|
||||||
{trailerUrl && (
|
{trailerUrl && (
|
||||||
<a href={trailerUrl} target={'_blank'} rel="noreferrer">
|
<a
|
||||||
|
href={trailerUrl}
|
||||||
|
target={'_blank'}
|
||||||
|
rel="noreferrer"
|
||||||
|
className="mb-3 sm:mb-0"
|
||||||
|
>
|
||||||
<Button buttonType="ghost">
|
<Button buttonType="ghost">
|
||||||
<svg
|
<svg
|
||||||
className="w-5 h-5 mr-1"
|
className="w-5 h-5 mr-1"
|
||||||
@@ -240,16 +245,18 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
|
<div className="mb-3 sm:mb-0">
|
||||||
<RequestButton
|
<RequestButton
|
||||||
mediaType="movie"
|
mediaType="movie"
|
||||||
media={data.mediaInfo}
|
media={data.mediaInfo}
|
||||||
tmdbId={data.id}
|
tmdbId={data.id}
|
||||||
onUpdate={() => revalidate()}
|
onUpdate={() => revalidate()}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{hasPermission(Permission.MANAGE_REQUESTS) && (
|
{hasPermission(Permission.MANAGE_REQUESTS) && (
|
||||||
<Button
|
<Button
|
||||||
buttonType="default"
|
buttonType="default"
|
||||||
className="ml-2 first:ml-0"
|
className="mb-3 ml-2 first:ml-0 sm:mb-0"
|
||||||
onClick={() => setShowManager(true)}
|
onClick={() => setShowManager(true)}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
@@ -4,13 +4,13 @@ import { defineMessages, useIntl } from 'react-intl';
|
|||||||
import {
|
import {
|
||||||
MediaRequestStatus,
|
MediaRequestStatus,
|
||||||
MediaStatus,
|
MediaStatus,
|
||||||
} from '../../../../server/constants/media';
|
} from '../../../server/constants/media';
|
||||||
import Media from '../../../../server/entity/Media';
|
import Media from '../../../server/entity/Media';
|
||||||
import { MediaRequest } from '../../../../server/entity/MediaRequest';
|
import { MediaRequest } from '../../../server/entity/MediaRequest';
|
||||||
import { SettingsContext } from '../../../context/SettingsContext';
|
import { SettingsContext } from '../../context/SettingsContext';
|
||||||
import { Permission, useUser } from '../../../hooks/useUser';
|
import { Permission, useUser } from '../../hooks/useUser';
|
||||||
import ButtonWithDropdown from '../../Common/ButtonWithDropdown';
|
import ButtonWithDropdown from '../Common/ButtonWithDropdown';
|
||||||
import RequestModal from '../../RequestModal';
|
import RequestModal from '../RequestModal';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
viewrequest: 'View Request',
|
viewrequest: 'View Request',
|
||||||
@@ -555,25 +555,6 @@ const RequestButton: React.FC<RequestButtonProps> = ({
|
|||||||
</ButtonWithDropdown.Item>
|
</ButtonWithDropdown.Item>
|
||||||
))
|
))
|
||||||
: null}
|
: null}
|
||||||
{/* {hasPermission(Permission.MANAGE_REQUESTS) && (
|
|
||||||
<>
|
|
||||||
<ButtonWithDropdown.Item onClick={() => modifyRequest('approve')}>
|
|
||||||
<svg
|
|
||||||
className="w-4 mr-1"
|
|
||||||
fill="currentColor"
|
|
||||||
viewBox="0 0 20 20"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
fillRule="evenodd"
|
|
||||||
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
|
||||||
clipRule="evenodd"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
{intl.formatMessage(messages.approve)}
|
|
||||||
</ButtonWithDropdown.Item>
|
|
||||||
</>
|
|
||||||
)} */}
|
|
||||||
</ButtonWithDropdown>
|
</ButtonWithDropdown>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
@@ -35,7 +35,7 @@ import ExternalLinkBlock from '../ExternalLinkBlock';
|
|||||||
import { sortCrewPriority } from '../../utils/creditHelpers';
|
import { sortCrewPriority } from '../../utils/creditHelpers';
|
||||||
import { Crew } from '../../../server/models/common';
|
import { Crew } from '../../../server/models/common';
|
||||||
import StatusBadge from '../StatusBadge';
|
import StatusBadge from '../StatusBadge';
|
||||||
import RequestButton from '../MovieDetails/RequestButton';
|
import RequestButton from '../RequestButton';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
firstAirDate: 'First Air Date',
|
firstAirDate: 'First Air Date',
|
||||||
@@ -234,9 +234,14 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
{data.genres.map((g) => g.name).join(', ')}
|
{data.genres.map((g) => g.name).join(', ')}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-end flex-shrink-0 mt-4 lg:mt-0">
|
<div className="flex flex-wrap justify-center flex-shrink-0 mt-4 sm:flex-nowrap sm:justify-end lg:mt-0">
|
||||||
{trailerUrl && (
|
{trailerUrl && (
|
||||||
<a href={trailerUrl} target="_blank" rel="noreferrer">
|
<a
|
||||||
|
href={trailerUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
className="mb-3 sm:mb-0"
|
||||||
|
>
|
||||||
<Button buttonType="ghost">
|
<Button buttonType="ghost">
|
||||||
<svg
|
<svg
|
||||||
className="w-5 h-5 mr-1"
|
className="w-5 h-5 mr-1"
|
||||||
@@ -262,6 +267,7 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</a>
|
</a>
|
||||||
)}
|
)}
|
||||||
|
<div className="mb-3 sm:mb-0">
|
||||||
<RequestButton
|
<RequestButton
|
||||||
mediaType="tv"
|
mediaType="tv"
|
||||||
onUpdate={() => revalidate()}
|
onUpdate={() => revalidate()}
|
||||||
@@ -270,10 +276,11 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
isShowComplete={isComplete}
|
isShowComplete={isComplete}
|
||||||
is4kShowComplete={is4kComplete}
|
is4kShowComplete={is4kComplete}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{hasPermission(Permission.MANAGE_REQUESTS) && (
|
{hasPermission(Permission.MANAGE_REQUESTS) && (
|
||||||
<Button
|
<Button
|
||||||
buttonType="default"
|
buttonType="default"
|
||||||
className="ml-2 first:ml-0"
|
className="mb-3 ml-2 first:ml-0 sm:mb-0"
|
||||||
onClick={() => setShowManager(true)}
|
onClick={() => setShowManager(true)}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
Reference in New Issue
Block a user