From b106c50e71cb0214b1f29816789998d806f430d1 Mon Sep 17 00:00:00 2001 From: ManiMatter Date: Sun, 6 Oct 2024 11:38:14 +0200 Subject: [PATCH] Added Original Title to Movie Details and to Add Movie Search Result + Changes from diff --- .../AddNewMovie/AddNewMovieSearchResult.css | 1 + .../AddNewMovieSearchResult.css.d.ts | 1 + .../AddNewMovie/AddNewMovieSearchResult.js | 17 +++++++++++++++++ frontend/src/Movie/Details/MovieDetails.js | 15 +++++++++++++++ .../src/Utilities/String/equalsIgnoringCase.ts | 5 +++++ 5 files changed, 39 insertions(+) create mode 100644 frontend/src/Utilities/String/equalsIgnoringCase.ts diff --git a/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css b/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css index 63edbd447..9b9a5968c 100644 --- a/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css +++ b/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css @@ -85,6 +85,7 @@ margin-top: 20px; } +.originalTitle, .originalLanguage, .studio, .genres { diff --git a/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css.d.ts b/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css.d.ts index 6dfa2d8a2..c5a96e97c 100644 --- a/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css.d.ts +++ b/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.css.d.ts @@ -9,6 +9,7 @@ interface CssExports { 'icons': string; 'links': string; 'originalLanguage': string; + 'originalTitle': string; 'overlay': string; 'overview': string; 'poster': string; diff --git a/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.js b/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.js index a17a9b9f6..92e5a5803 100644 --- a/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.js +++ b/frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.js @@ -12,6 +12,7 @@ import MovieStatusLabel from 'Movie/Details/MovieStatusLabel'; import MovieIndexProgressBar from 'Movie/Index/ProgressBar/MovieIndexProgressBar'; import MoviePoster from 'Movie/MoviePoster'; import formatRuntime from 'Utilities/Date/formatRuntime'; +import equalsIgnoringCase from 'Utilities/String/equalsIgnoringCase'; import translate from 'Utilities/String/translate'; import AddNewMovieModal from './AddNewMovieModal'; import styles from './AddNewMovieSearchResult.css'; @@ -63,6 +64,7 @@ class AddNewMovieSearchResult extends Component { year, studio, originalLanguage, + originalTitle, genres, status, overview, @@ -228,6 +230,20 @@ class AddNewMovieSearchResult extends Component { null } + { + originalTitle && !equalsIgnoringCase(title, originalTitle) ? + : + null + } + { studio ?