mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Add missing card classes (#2327)
* Move performer flag and add classes * Add class to interactive heat map * Add classes to scene card * Add missing class names
This commit is contained in:
@@ -111,7 +111,7 @@ export const GalleryCard: React.FC<IProps> = (props) => {
|
|||||||
function maybeRenderOrganized() {
|
function maybeRenderOrganized() {
|
||||||
if (props.gallery.organized) {
|
if (props.gallery.organized) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="organized">
|
||||||
<Button className="minimal">
|
<Button className="minimal">
|
||||||
<Icon icon="box" />
|
<Icon icon="box" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export const ImageCard: React.FC<IImageCardProps> = (
|
|||||||
function maybeRenderOCounter() {
|
function maybeRenderOCounter() {
|
||||||
if (props.image.o_counter) {
|
if (props.image.o_counter) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="o-count">
|
||||||
<Button className="minimal">
|
<Button className="minimal">
|
||||||
<span className="fa-icon">
|
<span className="fa-icon">
|
||||||
<SweatDrops />
|
<SweatDrops />
|
||||||
@@ -65,7 +65,7 @@ export const ImageCard: React.FC<IImageCardProps> = (
|
|||||||
function maybeRenderOrganized() {
|
function maybeRenderOrganized() {
|
||||||
if (props.image.organized) {
|
if (props.image.organized) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="organized">
|
||||||
<Button className="minimal">
|
<Button className="minimal">
|
||||||
<Icon icon="box" />
|
<Icon icon="box" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -85,12 +85,14 @@ export const MovieCard: FunctionComponent<IProps> = (props: IProps) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
details={
|
details={
|
||||||
<>
|
<div className="movie-card__details">
|
||||||
<span>{props.movie.date}</span>
|
<span className="movie-card__date">{props.movie.date}</span>
|
||||||
<p>
|
<TruncatedText
|
||||||
<TruncatedText text={props.movie.synopsis} lineCount={3} />
|
className="movie-card__description"
|
||||||
</p>
|
text={props.movie.synopsis}
|
||||||
</>
|
lineCount={3}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
selected={props.selected}
|
selected={props.selected}
|
||||||
selecting={props.selecting}
|
selecting={props.selecting}
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
.movie-scene-number {
|
.movie-scene-number {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__details {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-images {
|
.movie-images {
|
||||||
|
|||||||
@@ -180,6 +180,22 @@ export const PerformerCard: React.FC<IPerformerCardProps> = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function maybeRenderFlag() {
|
||||||
|
if (performer.country) {
|
||||||
|
return (
|
||||||
|
<Link to={NavUtils.makePerformersCountryUrl(performer)}>
|
||||||
|
<CountryFlag
|
||||||
|
className="performer-card__country-flag"
|
||||||
|
country={performer.country}
|
||||||
|
/>
|
||||||
|
<span className="performer-card__country-string">
|
||||||
|
{performer.country}
|
||||||
|
</span>
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GridCard
|
<GridCard
|
||||||
className="performer-card"
|
className="performer-card"
|
||||||
@@ -197,14 +213,16 @@ export const PerformerCard: React.FC<IPerformerCardProps> = ({
|
|||||||
/>
|
/>
|
||||||
{maybeRenderFavoriteIcon()}
|
{maybeRenderFavoriteIcon()}
|
||||||
{maybeRenderRatingBanner()}
|
{maybeRenderRatingBanner()}
|
||||||
|
{maybeRenderFlag()}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
details={
|
details={
|
||||||
<>
|
<>
|
||||||
{age !== 0 ? <div className="text-muted">{ageString}</div> : ""}
|
{age !== 0 ? (
|
||||||
<Link to={NavUtils.makePerformersCountryUrl(performer)}>
|
<div className="performer-card__age">{ageString}</div>
|
||||||
<CountryFlag country={performer.country} />
|
) : (
|
||||||
</Link>
|
""
|
||||||
|
)}
|
||||||
{maybeRenderPopoverButtonGroup()}
|
{maybeRenderPopoverButtonGroup()}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,10 @@
|
|||||||
.performer-card {
|
.performer-card {
|
||||||
width: 20rem;
|
width: 20rem;
|
||||||
|
|
||||||
|
.thumbnail-section {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
&-image {
|
&-image {
|
||||||
height: 30rem;
|
height: 30rem;
|
||||||
min-width: 11.25rem;
|
min-width: 11.25rem;
|
||||||
@@ -70,6 +74,7 @@
|
|||||||
|
|
||||||
.flag-icon {
|
.flag-icon {
|
||||||
bottom: 1rem;
|
bottom: 1rem;
|
||||||
|
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9));
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 1rem;
|
right: 1rem;
|
||||||
@@ -83,6 +88,15 @@
|
|||||||
right: 5px;
|
right: 5px;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__age {
|
||||||
|
color: $muted-gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
// allow country string to be shown, but disable by default
|
||||||
|
&__country-string {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export const SceneCard: React.FC<ISceneCardProps> = (
|
|||||||
function maybeRenderOCounter() {
|
function maybeRenderOCounter() {
|
||||||
if (props.scene.o_counter) {
|
if (props.scene.o_counter) {
|
||||||
return (
|
return (
|
||||||
<div className="o-counter">
|
<div className="o-count">
|
||||||
<Button className="minimal">
|
<Button className="minimal">
|
||||||
<span className="fa-icon">
|
<span className="fa-icon">
|
||||||
<SweatDrops />
|
<SweatDrops />
|
||||||
@@ -354,12 +354,14 @@ export const SceneCard: React.FC<ISceneCardProps> = (
|
|||||||
}
|
}
|
||||||
overlays={maybeRenderSceneStudioOverlay()}
|
overlays={maybeRenderSceneStudioOverlay()}
|
||||||
details={
|
details={
|
||||||
<>
|
<div className="scene-card__details">
|
||||||
<span>{props.scene.date}</span>
|
<span className="scene-card__date">{props.scene.date}</span>
|
||||||
<p>
|
<TruncatedText
|
||||||
<TruncatedText text={props.scene.details} lineCount={3} />
|
className="scene-card__description"
|
||||||
</p>
|
text={props.scene.details}
|
||||||
</>
|
lineCount={3}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
popovers={maybeRenderPopoverButtonGroup()}
|
popovers={maybeRenderPopoverButtonGroup()}
|
||||||
selected={props.selected}
|
selected={props.selected}
|
||||||
|
|||||||
@@ -208,6 +208,10 @@ textarea.scene-description {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__details {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:active {
|
&:active {
|
||||||
.scene-specs-overlay,
|
.scene-specs-overlay,
|
||||||
|
|||||||
@@ -80,7 +80,13 @@ export const GridCard: React.FC<ICardProps> = (props: ICardProps) => {
|
|||||||
|
|
||||||
function maybeRenderInteractiveHeatmap() {
|
function maybeRenderInteractiveHeatmap() {
|
||||||
if (props.interactiveHeatmap) {
|
if (props.interactiveHeatmap) {
|
||||||
return <img src={props.interactiveHeatmap} alt="interactive heatmap" />;
|
return (
|
||||||
|
<img
|
||||||
|
src={props.interactiveHeatmap}
|
||||||
|
alt="interactive heatmap"
|
||||||
|
className="interactive-heatmap"
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function maybeRenderParent(
|
|||||||
) {
|
) {
|
||||||
if (!hideParent && studio.parent_studio) {
|
if (!hideParent && studio.parent_studio) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="studio-parent-studios">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="part_of"
|
id="part_of"
|
||||||
values={{
|
values={{
|
||||||
@@ -41,7 +41,7 @@ function maybeRenderParent(
|
|||||||
function maybeRenderChildren(studio: GQL.StudioDataFragment) {
|
function maybeRenderChildren(studio: GQL.StudioDataFragment) {
|
||||||
if (studio.child_studios.length > 0) {
|
if (studio.child_studios.length > 0) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="studio-child-studios">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="parent_of"
|
id="parent_of"
|
||||||
values={{
|
values={{
|
||||||
@@ -151,12 +151,12 @@ export const StudioCard: React.FC<IProps> = ({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
details={
|
details={
|
||||||
<>
|
<div className="studio-card__details">
|
||||||
{maybeRenderParent(studio, hideParent)}
|
{maybeRenderParent(studio, hideParent)}
|
||||||
{maybeRenderChildren(studio)}
|
{maybeRenderChildren(studio)}
|
||||||
<RatingBanner rating={studio.rating} />
|
<RatingBanner rating={studio.rating} />
|
||||||
{maybeRenderPopoverButtonGroup()}
|
{maybeRenderPopoverButtonGroup()}
|
||||||
</>
|
</div>
|
||||||
}
|
}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
selecting={selecting}
|
selecting={selecting}
|
||||||
|
|||||||
Reference in New Issue
Block a user