From a69caaca602e2b8e3fe076d62094640cf53cb126 Mon Sep 17 00:00:00 2001 From: ElementalCrisis <9443295+ElementalCrisis@users.noreply.github.com> Date: Thu, 14 Mar 2024 20:14:54 -0700 Subject: [PATCH] Minor UI Changes, Update Series Edit Modal. (#827) * Minor UI Changes, Update Series Edit Modal. * Make requested changes. --- .../Collection/Series/EditSeriesModal.tsx | 34 +++++++++++-------- .../Series/EditSeriesTabs/Action.tsx | 28 ++++++++------- .../EditSeriesTabs/DeleteActionsTab.tsx | 2 +- .../dashboard/panels/ContinueWatching.tsx | 7 ++-- src/pages/dashboard/panels/NextUp.tsx | 7 ++-- src/pages/dashboard/panels/QueueProcessor.tsx | 2 +- .../dashboard/panels/RecentlyImported.tsx | 2 +- .../dashboard/panels/RecommendedAnime.tsx | 5 ++- .../dashboard/panels/UnrecognizedFiles.tsx | 4 ++- src/pages/dashboard/panels/UpcomingAnime.tsx | 10 ++++-- src/pages/logs/LogsPage.tsx | 2 +- 11 files changed, 64 insertions(+), 39 deletions(-) diff --git a/src/components/Collection/Series/EditSeriesModal.tsx b/src/components/Collection/Series/EditSeriesModal.tsx index 4fbcab6c9..e3151b948 100644 --- a/src/components/Collection/Series/EditSeriesModal.tsx +++ b/src/components/Collection/Series/EditSeriesModal.tsx @@ -7,7 +7,6 @@ import FileActionsTab from '@/components/Collection/Series/EditSeriesTabs/FileAc import NameTab from '@/components/Collection/Series/EditSeriesTabs/NameTab'; import UpdateActionsTab from '@/components/Collection/Series/EditSeriesTabs/UpdateActionsTab'; import ModalPanel from '@/components/Panels/ModalPanel'; - // TODO: Add tabs after implementing back-end endpoint for GroupTab and PersonalStats // import GroupTab from './EditSeriesTabs/GroupTab'; // import PersonalStats from './EditSeriesTabs/PersonalStats'; @@ -51,20 +50,27 @@ const EditSeriesModal = (props: Props) => { const [activeTab, setActiveTab] = useState('update_actions'); return ( - -
-
- {map(tabs, (value, key) => ( -
setActiveTab(key)} - > - {value} -
- ))} + +
+
+
+ {map(tabs, (value, key) => ( +
setActiveTab(key)} + > + {value} +
+ ))} +
-
+
+
{renderTab(activeTab, seriesId)}
diff --git a/src/components/Collection/Series/EditSeriesTabs/Action.tsx b/src/components/Collection/Series/EditSeriesTabs/Action.tsx index cc107db7f..f7ea48827 100644 --- a/src/components/Collection/Series/EditSeriesTabs/Action.tsx +++ b/src/components/Collection/Series/EditSeriesTabs/Action.tsx @@ -1,18 +1,22 @@ import React from 'react'; -import { mdiPlayCircleOutline } from '@mdi/js'; -import { Icon } from '@mdi/react'; +import cx from 'classnames'; -import Button from '@/components/Input/Button'; - -const Action = ({ description, name, onClick }: { name: string, description: string, onClick: () => void }) => ( -
-
-
{name}
-
{description}
+const Action = ( + { description, name, onClick, scroll }: { name: string, description: string, scroll?: boolean, onClick: () => void }, +) => ( +
+
+
+
{name}
+
+
{description}
-
); diff --git a/src/components/Collection/Series/EditSeriesTabs/DeleteActionsTab.tsx b/src/components/Collection/Series/EditSeriesTabs/DeleteActionsTab.tsx index 1deefdb63..b78daad70 100644 --- a/src/components/Collection/Series/EditSeriesTabs/DeleteActionsTab.tsx +++ b/src/components/Collection/Series/EditSeriesTabs/DeleteActionsTab.tsx @@ -17,7 +17,7 @@ const DeleteActionsTab = ({ seriesId }: Props) => { const navigateToCollection = () => navigate('/webui/collection'); return ( -
+
{ return ( -
+
{(continueWatchingQuery.data?.length ?? 0) > 0 ? continueWatchingQuery.data?.map(item => ) : ( -
+
No Episodes In Progress.
Stop An Episode During Playback To Populate This Section.
diff --git a/src/pages/dashboard/panels/NextUp.tsx b/src/pages/dashboard/panels/NextUp.tsx index 985dfd26d..42c1d9d7b 100644 --- a/src/pages/dashboard/panels/NextUp.tsx +++ b/src/pages/dashboard/panels/NextUp.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { useSelector } from 'react-redux'; +import cx from 'classnames'; import ShokoPanel from '@/components/Panels/ShokoPanel'; import { useDashboardNextUpQuery } from '@/core/react-query/dashboard/queries'; @@ -25,11 +26,13 @@ const NextUp = () => { isFetching={nextUpQuery.isPending} editMode={layoutEditMode} > -
+
{(nextUpQuery.data?.length ?? 0) > 0 ? nextUpQuery.data?.map(item => ) : ( -
+
You've Finished Every Series In Progress.
Time For A New Series?
diff --git a/src/pages/dashboard/panels/QueueProcessor.tsx b/src/pages/dashboard/panels/QueueProcessor.tsx index 8490bda1c..41dec7382 100644 --- a/src/pages/dashboard/panels/QueueProcessor.tsx +++ b/src/pages/dashboard/panels/QueueProcessor.tsx @@ -99,7 +99,7 @@ function QueueProcessor() { > {queueItemsQuery.data && queueItemsQuery.data?.Total > 0 ? queueItemsQuery.data.List.map(item => ) - :
Queue is empty!
} + :
Queue is empty!
} ); } diff --git a/src/pages/dashboard/panels/RecentlyImported.tsx b/src/pages/dashboard/panels/RecentlyImported.tsx index 00733f00f..f60016715 100644 --- a/src/pages/dashboard/panels/RecentlyImported.tsx +++ b/src/pages/dashboard/panels/RecentlyImported.tsx @@ -47,7 +47,7 @@ const RecentlyImported = () => { /> } > -
+
{(recentEpisodesQuery.data?.length ?? 0) > 0 ? recentEpisodesQuery.data?.map(item => ( diff --git a/src/pages/dashboard/panels/RecommendedAnime.tsx b/src/pages/dashboard/panels/RecommendedAnime.tsx index fa0620573..3d3619a18 100644 --- a/src/pages/dashboard/panels/RecommendedAnime.tsx +++ b/src/pages/dashboard/panels/RecommendedAnime.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { useSelector } from 'react-redux'; import { mdiEyeArrowRightOutline } from '@mdi/js'; import { Icon } from '@mdi/react'; +import cx from 'classnames'; import BackgroundImagePlaceholderDiv from '@/components/BackgroundImagePlaceholderDiv'; import ShokoPanel from '@/components/Panels/ShokoPanel'; @@ -48,7 +49,9 @@ const RecommendedAnime = () => { return ( -
+
{(recommendedAnimeQuery.data?.length ?? 0) > 0 ? recommendedAnimeQuery.data?.map(item => renderItem(item.Anime, item.SimilarTo)) : ( diff --git a/src/pages/dashboard/panels/UnrecognizedFiles.tsx b/src/pages/dashboard/panels/UnrecognizedFiles.tsx index 0efe2f25e..5e723421f 100644 --- a/src/pages/dashboard/panels/UnrecognizedFiles.tsx +++ b/src/pages/dashboard/panels/UnrecognizedFiles.tsx @@ -71,7 +71,9 @@ function UnrecognizedFiles() { > {files.map(file => )} {fileCount === 0 && ( -
No Unrecognized Files, Good Job!
+
+ No Unrecognized Files, Good Job! +
)} ); diff --git a/src/pages/dashboard/panels/UpcomingAnime.tsx b/src/pages/dashboard/panels/UpcomingAnime.tsx index 48e492da2..ef90c7376 100644 --- a/src/pages/dashboard/panels/UpcomingAnime.tsx +++ b/src/pages/dashboard/panels/UpcomingAnime.tsx @@ -1,5 +1,6 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; +import cx from 'classnames'; import ShokoPanel from '@/components/Panels/ShokoPanel'; import TransitionDiv from '@/components/TransitionDiv'; @@ -39,13 +40,16 @@ const UpcomingAnime = () => { {(calendarQuery.data?.length ?? 0) > 0 ? calendarQuery.data?.map(item => ) : ( -
+
No Upcoming Anime.
Start A Currently Airing Series To Populate This Section.
)} - + {(calendarAllQuery.data?.length ?? 0) > 0 ? calendarAllQuery.data?.map(item => ( { /> )) : ( -
+
No Upcoming Anime.
Enable Calendar To Populate This Section
diff --git a/src/pages/logs/LogsPage.tsx b/src/pages/logs/LogsPage.tsx index 9a501c1d7..dd34d6a0c 100644 --- a/src/pages/logs/LogsPage.tsx +++ b/src/pages/logs/LogsPage.tsx @@ -94,7 +94,7 @@ const LogsPage = () => { data-index={virtualRow.index} ref={rowVirtualizer.measureElement} > -
{row.TimeStamp}
+
{row.TimeStamp}
{row.Level}
{row.Message}