From fb5c791b0b6b7593a472bf01713999a001f92dc7 Mon Sep 17 00:00:00 2001 From: sct Date: Fri, 20 Nov 2020 02:03:18 +0000 Subject: [PATCH] feat: upgrade tailwindcss to 2.0.1 --- .github/dependabot.yml | 12 +- .prettierignore | 8 + overseerr-api.yml | 4 +- package.json | 11 +- src/components/Common/Badge/index.tsx | 2 +- src/components/Common/Button/index.tsx | 12 +- .../Common/ButtonWithDropdown/index.tsx | 6 +- src/components/Common/Header/index.tsx | 4 +- src/components/Common/ListView/index.tsx | 2 +- .../Common/LoadingSpinner/index.tsx | 2 +- src/components/Common/Modal/index.tsx | 8 +- src/components/Common/SlideOver/index.tsx | 4 +- src/components/Discover/index.tsx | 12 +- .../Layout/LanguagePicker/index.tsx | 8 +- src/components/Layout/Notifications/index.tsx | 2 +- src/components/Layout/SearchInput/index.tsx | 2 +- src/components/Layout/Sidebar/index.tsx | 4 +- src/components/Layout/UserDropdown/index.tsx | 4 +- src/components/Layout/index.tsx | 6 +- src/components/Login/index.tsx | 6 +- src/components/MovieDetails/index.tsx | 48 +++-- src/components/PendingRequest/index.tsx | 6 +- src/components/PersonCard/index.tsx | 4 +- .../RequestModal/TvRequestModal.tsx | 22 +- src/components/Search/index.tsx | 4 +- src/components/Settings/CopyButton.tsx | 2 +- src/components/Settings/LibraryItem.tsx | 6 +- src/components/Settings/RadarrModal.tsx | 54 ++--- src/components/Settings/SettingsJobs.tsx | 14 +- src/components/Settings/SettingsLayout.tsx | 8 +- src/components/Settings/SettingsMain.tsx | 11 +- src/components/Settings/SettingsPlex.tsx | 33 +-- src/components/Settings/SettingsServices.tsx | 26 +-- src/components/Settings/SonarrModal.tsx | 54 ++--- src/components/Setup/SetupSteps.tsx | 2 +- src/components/Setup/index.tsx | 10 +- src/components/Slider/index.tsx | 2 +- src/components/TitleCard/Placeholder.tsx | 2 +- src/components/TitleCard/index.tsx | 8 +- src/components/Toast/index.tsx | 4 +- src/components/TvDetails/index.tsx | 36 ++-- src/components/UserEdit/index.tsx | 16 +- src/components/UserList/index.tsx | 30 +-- src/styles/globals.css | 4 +- stylelint.config.js | 16 +- tailwind.config.js | 6 +- yarn.lock | 195 +++++++++++------- 47 files changed, 396 insertions(+), 346 deletions(-) create mode 100644 .prettierignore diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bcca8f239..c4d690b74 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,8 @@ version: 2 updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - time: "20:00" - open-pull-requests-limit: 10 + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + time: '20:00' + open-pull-requests-limit: 10 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..6e9428063 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +# Generated files which we would not like to format +.next/ +dist/ +config/ + +# assets +src/assets/ +public/ diff --git a/overseerr-api.yml b/overseerr-api.yml index ea4877409..37797c9e1 100644 --- a/overseerr-api.yml +++ b/overseerr-api.yml @@ -1866,7 +1866,7 @@ paths: example: 2020 url: type: string - example: "http://www.rottentomatoes.com/m/mulan_2020/" + example: 'http://www.rottentomatoes.com/m/mulan_2020/' criticsScore: type: number example: 85 @@ -2054,7 +2054,7 @@ paths: example: 2019 url: type: string - example: "http://www.rottentomatoes.com/m/mulan_2020/" + example: 'http://www.rottentomatoes.com/m/mulan_2020/' criticsScore: type: number example: 85 diff --git a/package.json b/package.json index 9b70ecfb2..1f9473544 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,11 @@ "start": "NODE_ENV=production node dist/index.js", "i18n:extract": "extract-messages -l=en,ja -o src/i18n/locale -d en --flat true './src/**/!(*.test).{ts,tsx}'", "migration:generate": "ts-node --project server/tsconfig.json ./node_modules/.bin/typeorm migration:generate", - "migration:run": "ts-node --project server/tsconfig.json ./node_modules/.bin/typeorm migration:run" + "migration:run": "ts-node --project server/tsconfig.json ./node_modules/.bin/typeorm migration:run", + "format": "prettier --write ." }, "dependencies": { "@svgr/webpack": "^5.4.0", - "@tailwindcss/ui": "^0.6.2", "axios": "^0.20.0", "body-parser": "^1.19.0", "bowser": "^2.11.0", @@ -53,6 +53,9 @@ "@babel/cli": "^7.11.6", "@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^11.0.0", + "@tailwindcss/aspect-ratio": "^0.2.0", + "@tailwindcss/forms": "^0.2.1", + "@tailwindcss/typography": "^0.3.1", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express": "^4.17.8", @@ -71,6 +74,7 @@ "@types/yup": "^0.29.9", "@typescript-eslint/eslint-plugin": "^4.0.0", "@typescript-eslint/parser": "^3.10.1", + "autoprefixer": "^9", "babel-plugin-react-intl": "^8.2.2", "babel-plugin-react-intl-auto": "^3.3.0", "commitizen": "^4.2.1", @@ -86,9 +90,10 @@ "husky": "^4.3.0", "lint-staged": "^10.4.0", "nodemon": "^2.0.4", + "postcss": "^7", "postcss-preset-env": "^6.7.0", "prettier": "^2.1.2", - "tailwindcss": "^1.8.12", + "tailwindcss": "npm:@tailwindcss/postcss7-compat", "ts-node": "^9.0.0", "typescript": "^4.0.2" }, diff --git a/src/components/Common/Badge/index.tsx b/src/components/Common/Badge/index.tsx index 7cabbd501..62fd90728 100644 --- a/src/components/Common/Badge/index.tsx +++ b/src/components/Common/Badge/index.tsx @@ -14,7 +14,7 @@ const Badge: React.FC = ({ badgeType = 'default', children }) => { badgeStyle.push('bg-red-600 text-red-100'); break; case 'warning': - badgeStyle.push('bg-orange-500 text-orange-100'); + badgeStyle.push('bg-yellow-500 text-yellow-100'); break; case 'success': badgeStyle.push('bg-green-400 text-green-100'); diff --git a/src/components/Common/Button/index.tsx b/src/components/Common/Button/index.tsx index 4af5e0606..278ac7713 100644 --- a/src/components/Common/Button/index.tsx +++ b/src/components/Common/Button/index.tsx @@ -26,32 +26,32 @@ const Button: React.FC = ({ switch (buttonType) { case 'primary': buttonStyle.push( - 'text-white bg-indigo-600 hover:bg-indigo-500 focus:border-indigo-700 focus:shadow-outline-indigo active:bg-indigo-700 disabled:opacity-50' + 'text-white bg-indigo-600 hover:bg-indigo-500 focus:border-indigo-700 focus:ring-indigo active:bg-indigo-700 disabled:opacity-50' ); break; case 'danger': buttonStyle.push( - 'text-white bg-red-600 hover:bg-red-500 focus:border-red-700 focus:shadow-outline-red active:bg-red-700 disabled:opacity-50' + 'text-white bg-red-600 hover:bg-red-500 focus:border-red-700 focus:ring-red active:bg-red-700 disabled:opacity-50' ); break; case 'warning': buttonStyle.push( - 'text-white bg-orange-500 hover:bg-orange-400 focus:border-orange-700 focus:shadow-outline-orange active:bg-orange-700 disabled:opacity-50' + 'text-white bg-yellow-500 hover:bg-yellow-400 focus:border-yellow-700 focus:ring-yellow active:bg-yellow-700 disabled:opacity-50' ); break; case 'success': buttonStyle.push( - 'text-white bg-green-400 hover:bg-green-300 focus:border-green-700 focus:shadow-outline-green active:bg-green-700 disabled:opacity-50' + 'text-white bg-green-400 hover:bg-green-300 focus:border-green-700 focus:ring-green active:bg-green-700 disabled:opacity-50' ); break; case 'ghost': buttonStyle.push( - 'text-white bg-transaprent border border-cool-gray-600 hover:border-cool-gray-200 focus:border-cool-gray-100 active:border-cool-gray-100 disabled:opacity-50' + 'text-white bg-transaprent border border-gray-600 hover:border-gray-200 focus:border-gray-100 active:border-gray-100 disabled:opacity-50' ); break; default: buttonStyle.push( - 'leading-5 font-medium rounded-md text-gray-200 bg-cool-gray-500 hover:bg-cool-gray-400 hover:text-white focus:border-blue-300 focus:shadow-outline-blue active:text-gray-200 active:bg-cool-gray-400 disabled:opacity-50' + 'leading-5 font-medium rounded-md text-gray-200 bg-gray-500 hover:bg-gray-400 hover:text-white focus:border-blue-300 focus:ring-blue active:text-gray-200 active:bg-gray-400 disabled:opacity-50' ); } diff --git a/src/components/Common/ButtonWithDropdown/index.tsx b/src/components/Common/ButtonWithDropdown/index.tsx index 51d2abd34..0219f0bf9 100644 --- a/src/components/Common/ButtonWithDropdown/index.tsx +++ b/src/components/Common/ButtonWithDropdown/index.tsx @@ -41,7 +41,7 @@ const ButtonWithDropdown: React.FC = ({ -
+
This will remove all media data including all requests for this item. This action is irreversible. If this item exists in your Plex library, the media information will be recreated next sync. @@ -373,9 +371,9 @@ const MovieDetails: React.FC = ({ movie }) => {

-
+
{(data.voteCount > 0 || ratingData) && ( -
+
{ratingData?.criticsRating && ( <> @@ -385,7 +383,7 @@ const MovieDetails: React.FC = ({ movie }) => { )} - + {ratingData.criticsScore}% @@ -399,7 +397,7 @@ const MovieDetails: React.FC = ({ movie }) => { )} - + {ratingData.audienceScore}% @@ -409,18 +407,18 @@ const MovieDetails: React.FC = ({ movie }) => { - + {data.voteAverage}/10 )}
)} -
+
- + = ({ movie }) => { />
-
+
- + {data.status}
{data.revenue > 0 && ( -
+
- + = ({ movie }) => {
)} {data.budget > 0 && ( -
+
- + = ({ movie }) => {
)} -
+
- + {data.originalLanguage}
@@ -479,7 +477,7 @@ const MovieDetails: React.FC = ({ movie }) => {
- + @@ -522,7 +520,7 @@ const MovieDetails: React.FC = ({ movie }) => { href="/movie/[movieId]/recommendations" as={`/movie/${data.id}/recommendations`} > - + @@ -572,7 +570,7 @@ const MovieDetails: React.FC = ({ movie }) => { href="/movie/[movieId]/similar" as={`/movie/${data.id}/similar`} > - + diff --git a/src/components/PendingRequest/index.tsx b/src/components/PendingRequest/index.tsx index b7bcb3b5a..def70ac45 100644 --- a/src/components/PendingRequest/index.tsx +++ b/src/components/PendingRequest/index.tsx @@ -35,12 +35,12 @@ const PendingRequest: React.FC = ({ }; return ( -
+
-

+

-
+

= ({

@@ -45,7 +45,7 @@ const PersonCard: React.FC = ({ )}
{name}
{subName && ( -
+
{subName}
)} diff --git a/src/components/RequestModal/TvRequestModal.tsx b/src/components/RequestModal/TvRequestModal.tsx index 549e3dd90..a78f852dc 100644 --- a/src/components/RequestModal/TvRequestModal.tsx +++ b/src/components/RequestModal/TvRequestModal.tsx @@ -210,7 +210,7 @@ const TvRequestModal: React.FC = ({ - - - - - + {data?.seasons .filter((season) => season.seasonNumber !== 0) .map((season) => { @@ -260,7 +260,7 @@ const TvRequestModal: React.FC = ({ ); return ( - - - -
+ = ({ aria-hidden="true" className={`${ isAllSeasons() ? 'translate-x-5' : 'translate-x-0' - } absolute left-0 inline-block h-5 w-5 border border-gray-200 rounded-full bg-white shadow transform group-focus:shadow-outline group-focus:border-blue-300 transition-transform ease-in-out duration-200`} + } absolute left-0 inline-block h-5 w-5 border border-gray-200 rounded-full bg-white shadow transform group-focus:ring group-focus:border-blue-300 transition-transform ease-in-out duration-200`} > + Season + # Of Episodes + Status
+ = ({ isSelectedSeason(season.seasonNumber) ? 'translate-x-5' : 'translate-x-0' - } absolute left-0 inline-block h-5 w-5 border border-gray-200 rounded-full bg-white shadow transform group-focus:shadow-outline group-focus:border-blue-300 transition-transform ease-in-out duration-200`} + } absolute left-0 inline-block h-5 w-5 border border-gray-200 rounded-full bg-white shadow transform group-focus:ring group-focus:border-blue-300 transition-transform ease-in-out duration-200`} > + {season.seasonNumber === 0 ? 'Extras' : `Season ${season.seasonNumber}`} + {season.episodeCount} + {!seasonRequest && !mediaSeason && ( Not Requested )} diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 47a4c77ca..129a69b27 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -68,13 +68,13 @@ const Search: React.FC = () => { diff --git a/src/components/Settings/CopyButton.tsx b/src/components/Settings/CopyButton.tsx index c4921a16e..34a22a9e1 100644 --- a/src/components/Settings/CopyButton.tsx +++ b/src/components/Settings/CopyButton.tsx @@ -20,7 +20,7 @@ const CopyButton: React.FC<{ textToCopy: string }> = ({ textToCopy }) => { return (