mirror of
https://github.com/stashapp/stash.git
synced 2026-01-08 16:49:21 +01:00
Add sfw label for o-count in stats page (#6410)
This commit is contained in:
parent
65327a6102
commit
f64cd5bfac
2 changed files with 10 additions and 1 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue