From dff85dc1f3e97f00a7e42234ddd99457c38e81f5 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 6 May 2024 23:19:15 +0300 Subject: [PATCH] New: Display excluded label for movies in collections --- .../src/Collection/Overview/CollectionMovie.css | 13 +++++++++++++ .../Collection/Overview/CollectionMovie.css.d.ts | 1 + frontend/src/Collection/Overview/CollectionMovie.js | 12 ++++++++++++ .../Collections/CollectionController.cs | 2 ++ 4 files changed, 28 insertions(+) diff --git a/frontend/src/Collection/Overview/CollectionMovie.css b/frontend/src/Collection/Overview/CollectionMovie.css index 46a460c09..74a0b7266 100644 --- a/frontend/src/Collection/Overview/CollectionMovie.css +++ b/frontend/src/Collection/Overview/CollectionMovie.css @@ -115,3 +115,16 @@ $hoverScale: 1.05; color: var(--iconButtonHoverLightColor); } } + +.excluded { + position: absolute; + top: 0; + right: 0; + z-index: 1; + width: 0; + height: 0; + border-width: 0 25px 25px 0; + border-style: solid; + border-color: transparent var(--dangerColor) transparent transparent; + color: var(--white); +} diff --git a/frontend/src/Collection/Overview/CollectionMovie.css.d.ts b/frontend/src/Collection/Overview/CollectionMovie.css.d.ts index 65606ed37..278e2d327 100644 --- a/frontend/src/Collection/Overview/CollectionMovie.css.d.ts +++ b/frontend/src/Collection/Overview/CollectionMovie.css.d.ts @@ -6,6 +6,7 @@ interface CssExports { 'content': string; 'controls': string; 'editorSelect': string; + 'excluded': string; 'externalLinks': string; 'link': string; 'monitorToggleButton': string; diff --git a/frontend/src/Collection/Overview/CollectionMovie.js b/frontend/src/Collection/Overview/CollectionMovie.js index abf4b4805..2eb42afdc 100644 --- a/frontend/src/Collection/Overview/CollectionMovie.js +++ b/frontend/src/Collection/Overview/CollectionMovie.js @@ -5,6 +5,7 @@ import MonitorToggleButton from 'Components/MonitorToggleButton'; import EditMovieModalConnector from 'Movie/Edit/EditMovieModalConnector'; import MovieIndexProgressBar from 'Movie/Index/ProgressBar/MovieIndexProgressBar'; import MoviePoster from 'Movie/MoviePoster'; +import translate from 'Utilities/String/translate'; import AddNewCollectionMovieModal from './../AddNewCollectionMovieModal'; import styles from './CollectionMovie.css'; @@ -72,6 +73,7 @@ class CollectionMovie extends Component { isAvailable, movieFile, isExistingMovie, + isExcluded, posterWidth, posterHeight, detailedProgressBar, @@ -107,6 +109,15 @@ class CollectionMovie extends Component { } + { + isExcluded ? +
: + null + } + MapToResource(List coll movieResource.Folder = _fileNameBuilder.GetMovieFolder(new Movie { MovieMetadata = movie }, namingConfig); var isExcluded = listExclusions.Any(e => e.TmdbId == movie.TmdbId); + movieResource.IsExcluded = isExcluded; if (!existingMoviesTmdbIds.Contains(movie.TmdbId) && !isExcluded) { @@ -215,6 +216,7 @@ private CollectionResource MapToResource(MovieCollection collection) movieResource.Folder = _fileNameBuilder.GetMovieFolder(new Movie { MovieMetadata = movie }, namingConfig); var isExcluded = listExclusions.Any(e => e.TmdbId == movie.TmdbId); + movieResource.IsExcluded = isExcluded; if (!existingMoviesTmdbIds.Contains(movie.TmdbId) && !isExcluded) {