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
|
@ -97,7 +97,7 @@
|
||||||
"copied_to_clipboard": "Скопировано",
|
"copied_to_clipboard": "Скопировано",
|
||||||
"got_it": "Понятно",
|
"got_it": "Понятно",
|
||||||
"multi_language": "Мультиязычный",
|
"multi_language": "Мультиязычный",
|
||||||
"multiplayer": "Многопользовательский"
|
"multiplayer": "Многопользовательский",
|
||||||
"no_shop_details": "Не удалось получить описание",
|
"no_shop_details": "Не удалось получить описание",
|
||||||
"download_options": "Вариантов загрузки",
|
"download_options": "Вариантов загрузки",
|
||||||
"download_path": "Путь для загрузок",
|
"download_path": "Путь для загрузок",
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
export const isMultiplayerRepack = (title: string) => {
|
export const isMultiplayerRepack = (title: string, repacker: string) => {
|
||||||
const toLower = title.toLowerCase();
|
const titleToLower = title.toLowerCase();
|
||||||
|
const repackerToLower = repacker.toLowerCase();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
toLower.includes("multiplayer") ||
|
titleToLower.includes("multiplayer") ||
|
||||||
toLower.includes("onlinefix") ||
|
titleToLower.includes("onlinefix") ||
|
||||||
toLower.includes("online fix")
|
titleToLower.includes("online fix") ||
|
||||||
|
repackerToLower.includes("onlinefix") ||
|
||||||
|
repackerToLower.includes("online fix")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ export function RepacksModal({
|
||||||
{supportMultiLanguage(repack.title) && (
|
{supportMultiLanguage(repack.title) && (
|
||||||
<Tag>{t("multi_language")}</Tag>
|
<Tag>{t("multi_language")}</Tag>
|
||||||
)}
|
)}
|
||||||
{isMultiplayerRepack(repack.title) && (
|
{isMultiplayerRepack(repack.title, repack.repacker) && (
|
||||||
<Tag>{t("multiplayer")}</Tag>
|
<Tag>{t("multiplayer")}</Tag>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue