decord/alpha/source/modules/game_profile/GameProfileReviewUtils.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

86 lines
3.9 KiB
TypeScript

// Module ID: 9078
// Function ID: 9079
// Name: GameProfileReviewUtils
// Dependencies: [2019, 1115, 2]
// Exports: canShowLocalizedSteamReview, getSteamReviewScoreDescriptionColor, getSteamReviewScoreDescriptionIntl
// Module 9078 (GameProfileReviewUtils)
import GameDetectionTypes from "GameDetectionTypes" /* 2019 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/game_profile/GameProfileReviewUtils.tsx");
export const getSteamReviewScoreDescriptionColor = function getSteamReviewScoreDescriptionColor(NO_USER_REVIEWS) {
if (GameDetectionTypes.SteamReviewScoreDescription.NO_USER_REVIEWS === NO_USER_REVIEWS) {
return "text-subtle";
} else {
if (tmp(2019).SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.VERY_POSITIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.POSITIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.MOSTLY_POSITIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.MIXED === NO_USER_REVIEWS) {
return "steam-review-text-mixed";
} else {
if (tmp(2019).SteamReviewScoreDescription.MOSTLY_NEGATIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.NEGATIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.VERY_NEGATIVE !== NO_USER_REVIEWS) {
if (tmp(2019).SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE !== NO_USER_REVIEWS) {
return "text-subtle";
}
}
}
}
return "steam-review-text-negative";
}
}
}
}
}
return "steam-review-text-positive";
}
};
export const getSteamReviewScoreDescriptionIntl = function getSteamReviewScoreDescriptionIntl(result) {
if (GameDetectionTypes.SteamReviewScoreDescription.NO_USER_REVIEWS === result) {
const intl10 = tmp(1115).intl;
return intl10.string(tmp(1115).t.CLMt8J);
} else if (tmp(2019).SteamReviewScoreDescription.OVERWHELMINGLY_POSITIVE === result) {
const intl9 = tmp(1115).intl;
return intl9.string(tmp(1115).t["75sx1S"]);
} else if (tmp(2019).SteamReviewScoreDescription.VERY_POSITIVE === result) {
const intl8 = tmp(1115).intl;
return intl8.string(tmp(1115).t["EkOVg+"]);
} else if (tmp(2019).SteamReviewScoreDescription.POSITIVE === result) {
const intl7 = tmp(1115).intl;
return intl7.string(tmp(1115).t.ZUkFtr);
} else if (tmp(2019).SteamReviewScoreDescription.MOSTLY_POSITIVE === result) {
const intl6 = tmp(1115).intl;
return intl6.string(tmp(1115).t.M7Z09a);
} else if (tmp(2019).SteamReviewScoreDescription.MIXED === result) {
const intl5 = tmp(1115).intl;
return intl5.string(tmp(1115).t.c8yuHR);
} else if (tmp(2019).SteamReviewScoreDescription.MOSTLY_NEGATIVE === result) {
const intl4 = tmp(1115).intl;
return intl4.string(tmp(1115).t.H0MSjG);
} else if (tmp(2019).SteamReviewScoreDescription.NEGATIVE === result) {
const intl3 = tmp(1115).intl;
return intl3.string(tmp(1115).t.vpLrgz);
} else if (tmp(2019).SteamReviewScoreDescription.VERY_NEGATIVE === result) {
const intl2 = tmp(1115).intl;
return intl2.string(tmp(1115).t["5spYuX"]);
} else if (tmp(2019).SteamReviewScoreDescription.OVERWHELMINGLY_NEGATIVE === result) {
const intl = tmp(1115).intl;
return intl.string(tmp(1115).t.A8uk5J);
} 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;
};