Creation and update dates visible for images and scenes (#2145)

* Exposed created_at and updated_at dates on the detail panels for images and scenes
* Add fields to gallery page
* Internationalisation

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
meed69
2021-12-19 21:20:08 -05:00
committed by GitHub
parent bdfb8ad567
commit 4927bb078c
7 changed files with 45 additions and 2 deletions

View File

@@ -6,12 +6,15 @@ import { TagLink, TruncatedText } from "src/components/Shared";
import { PerformerCard } from "src/components/Performers/PerformerCard";
import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars";
import { sortPerformers } from "src/core/performers";
import { FormattedMessage, useIntl } from "react-intl";
interface IImageDetailProps {
image: GQL.ImageDataFragment;
}
export const ImageDetailPanel: React.FC<IImageDetailProps> = (props) => {
const intl = useIntl();
function renderTags() {
if (props.image.tags.length === 0) return;
const tags = props.image.tags.map((tag) => (
@@ -91,6 +94,19 @@ export const ImageDetailPanel: React.FC<IImageDetailProps> = (props) => {
) : (
""
)}
{
<h6>
{" "}
<FormattedMessage id="created_at" />:{" "}
{TextUtils.formatDate(intl, props.image.created_at)}{" "}
</h6>
}
{
<h6>
<FormattedMessage id="updated_at" />:{" "}
{TextUtils.formatDate(intl, props.image.updated_at)}{" "}
</h6>
}
</div>
{props.image.studio && (
<div className="col-3 d-xl-none">