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:
skier233
2022-11-15 17:31:44 -05:00
committed by GitHub
parent f66333bac9
commit 7eae751d1c
133 changed files with 2192 additions and 761 deletions

View File

@@ -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() {