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:
@@ -3,7 +3,7 @@ import { Badge } from "react-bootstrap";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { TextUtils } from "src/utils";
|
||||
import { RatingStars } from "src/components/Scenes/SceneDetails/RatingStars";
|
||||
import { RatingSystem } from "src/components/Shared/Rating/RatingSystem";
|
||||
import { TextField, URLField } from "src/utils/field";
|
||||
|
||||
interface IStudioDetailsPanel {
|
||||
@@ -14,9 +14,8 @@ export const StudioDetailsPanel: React.FC<IStudioDetailsPanel> = ({
|
||||
studio,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
|
||||
function renderRatingField() {
|
||||
if (!studio.rating) {
|
||||
if (!studio.rating100) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,7 +23,7 @@ export const StudioDetailsPanel: React.FC<IStudioDetailsPanel> = ({
|
||||
<>
|
||||
<dt>{intl.formatMessage({ id: "rating" })}</dt>
|
||||
<dd>
|
||||
<RatingStars value={studio.rating} disabled />
|
||||
<RatingSystem value={studio.rating100} disabled />
|
||||
</dd>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user