Add sfw label for o-count in stats page (#6410)

This commit is contained in:
WithoutPants
2025-12-15 08:16:58 +11:00
committed by GitHub
parent 65327a6102
commit f64cd5bfac
2 changed files with 10 additions and 1 deletions

View File

@@ -4,8 +4,16 @@ import { FormattedMessage, FormattedNumber } from "react-intl";
import { LoadingIndicator } from "src/components/Shared/LoadingIndicator";
import TextUtils from "src/utils/text";
import { FileSize } from "./Shared/FileSize";
import { useConfigurationContext } from "src/hooks/Config";
export const Stats: React.FC = () => {
const { configuration } = useConfigurationContext();
const { sfwContentMode } = configuration.interface;
const oCountID = sfwContentMode
? "stats.total_o_count_sfw"
: "stats.total_o_count";
const { data, error, loading } = useStats();
if (error) return <span>{error.message}</span>;
@@ -111,7 +119,7 @@ export const Stats: React.FC = () => {
<FormattedNumber value={data.stats.total_o_count} />
</p>
<p className="heading">
<FormattedMessage id="stats.total_o_count" />
<FormattedMessage id={oCountID} />
</p>
</div>
<div className="stats-element">

View File

@@ -1484,6 +1484,7 @@
"scenes_played": "Scenes Played",
"scenes_size": "Scenes size",
"total_o_count": "Total O-Count",
"total_o_count_sfw": "Total Likes",
"total_play_count": "Total Play Count",
"total_play_duration": "Total Play Duration"
},