mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat(searcher): Add repacker check to isMultiplayerRepack function
This commit is contained in:
parent
81ea790d73
commit
1c56227fa3
3 changed files with 10 additions and 7 deletions
|
@ -1,10 +1,13 @@
|
|||
export const isMultiplayerRepack = (title: string) => {
|
||||
const toLower = title.toLowerCase();
|
||||
export const isMultiplayerRepack = (title: string, repacker: string) => {
|
||||
const titleToLower = title.toLowerCase();
|
||||
const repackerToLower = repacker.toLowerCase();
|
||||
|
||||
return (
|
||||
toLower.includes("multiplayer") ||
|
||||
toLower.includes("onlinefix") ||
|
||||
toLower.includes("online fix")
|
||||
titleToLower.includes("multiplayer") ||
|
||||
titleToLower.includes("onlinefix") ||
|
||||
titleToLower.includes("online fix") ||
|
||||
repackerToLower.includes("onlinefix") ||
|
||||
repackerToLower.includes("online fix")
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ export function RepacksModal({
|
|||
{supportMultiLanguage(repack.title) && (
|
||||
<Tag>{t("multi_language")}</Tag>
|
||||
)}
|
||||
{isMultiplayerRepack(repack.title) && (
|
||||
{isMultiplayerRepack(repack.title, repack.repacker) && (
|
||||
<Tag>{t("multiplayer")}</Tag>
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue