diff --git a/cypress/e2e/user/user-list.cy.ts b/cypress/e2e/user/user-list.cy.ts index 8239e289..503bd23f 100644 --- a/cypress/e2e/user/user-list.cy.ts +++ b/cypress/e2e/user/user-list.cy.ts @@ -54,10 +54,7 @@ describe('User List', () => { .contains('Delete') .click(); - cy.get('[data-testid=modal-title]').should( - 'contain', - `Delete ${testUser.displayName}` - ); + cy.get('[data-testid=modal-title]').should('contain', `Delete User`); cy.intercept('/api/v1/user?take=10&skip=0&sort=displayname').as('user'); diff --git a/package.json b/package.json index 7d7c3d81..73c99c10 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@formatjs/intl-locale": "3.0.3", "@formatjs/intl-pluralrules": "5.0.3", "@formatjs/intl-utils": "3.8.4", - "@headlessui/react": "1.6.6", + "@headlessui/react": "^0.0.0-insiders.b301f04", "@heroicons/react": "1.0.6", "@supercharge/request-ip": "1.2.0", "@svgr/webpack": "6.3.1", diff --git a/src/components/Common/Alert/index.tsx b/src/components/Common/Alert/index.tsx index 1437f423..8ffb4a25 100644 --- a/src/components/Common/Alert/index.tsx +++ b/src/components/Common/Alert/index.tsx @@ -12,7 +12,8 @@ interface AlertProps { const Alert = ({ title, children, type }: AlertProps) => { let design = { - bgColor: 'bg-yellow-600', + bgColor: + 'border border-yellow-500 backdrop-blur bg-yellow-400 bg-opacity-20', titleColor: 'text-yellow-100', textColor: 'text-yellow-300', svg: , @@ -21,9 +22,10 @@ const Alert = ({ title, children, type }: AlertProps) => { switch (type) { case 'info': design = { - bgColor: 'bg-indigo-600', - titleColor: 'text-indigo-100', - textColor: 'text-indigo-300', + bgColor: + 'border border-indigo-500 backdrop-blur bg-indigo-400 bg-opacity-20', + titleColor: 'text-gray-100', + textColor: 'text-gray-300', svg: , }; break; diff --git a/src/components/Common/Badge/index.tsx b/src/components/Common/Badge/index.tsx index 1a2a7a05..47ce6586 100644 --- a/src/components/Common/Badge/index.tsx +++ b/src/components/Common/Badge/index.tsx @@ -31,21 +31,27 @@ const Badge = ( switch (badgeType) { case 'danger': - badgeStyle.push('bg-red-600 !text-red-100'); + badgeStyle.push( + 'bg-red-600 bg-opacity-80 border-red-500 border !text-red-100' + ); if (href) { - badgeStyle.push('hover:bg-red-500'); + badgeStyle.push('hover:bg-red-500 bg-opacity-100'); } break; case 'warning': - badgeStyle.push('bg-yellow-500 !text-yellow-100'); + badgeStyle.push( + 'bg-yellow-500 bg-opacity-80 border-yellow-500 border !text-yellow-100' + ); if (href) { - badgeStyle.push('hover:bg-yellow-400'); + badgeStyle.push('hover:bg-yellow-500 hover:bg-opacity-100'); } break; case 'success': - badgeStyle.push('bg-green-500 !text-green-100'); + badgeStyle.push( + 'bg-green-500 bg-opacity-80 border border-green-500 !text-green-100' + ); if (href) { - badgeStyle.push('hover:bg-green-400'); + badgeStyle.push('hover:bg-green-500 hover:bg-opacity-100'); } break; case 'dark': @@ -61,9 +67,11 @@ const Badge = ( } break; default: - badgeStyle.push('bg-indigo-500 !text-indigo-100'); + badgeStyle.push( + 'bg-indigo-500 bg-opacity-80 border border-indigo-500 !text-indigo-100' + ); if (href) { - badgeStyle.push('hover:bg-indigo-400'); + badgeStyle.push('hover:bg-indigo-500 bg-opacity-100'); } } diff --git a/src/components/Common/Button/index.tsx b/src/components/Common/Button/index.tsx index 59196d16..d3f96ae9 100644 --- a/src/components/Common/Button/index.tsx +++ b/src/components/Common/Button/index.tsx @@ -51,22 +51,22 @@ function Button

( switch (buttonType) { case 'primary': buttonStyle.push( - 'text-white bg-indigo-600 border-indigo-600 hover:bg-indigo-500 hover:border-indigo-500 focus:border-indigo-700 focus:ring-indigo active:bg-indigo-700 active:border-indigo-700' + 'text-white border border-indigo-500 bg-indigo-600 bg-opacity-80 hover:bg-opacity-100 hover:border-indigo-500 focus:border-indigo-700 focus:ring-indigo active:bg-opacity-100 active:border-indigo-700' ); break; case 'danger': buttonStyle.push( - 'text-white bg-red-600 border-red-600 hover:bg-red-500 hover:border-red-500 focus:border-red-700 focus:ring-red active:bg-red-700 active:border-red-700' + 'text-white bg-red-600 bg-opacity-80 border-red-500 hover:bg-opacity-100 hover:border-red-500 focus:border-red-700 focus:ring-red active:bg-red-700 active:border-red-700' ); break; case 'warning': buttonStyle.push( - 'text-white bg-yellow-500 border-yellow-500 hover:bg-yellow-400 hover:border-yellow-400 focus:border-yellow-700 focus:ring-yellow active:bg-yellow-700 active:border-yellow-700' + 'text-white border border-yellow-500 backdrop-blur bg-yellow-500 bg-opacity-80 hover:bg-opacity-100 hover:border-yellow-400 focus:border-yellow-700 focus:ring-yellow active:bg-opacity-100 active:border-yellow-700' ); break; case 'success': buttonStyle.push( - 'text-white bg-green-500 border-green-500 hover:bg-green-400 hover:border-green-400 focus:border-green-700 focus:ring-green active:bg-green-700 active:border-green-700' + 'text-white bg-green-500 bg-opacity-80 border-green-500 hover:bg-opacity-100 hover:border-green-400 focus:border-green-700 focus:ring-green active:bg-opacity-100 active:border-green-700' ); break; case 'ghost': @@ -76,7 +76,7 @@ function Button

( break; default: buttonStyle.push( - 'text-gray-200 bg-gray-600 border-gray-600 hover:text-white hover:bg-gray-500 hover:border-gray-500 group-hover:text-white group-hover:bg-gray-500 group-hover:border-gray-500 focus:border-blue-300 focus:ring-blue active:text-gray-200 active:bg-gray-500 active:border-gray-500' + 'text-gray-200 bg-gray-800 bg-opacity-80 border-gray-600 hover:text-white hover:bg-gray-700 hover:border-gray-600 group-hover:text-white group-hover:bg-gray-700 group-hover:border-gray-600 focus:border-blue-300 focus:ring-blue active:text-gray-200 active:bg-gray-700 active:border-gray-600' ); } diff --git a/src/components/Common/ButtonWithDropdown/index.tsx b/src/components/Common/ButtonWithDropdown/index.tsx index 5a3fb9c7..be6815b9 100644 --- a/src/components/Common/ButtonWithDropdown/index.tsx +++ b/src/components/Common/ButtonWithDropdown/index.tsx @@ -70,9 +70,9 @@ const ButtonWithDropdown = ({ break; default: styleClasses.mainButtonClasses += - ' bg-indigo-600 border-indigo-600 hover:bg-indigo-500 hover:border-indigo-500 active:bg-indigo-700 active:border-indigo-700 focus:ring-blue'; + ' bg-indigo-600 border-indigo-500 bg-opacity-80 hover:bg-opacity-100 hover:border-indigo-500 active:bg-indigo-700 active:border-indigo-700 focus:ring-blue'; styleClasses.dropdownSideButtonClasses += - ' bg-indigo-700 border-indigo-600 hover:bg-indigo-500 active:bg-indigo-700 focus:ring-blue'; + ' bg-indigo-600 bg-opacity-80 border-indigo-500 hover:bg-opacity-100 active:bg-opacity-100 focus:ring-blue'; styleClasses.dropdownClasses += ' bg-indigo-600 p-1'; } diff --git a/src/components/Common/Header/index.tsx b/src/components/Common/Header/index.tsx index fb96e701..1653a457 100644 --- a/src/components/Common/Header/index.tsx +++ b/src/components/Common/Header/index.tsx @@ -12,9 +12,7 @@ const Header = ({ children, extraMargin = 0, subtext }: HeaderProps) => { className="mb-4 truncate text-2xl font-bold leading-7 text-gray-100 sm:overflow-visible sm:text-4xl sm:leading-9 md:mb-0" data-testid="page-header" > - - {children} - + {children} {subtext &&

{subtext}
} diff --git a/src/components/Common/Modal/index.tsx b/src/components/Common/Modal/index.tsx index 06b4ba5f..0d7eff19 100644 --- a/src/components/Common/Modal/index.tsx +++ b/src/components/Common/Modal/index.tsx @@ -13,6 +13,7 @@ import { useIntl } from 'react-intl'; interface ModalProps { title?: string; + subTitle?: string; onCancel?: (e?: MouseEvent) => void; onOk?: (e?: MouseEvent) => void; onSecondary?: (e?: MouseEvent) => void; @@ -30,7 +31,6 @@ interface ModalProps { tertiaryButtonType?: ButtonType; disableScrollLock?: boolean; backgroundClickable?: boolean; - iconSvg?: React.ReactNode; loading?: boolean; backdrop?: string; children?: React.ReactNode; @@ -40,6 +40,7 @@ const Modal = React.forwardRef( ( { title, + subTitle, onCancel, onOk, cancelText, @@ -50,7 +51,6 @@ const Modal = React.forwardRef( children, disableScrollLock, backgroundClickable = true, - iconSvg, secondaryButtonType = 'default', secondaryDisabled = false, onSecondary, @@ -67,9 +67,9 @@ const Modal = React.forwardRef( const intl = useIntl(); const modalRef = useRef(null); useClickOutside(modalRef, () => { - typeof onCancel === 'function' && backgroundClickable - ? onCancel() - : undefined; + if (onCancel && backgroundClickable) { + onCancel(); + } }); useLockBodyScroll(true, disableScrollLock); @@ -102,7 +102,7 @@ const Modal = React.forwardRef( ( className="absolute inset-0" style={{ backgroundImage: - 'linear-gradient(180deg, rgba(55, 65, 81, 0.85) 0%, rgba(55, 65, 81, 1) 100%)', + 'linear-gradient(180deg, rgba(31, 41, 55, 0.75) 0%, rgba(31, 41, 55, 1) 100%)', }} /> )} -
- {iconSvg &&
{iconSvg}
} +
- {title && ( - - {title} - + {(title || subTitle) && ( +
+ {title && ( + + {title} + + )} + {subTitle && ( + + {subTitle} + + )} +
)}
diff --git a/src/components/Common/SlideOver/index.tsx b/src/components/Common/SlideOver/index.tsx index f69d3e51..e7ccf706 100644 --- a/src/components/Common/SlideOver/index.tsx +++ b/src/components/Common/SlideOver/index.tsx @@ -74,7 +74,7 @@ const SlideOver = ({
-

+

{title}

@@ -89,7 +89,9 @@ const SlideOver = ({
{subText && (
-

{subText}

+

+ {subText} +

)}
diff --git a/src/components/IssueDetails/IssueComment/index.tsx b/src/components/IssueDetails/IssueComment/index.tsx index fa777746..b941c9f3 100644 --- a/src/components/IssueDetails/IssueComment/index.tsx +++ b/src/components/IssueDetails/IssueComment/index.tsx @@ -2,7 +2,6 @@ import Button from '@app/components/Common/Button'; import Modal from '@app/components/Common/Modal'; import { Permission, useUser } from '@app/hooks/useUser'; import { Menu, Transition } from '@headlessui/react'; -import { ExclamationIcon } from '@heroicons/react/outline'; import { DotsVerticalIcon } from '@heroicons/react/solid'; import type { default as IssueCommentType } from '@server/entity/IssueComment'; import axios from 'axios'; @@ -65,7 +64,7 @@ const IssueComment = ({ } mt-4 space-x-4`} > deleteComment()} okText={intl.formatMessage(messages.delete)} okButtonType="danger" - iconSvg={} > {intl.formatMessage(messages.areyousuredelete)} diff --git a/src/components/IssueDetails/index.tsx b/src/components/IssueDetails/index.tsx index 378a6a70..7868b626 100644 --- a/src/components/IssueDetails/index.tsx +++ b/src/components/IssueDetails/index.tsx @@ -14,7 +14,6 @@ import { Transition } from '@headlessui/react'; import { ChatIcon, CheckCircleIcon, - ExclamationIcon, PlayIcon, ServerIcon, } from '@heroicons/react/outline'; @@ -189,7 +188,6 @@ const IssueDetails = () => { onOk={() => deleteIssue()} okText={intl.formatMessage(messages.deleteissue)} okButtonType="danger" - iconSvg={} > {intl.formatMessage(messages.deleteissueconfirm)} diff --git a/src/components/IssueModal/CreateIssueModal/index.tsx b/src/components/IssueModal/CreateIssueModal/index.tsx index 93510988..edbdd083 100644 --- a/src/components/IssueModal/CreateIssueModal/index.tsx +++ b/src/components/IssueModal/CreateIssueModal/index.tsx @@ -5,7 +5,6 @@ import useSettings from '@app/hooks/useSettings'; import { Permission, useUser } from '@app/hooks/useUser'; import globalMessages from '@app/i18n/globalMessages'; import { RadioGroup } from '@headlessui/react'; -import { ExclamationIcon } from '@heroicons/react/outline'; import { ArrowCircleRightIcon } from '@heroicons/react/solid'; import { MediaStatus } from '@server/constants/media'; import type Issue from '@server/entity/Issue'; @@ -150,23 +149,14 @@ const CreateIssueModal = ({ } title={intl.formatMessage(messages.reportissue)} + subTitle={data && isMovie(data) ? data?.title : data?.name} cancelText={intl.formatMessage(globalMessages.close)} onOk={() => handleSubmit()} okText={intl.formatMessage(messages.submitissue)} loading={!data && !error} backdrop={`https://image.tmdb.org/t/p/w1920_and_h800_multi_faces/${data?.backdropPath}`} > - {data && ( -
- - {intl.formatMessage(messages.issomethingwrong, { - title: isMovie(data) ? data.title : data.name, - })} - -
- )} {mediaType === 'tv' && data && !isMovie(data) && ( <>
@@ -264,7 +254,7 @@ const CreateIssueModal = ({ ? 'rounded-bl-md rounded-br-md' : '', checked - ? 'z-10 border-indigo-500 bg-indigo-600' + ? 'z-10 border border-indigo-500 bg-indigo-400 bg-opacity-20' : 'border-gray-500', 'relative flex cursor-pointer border p-4 focus:outline-none' ) @@ -275,7 +265,7 @@ const CreateIssueModal = ({ { name: string; value: string; diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index 39b36e76..88cffb21 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -408,7 +408,7 @@ const MovieDetails = ({ movie }: MovieDetailsProps) => { {hasPermission(Permission.MANAGE_REQUESTS) && data.mediaInfo && (