decord/source/modules/game_profile/GameProfileReviewUtils.tsx

87 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9174
// Function ID: 9175
2026-07-20 16:05:17 +00:00
// Name: getSteamReviewScoreDescriptionColor
2026-08-24 06:08:38 +00:00
// Dependencies: [4516, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: canShowLocalizedSteamReview, getSteamReviewScoreDescriptionColor, getSteamReviewScoreDescriptionIntl
2026-08-24 06:08:38 +00:00
// Module 9174 (getSteamReviewScoreDescriptionColor)
import set from "set" /* 2 */;
import GameTheme from "GameTheme" /* 4516 */;
const result = set.fileFinishedImporting("modules/game_profile/GameProfileReviewUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getSteamReviewScoreDescriptionColor = function getSteamReviewScoreDescriptionColor(NO_USER_REVIEWS) {
2026-08-24 06:08:38 +00:00
if (GameTheme.SteamReviewScoreDescription.NO_USER_REVIEWS === NO_USER_REVIEWS) {
2026-07-20 16:05:17 +00:00
return "text-subtle";
} else {
2026-08-24 06:08:38 +00:00
if (tmp(4516).SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.VERY_POSITIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.POSITIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.MOSTLY_POSITIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.MIXED === NO_USER_REVIEWS) {
2026-07-20 16:05:17 +00:00
return "steam-review-text-mixed";
} else {
2026-08-24 06:08:38 +00:00
if (tmp(4516).SteamReviewScoreDescription.MOSTLY_NEGATIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.NEGATIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.VERY_NEGATIVE !== NO_USER_REVIEWS) {
if (tmp(4516).SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE !== NO_USER_REVIEWS) {
2026-07-20 16:05:17 +00:00
return "text-subtle";
}
}
}
}
return "steam-review-text-negative";
}
}
}
}
}
return "steam-review-text-positive";
}
};
export const getSteamReviewScoreDescriptionIntl = function getSteamReviewScoreDescriptionIntl(result) {
2026-08-24 06:08:38 +00:00
if (GameTheme.SteamReviewScoreDescription.NO_USER_REVIEWS === result) {
2026-07-29 08:29:29 +00:00
const intl10 = tmp(1236).intl;
return intl10.string(tmp(1236).t.CLMt8J);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE === result) {
2026-07-29 08:29:29 +00:00
const intl9 = tmp(1236).intl;
return intl9.string(tmp(1236).t["75sx1S"]);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.VERY_POSITIVE === result) {
2026-07-29 08:29:29 +00:00
const intl8 = tmp(1236).intl;
return intl8.string(tmp(1236).t["EkOVg+"]);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.POSITIVE === result) {
2026-07-29 08:29:29 +00:00
const intl7 = tmp(1236).intl;
return intl7.string(tmp(1236).t.ZUkFtr);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.MOSTLY_POSITIVE === result) {
2026-07-29 08:29:29 +00:00
const intl6 = tmp(1236).intl;
return intl6.string(tmp(1236).t.M7Z09a);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.MIXED === result) {
2026-07-29 08:29:29 +00:00
const intl5 = tmp(1236).intl;
return intl5.string(tmp(1236).t.c8yuHR);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.MOSTLY_NEGATIVE === result) {
2026-07-29 08:29:29 +00:00
const intl4 = tmp(1236).intl;
return intl4.string(tmp(1236).t.H0MSjG);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.NEGATIVE === result) {
2026-07-29 08:29:29 +00:00
const intl3 = tmp(1236).intl;
return intl3.string(tmp(1236).t.vpLrgz);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.VERY_NEGATIVE === result) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp(1236).intl;
return intl2.string(tmp(1236).t["5spYuX"]);
2026-08-24 06:08:38 +00:00
} else if (tmp(4516).SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE === result) {
2026-07-29 08:29:29 +00:00
const intl = tmp(1236).intl;
return intl.string(tmp(1236).t.A8uk5J);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
};
export const canShowLocalizedSteamReview = function canShowLocalizedSteamReview(steam) {
let tmp = null != steam && null != steam.localizedRating && null != steam.localizedRatingCount && null != steam.ratingCount;
if (tmp) {
tmp = steam.localizedRatingCount >= 200;
}
if (tmp) {
tmp = steam.ratingCount >= 2000;
}
return tmp;
};