mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
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:
@@ -2,6 +2,8 @@ fragment GalleryData on Gallery {
|
|||||||
id
|
id
|
||||||
checksum
|
checksum
|
||||||
path
|
path
|
||||||
|
created_at
|
||||||
|
updated_at
|
||||||
title
|
title
|
||||||
date
|
date
|
||||||
url
|
url
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ fragment ImageData on Image {
|
|||||||
organized
|
organized
|
||||||
o_counter
|
o_counter
|
||||||
path
|
path
|
||||||
|
created_at
|
||||||
|
updated_at
|
||||||
|
|
||||||
file {
|
file {
|
||||||
size
|
size
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ fragment SceneData on Scene {
|
|||||||
phash
|
phash
|
||||||
interactive
|
interactive
|
||||||
interactive_speed
|
interactive_speed
|
||||||
|
created_at
|
||||||
|
updated_at
|
||||||
|
|
||||||
file {
|
file {
|
||||||
size
|
size
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
* Added forward jump 10 second button to video player. ([#1973](https://github.com/stashapp/stash/pull/1973))
|
* Added forward jump 10 second button to video player. ([#1973](https://github.com/stashapp/stash/pull/1973))
|
||||||
|
|
||||||
### 🎨 Improvements
|
### 🎨 Improvements
|
||||||
|
* Show Created/Updated dates in scene/image/gallery details pages. ([#2145](https://github.com/stashapp/stash/pull/2145))
|
||||||
* Added support for setting scrapers path in the settings page. ([#2124](https://github.com/stashapp/stash/pull/2124))
|
* Added support for setting scrapers path in the settings page. ([#2124](https://github.com/stashapp/stash/pull/2124))
|
||||||
* Added keyboard shortcuts to hide scene page sidebar and scene scrubber. ([#2099](https://github.com/stashapp/stash/pull/2099))
|
* Added keyboard shortcuts to hide scene page sidebar and scene scrubber. ([#2099](https://github.com/stashapp/stash/pull/2099))
|
||||||
* Overhauled, restructured and added auto-save to the settings pages. ([#2086](https://github.com/stashapp/stash/pull/2086))
|
* Overhauled, restructured and added auto-save to the settings pages. ([#2086](https://github.com/stashapp/stash/pull/2086))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { FormattedDate } from "react-intl";
|
import { FormattedDate, FormattedMessage, useIntl } from "react-intl";
|
||||||
import * as GQL from "src/core/generated-graphql";
|
import * as GQL from "src/core/generated-graphql";
|
||||||
import { TextUtils } from "src/utils";
|
import { TextUtils } from "src/utils";
|
||||||
import { TagLink, TruncatedText } from "src/components/Shared";
|
import { TagLink, TruncatedText } from "src/components/Shared";
|
||||||
@@ -15,6 +15,8 @@ interface IGalleryDetailProps {
|
|||||||
export const GalleryDetailPanel: React.FC<IGalleryDetailProps> = ({
|
export const GalleryDetailPanel: React.FC<IGalleryDetailProps> = ({
|
||||||
gallery,
|
gallery,
|
||||||
}) => {
|
}) => {
|
||||||
|
const intl = useIntl();
|
||||||
|
|
||||||
function renderDetails() {
|
function renderDetails() {
|
||||||
if (!gallery.details) return;
|
if (!gallery.details) return;
|
||||||
return (
|
return (
|
||||||
@@ -86,6 +88,14 @@ export const GalleryDetailPanel: React.FC<IGalleryDetailProps> = ({
|
|||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
|
<h6>
|
||||||
|
<FormattedMessage id="created_at" />:{" "}
|
||||||
|
{TextUtils.formatDate(intl, gallery.created_at)}{" "}
|
||||||
|
</h6>
|
||||||
|
<h6>
|
||||||
|
<FormattedMessage id="updated_at" />:{" "}
|
||||||
|
{TextUtils.formatDate(intl, gallery.updated_at)}{" "}
|
||||||
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
{gallery.studio && (
|
{gallery.studio && (
|
||||||
<div className="col-3 d-xl-none">
|
<div className="col-3 d-xl-none">
|
||||||
|
|||||||
@@ -6,12 +6,15 @@ import { TagLink, TruncatedText } from "src/components/Shared";
|
|||||||
import { PerformerCard } from "src/components/Performers/PerformerCard";
|
import { PerformerCard } from "src/components/Performers/PerformerCard";
|
||||||
import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars";
|
import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars";
|
||||||
import { sortPerformers } from "src/core/performers";
|
import { sortPerformers } from "src/core/performers";
|
||||||
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
interface IImageDetailProps {
|
interface IImageDetailProps {
|
||||||
image: GQL.ImageDataFragment;
|
image: GQL.ImageDataFragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ImageDetailPanel: React.FC<IImageDetailProps> = (props) => {
|
export const ImageDetailPanel: React.FC<IImageDetailProps> = (props) => {
|
||||||
|
const intl = useIntl();
|
||||||
|
|
||||||
function renderTags() {
|
function renderTags() {
|
||||||
if (props.image.tags.length === 0) return;
|
if (props.image.tags.length === 0) return;
|
||||||
const tags = props.image.tags.map((tag) => (
|
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>
|
</div>
|
||||||
{props.image.studio && (
|
{props.image.studio && (
|
||||||
<div className="col-3 d-xl-none">
|
<div className="col-3 d-xl-none">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { FormattedDate, FormattedMessage } from "react-intl";
|
import { FormattedDate, FormattedMessage, useIntl } from "react-intl";
|
||||||
import * as GQL from "src/core/generated-graphql";
|
import * as GQL from "src/core/generated-graphql";
|
||||||
import { TextUtils } from "src/utils";
|
import { TextUtils } from "src/utils";
|
||||||
import { TagLink, TruncatedText } from "src/components/Shared";
|
import { TagLink, TruncatedText } from "src/components/Shared";
|
||||||
@@ -13,6 +13,8 @@ interface ISceneDetailProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const SceneDetailPanel: React.FC<ISceneDetailProps> = (props) => {
|
export const SceneDetailPanel: React.FC<ISceneDetailProps> = (props) => {
|
||||||
|
const intl = useIntl();
|
||||||
|
|
||||||
function renderDetails() {
|
function renderDetails() {
|
||||||
if (!props.scene.details || props.scene.details === "") return;
|
if (!props.scene.details || props.scene.details === "") return;
|
||||||
return (
|
return (
|
||||||
@@ -112,6 +114,14 @@ export const SceneDetailPanel: React.FC<ISceneDetailProps> = (props) => {
|
|||||||
)}
|
)}
|
||||||
</h6>
|
</h6>
|
||||||
)}
|
)}
|
||||||
|
<h6>
|
||||||
|
<FormattedMessage id="created_at" />:{" "}
|
||||||
|
{TextUtils.formatDate(intl, props.scene.created_at)}{" "}
|
||||||
|
</h6>
|
||||||
|
<h6>
|
||||||
|
<FormattedMessage id="updated_at" />:{" "}
|
||||||
|
{TextUtils.formatDate(intl, props.scene.updated_at)}{" "}
|
||||||
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
{props.scene.studio && (
|
{props.scene.studio && (
|
||||||
<div className="col-3 d-xl-none">
|
<div className="col-3 d-xl-none">
|
||||||
|
|||||||
Reference in New Issue
Block a user