mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Stash rating system (#2830)
* add rating100 fields to represent rating range 1-100 * deprecate existing (1-5) rating fields * add half- and quarter-star options for rating system * add decimal rating system option Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useIntl } from "react-intl";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { NavUtils, TextUtils } from "src/utils";
|
||||
import {
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
import { PopoverCountButton } from "../Shared/PopoverCountButton";
|
||||
import GenderIcon from "./GenderIcon";
|
||||
import { faHeart, faTag } from "@fortawesome/free-solid-svg-icons";
|
||||
import { RatingBanner } from "../Shared/RatingBanner";
|
||||
|
||||
export interface IPerformerCardExtraCriteria {
|
||||
scenes: Criterion<CriterionValue>[];
|
||||
@@ -167,18 +168,10 @@ export const PerformerCard: React.FC<IPerformerCardProps> = ({
|
||||
}
|
||||
|
||||
function maybeRenderRatingBanner() {
|
||||
if (!performer.rating) {
|
||||
if (!performer.rating100) {
|
||||
return;
|
||||
}
|
||||
return (
|
||||
<div
|
||||
className={`rating-banner ${
|
||||
performer.rating ? `rating-${performer.rating}` : ""
|
||||
}`}
|
||||
>
|
||||
<FormattedMessage id="rating" />: {performer.rating}
|
||||
</div>
|
||||
);
|
||||
return <RatingBanner rating={performer.rating100} />;
|
||||
}
|
||||
|
||||
function maybeRenderFlag() {
|
||||
|
||||
Reference in New Issue
Block a user