Skip to content

Commit

Permalink
Add missing page titles (stashapp#411)
Browse files Browse the repository at this point in the history
* Add missing page titles

* Remove class from `renderPerformer`
  • Loading branch information
peolic authored and feederbox826 committed Nov 15, 2023
1 parent f5da03a commit 0b4d121
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
6 changes: 1 addition & 5 deletions frontend/src/components/editCard/renderEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ export const renderPerformer = (appearance: {
"name" | "id" | "gender" | "name" | "disambiguation" | "deleted"
>;
}) => (
<Link
key={appearance.performer.id}
to={performerHref(appearance.performer)}
className="scene-performer"
>
<Link key={appearance.performer.id} to={performerHref(appearance.performer)}>
<GenderIcon gender={appearance.performer.gender} />
<PerformerName performer={appearance.performer} as={appearance.as} />
</Link>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/performers/PerformerEditUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import PerformerForm from "./performerForm";

import { EditUpdate_findEdit as Edit } from "src/graphql/definitions/EditUpdate";
import { ROUTE_EDIT } from "src/constants";
import Title from "src/components/title";

export const PerformerEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
const history = useHistory();
Expand Down Expand Up @@ -57,12 +58,15 @@ export const PerformerEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
});
};

const performerName = edit.target?.name ?? edit.details.name;

return (
<div>
<Title page={`Update performer edit for "${performerName}"`} />
<h3>
Update performer edit for
<i className="ms-2">
<b>{edit.target?.name ?? edit.details.name}</b>
<b>{performerName}</b>
</i>
</h3>
<hr />
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/scenes/SceneEditUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import SceneForm from "./sceneForm";

import { EditUpdate_findEdit as Edit } from "src/graphql/definitions/EditUpdate";
import { ROUTE_EDIT } from "src/constants";
import Title from "src/components/title";

export const SceneEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
const history = useHistory();
Expand Down Expand Up @@ -46,12 +47,15 @@ export const SceneEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
});
};

const sceneTitle = edit.target?.title ?? edit.details.title;

return (
<div>
<Title page={`Update scene edit for "${sceneTitle}"`} />
<h3>
Update scene edit for
<i className="ms-2">
<b>{edit.target?.title ?? edit.details.title}</b>
<b>{sceneTitle}</b>
</i>
</h3>
<hr />
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/studios/StudioEditUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import StudioForm from "./studioForm";

import { EditUpdate_findEdit as Edit } from "src/graphql/definitions/EditUpdate";
import { ROUTE_EDIT } from "src/constants";
import Title from "src/components/title";

export const StudioEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
const history = useHistory();
Expand Down Expand Up @@ -43,12 +44,15 @@ export const StudioEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
});
};

const studioName = edit?.target?.name ?? edit.details?.name;

return (
<div>
<Title page={`Update studio edit for "${studioName}"`} />
<h3>
Update studio edit for
<i className="ms-2">
<b>{edit?.target?.name ?? edit.details?.name}</b>
<b>{studioName}</b>
</i>
</h3>
<hr />
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/tags/TagEditUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TagForm from "./tagForm";

import { EditUpdate_findEdit as Edit } from "src/graphql/definitions/EditUpdate";
import { ROUTE_EDIT } from "src/constants";
import Title from "src/components/title";

export const TagEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
const history = useHistory();
Expand Down Expand Up @@ -40,12 +41,15 @@ export const TagEditUpdate: FC<{ edit: Edit }> = ({ edit }) => {
});
};

const tagName = edit.target?.name ?? edit.details.name;

return (
<div>
<Title page={`Update tag edit for "${tagName}"`} />
<h3>
Update tag edit for
<i className="ms-2">
<b>{edit.target?.name ?? edit.details.name}</b>
<b>{tagName}</b>
</i>
</h3>
<hr />
Expand Down

0 comments on commit 0b4d121

Please sign in to comment.