mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Add sfw label for o-count in stats page (#6410)
This commit is contained in:
@@ -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"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user