Rename Movie to Group in UI (#4963)

* Replace movies with groups in the UI
* Massage menu items
* Change view names
* Rename Movie components to Group
* Refactor movie to group variable names
* Rename movie class names to group
This commit is contained in:
WithoutPants
2024-06-26 11:39:31 +10:00
committed by GitHub
parent d986a9eb4f
commit af6841be49
63 changed files with 643 additions and 612 deletions

View File

@@ -31,7 +31,7 @@ import {
CompressedStudioDetailsPanel,
StudioDetailsPanel,
} from "./StudioDetailsPanel";
import { StudioMoviesPanel } from "./StudioMoviesPanel";
import { StudioGroupsPanel } from "./StudioMoviesPanel";
import {
faTrashAlt,
faLink,
@@ -63,7 +63,7 @@ const validTabs = [
"galleries",
"images",
"performers",
"movies",
"groups",
"childstudios",
] as const;
type TabKey = (typeof validTabs)[number];
@@ -108,7 +108,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
(showAllCounts ? studio.image_count_all : studio.image_count) ?? 0;
const performerCount =
(showAllCounts ? studio.performer_count_all : studio.performer_count) ?? 0;
const movieCount =
const groupCount =
(showAllCounts ? studio.movie_count_all : studio.movie_count) ?? 0;
const populatedDefaultTab = useMemo(() => {
@@ -120,8 +120,8 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
ret = "images";
} else if (performerCount != 0) {
ret = "performers";
} else if (movieCount != 0) {
ret = "movies";
} else if (groupCount != 0) {
ret = "groups";
} else if (studio.child_studios.length != 0) {
ret = "childstudios";
}
@@ -133,7 +133,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
galleryCount,
imageCount,
performerCount,
movieCount,
groupCount,
studio,
]);
@@ -437,19 +437,19 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
/>
</Tab>
<Tab
eventKey="movies"
eventKey="groups"
title={
<>
{intl.formatMessage({ id: "movies" })}
{intl.formatMessage({ id: "groups" })}
<Counter
abbreviateCounter={abbreviateCounter}
count={movieCount}
count={groupCount}
hideZero
/>
</>
}
>
<StudioMoviesPanel active={tabKey === "movies"} studio={studio} />
<StudioGroupsPanel active={tabKey === "groups"} studio={studio} />
</Tab>
<Tab
eventKey="childstudios"