From da255f7c61b992bb043cbe82c9744e761e7f3866 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 16:06:48 -0300 Subject: [PATCH 01/26] fix: arrow have smaller height --- src/renderer/src/pages/game-details/gallery-slider.css.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/game-details/gallery-slider.css.ts b/src/renderer/src/pages/game-details/gallery-slider.css.ts index c7e0b7c2..18464eea 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.css.ts +++ b/src/renderer/src/pages/game-details/gallery-slider.css.ts @@ -78,8 +78,9 @@ export const gallerySliderButton = style({ all: "unset", display: "block", position: "absolute", - top: 0, - bottom: 0, + height: "15%", + top: "50%", + transform: "translateY(-50%)", padding: "1rem", cursor: "pointer", transition: "background-color 100ms ease-in-out", From 4015af164819d79e8c0894a6afcc30dcd3f1b06d Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 16:07:52 -0300 Subject: [PATCH 02/26] feat: remove autoplay from html tag. makes autoplay dinamically on scroll --- .../src/pages/game-details/gallery-slider.tsx | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/pages/game-details/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider.tsx index 1baca359..368a77f0 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.tsx +++ b/src/renderer/src/pages/game-details/gallery-slider.tsx @@ -9,6 +9,11 @@ export interface GallerySliderProps { export function GallerySlider({ gameDetails }: GallerySliderProps) { const scrollContainerRef = useRef(null); + const mediaContainerRef = useRef(null); + const currentVideoRef = useRef(null); + + const hasScreenshots = gameDetails && gameDetails.screenshots.length; + const hasMovies = gameDetails && gameDetails.movies?.length; const [mediaCount] = useState(() => { if (gameDetails) { @@ -28,6 +33,10 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { const [arrowShow, setArrowShow] = useState(false); const showNextImage = () => { + if (currentVideoRef.current) { + currentVideoRef.current.pause() + } + setMediaIndex((index: number) => { if (index === mediaCount - 1) return 0; @@ -36,6 +45,10 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { }; const showPrevImage = () => { + if (currentVideoRef.current) { + currentVideoRef.current.pause() + } + setMediaIndex((index: number) => { if (index === 0) return mediaCount - 1; @@ -47,6 +60,21 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { setMediaIndex(0); }, [gameDetails]); + useEffect(() => { + if (hasMovies && mediaContainerRef.current) { + mediaContainerRef.current.childNodes.forEach((node, index) => { + if (index == mediaIndex) { + if (node instanceof HTMLVideoElement) { + node.play() + currentVideoRef.current = node + } else { + console.log(" nao é video") + } + } + }) + } + }, [hasMovies, mediaContainerRef, mediaIndex]) + useEffect(() => { if (scrollContainerRef.current) { const container = scrollContainerRef.current; @@ -57,9 +85,6 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { } }, [gameDetails, mediaIndex, mediaCount]); - const hasScreenshots = gameDetails && gameDetails.screenshots.length; - const hasMovies = gameDetails && gameDetails.movies?.length; - return ( <> {hasScreenshots && ( @@ -68,6 +93,7 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { onMouseEnter={() => setArrowShow(true)} onMouseLeave={() => setArrowShow(false)} className={styles.gallerySliderAnimationContainer} + ref={mediaContainerRef} > {gameDetails.movies && gameDetails.movies.map((video: SteamMovies) => ( @@ -77,7 +103,6 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { className={styles.gallerySliderMedia} poster={video.thumbnail} style={{ translate: `${-100 * mediaIndex}%` }} - autoPlay loop muted > From 1c7c64a5a2188de368f9fa557f335f5936774f67 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 16:09:47 -0300 Subject: [PATCH 03/26] fix: replace webm with mp4 file. cause high cpu usage sometimes --- src/renderer/src/pages/game-details/gallery-slider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/pages/game-details/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider.tsx index 368a77f0..9a9d57fa 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.tsx +++ b/src/renderer/src/pages/game-details/gallery-slider.tsx @@ -106,7 +106,7 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { loop muted > - + ))} {gameDetails.screenshots && From 483f069d816be5df1d4d1963192f67153c87ffcf Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 16:11:08 -0300 Subject: [PATCH 04/26] remove debug log --- src/renderer/src/pages/game-details/gallery-slider.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/renderer/src/pages/game-details/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider.tsx index 9a9d57fa..287b83cb 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.tsx +++ b/src/renderer/src/pages/game-details/gallery-slider.tsx @@ -67,8 +67,6 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { if (node instanceof HTMLVideoElement) { node.play() currentVideoRef.current = node - } else { - console.log(" nao é video") } } }) From b0803fa28d744558e511f52798611acb39785e82 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 16:51:25 -0300 Subject: [PATCH 05/26] feat: add lazy loading to images and thumbs --- src/renderer/src/pages/game-details/gallery-slider.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer/src/pages/game-details/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider.tsx index 287b83cb..174c4759 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.tsx +++ b/src/renderer/src/pages/game-details/gallery-slider.tsx @@ -112,6 +112,7 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { (image: SteamScreenshot, i: number) => ( ( setMediaIndex(i)} src={video.thumbnail} className={`${styles.gallerySliderMediaPreview} ${mediaIndex === i ? styles.gallerySliderMediaPreviewActive : ""}`} @@ -156,6 +158,7 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { (image: SteamScreenshot, i: number) => ( setMediaIndex( i + (gameDetails.movies ? gameDetails.movies.length : 0) From 05c6c7c64d4011b837ca00e659cd541a4b838b0f Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 16:55:54 -0300 Subject: [PATCH 06/26] simplify chained ifs --- src/renderer/src/pages/game-details/gallery-slider.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/pages/game-details/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider.tsx index 174c4759..77fcb858 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.tsx +++ b/src/renderer/src/pages/game-details/gallery-slider.tsx @@ -63,11 +63,9 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { useEffect(() => { if (hasMovies && mediaContainerRef.current) { mediaContainerRef.current.childNodes.forEach((node, index) => { - if (index == mediaIndex) { - if (node instanceof HTMLVideoElement) { - node.play() - currentVideoRef.current = node - } + if (index == mediaIndex && node instanceof HTMLVideoElement) { + node.play() + currentVideoRef.current = node } }) } From 43026392202f22cd42c0d740b29f26f829596696 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sun, 12 May 2024 17:03:39 -0300 Subject: [PATCH 07/26] fix: video not playing on thumb click --- .../src/pages/game-details/gallery-slider.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/pages/game-details/gallery-slider.tsx b/src/renderer/src/pages/game-details/gallery-slider.tsx index 77fcb858..b0400bd9 100644 --- a/src/renderer/src/pages/game-details/gallery-slider.tsx +++ b/src/renderer/src/pages/game-details/gallery-slider.tsx @@ -33,10 +33,6 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { const [arrowShow, setArrowShow] = useState(false); const showNextImage = () => { - if (currentVideoRef.current) { - currentVideoRef.current.pause() - } - setMediaIndex((index: number) => { if (index === mediaCount - 1) return 0; @@ -45,10 +41,6 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { }; const showPrevImage = () => { - if (currentVideoRef.current) { - currentVideoRef.current.pause() - } - setMediaIndex((index: number) => { if (index === 0) return mediaCount - 1; @@ -61,6 +53,10 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { }, [gameDetails]); useEffect(() => { + if (currentVideoRef.current) { + currentVideoRef.current.pause() + } + if (hasMovies && mediaContainerRef.current) { mediaContainerRef.current.childNodes.forEach((node, index) => { if (index == mediaIndex && node instanceof HTMLVideoElement) { From 1c7911c531ba1d9bd14ca4e66b156ee9c06652ff Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 12 May 2024 23:43:00 +0100 Subject: [PATCH 08/26] feat: adding bypass for region blocks --- README.pt-BR.md | 16 +- README.ru.md | 20 +- README.uk-UA.md | 16 +- resources/hydra.db | 0 src/locales/en/translation.json | 3 +- src/locales/nl/translation.json | 345 +++++++++--------- src/locales/tr/translation.json | 325 ++++++++--------- src/locales/uk/translation.json | 332 ++++++++--------- .../events/catalogue/get-game-shop-details.ts | 54 +-- .../events/catalogue/search-game-repacks.ts | 14 + src/main/events/index.ts | 1 + src/main/services/real-debrid.ts | 9 +- src/preload/index.d.ts | 105 ------ src/preload/index.ts | 2 + .../src/components/game-card/game-card.css.ts | 41 +-- .../src/components/game-card/game-card.tsx | 10 +- src/renderer/src/components/hero/hero.css.ts | 3 +- src/renderer/src/components/hero/hero.tsx | 36 +- .../src/components/sidebar/sidebar.tsx | 5 +- src/renderer/src/declaration.d.ts | 2 + src/renderer/src/helpers.ts | 10 + .../src/pages/catalogue/catalogue.tsx | 3 +- .../pages/game-details/description-header.tsx | 4 +- .../src/pages/game-details/gallery-slider.tsx | 25 +- .../game-details/game-details-skeleton.tsx | 21 +- .../pages/game-details/game-details.css.ts | 89 ----- .../src/pages/game-details/game-details.tsx | 176 +++------ .../game-details/hero/hero-panel-actions.tsx | 20 +- .../pages/game-details/hero/hero-panel.css.ts | 2 +- .../pages/game-details/hero/hero-panel.tsx | 22 +- .../src/pages/game-details/repacks-modal.tsx | 15 +- .../game-details/select-folder-modal.tsx | 6 +- .../how-long-to-beat-section.tsx | 4 +- .../pages/game-details/sidebar/sidebar.css.ts | 92 +++++ .../pages/game-details/sidebar/sidebar.tsx | 84 +++++ src/renderer/src/pages/home/home.tsx | 5 +- .../src/pages/home/search-results.tsx | 3 +- src/types/index.ts | 1 - 38 files changed, 942 insertions(+), 979 deletions(-) delete mode 100644 resources/hydra.db create mode 100644 src/main/events/catalogue/search-game-repacks.ts delete mode 100644 src/preload/index.d.ts rename src/renderer/src/pages/game-details/{ => sidebar}/how-long-to-beat-section.tsx (95%) create mode 100644 src/renderer/src/pages/game-details/sidebar/sidebar.css.ts create mode 100644 src/renderer/src/pages/game-details/sidebar/sidebar.tsx diff --git a/README.pt-BR.md b/README.pt-BR.md index 4551dd6a..4adaef9e 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -2,7 +2,7 @@
- [](https://hydralauncher.site) +[](https://hydralauncher.site)

Hydra Launcher

@@ -10,15 +10,15 @@ Hydra é um Launcher de Jogos com seu próprio cliente de bittorrent integrado e um wrapper autogerenciado para busca de repacks.

- [![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) - [![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) +[![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) +[![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) - [![pt-BR](https://img.shields.io/badge/lang-pt--BR-green.svg)](README.pt-BR.md) - [![en](https://img.shields.io/badge/lang-en-red.svg)](README.md) - [![ru](https://img.shields.io/badge/lang-ru-yellow.svg)](README.ru.md) - [![uk-UA](https://img.shields.io/badge/lang-uk--UA-blue)](README.uk-UA.md) +[![pt-BR](https://img.shields.io/badge/lang-pt--BR-green.svg)](README.pt-BR.md) +[![en](https://img.shields.io/badge/lang-en-red.svg)](README.md) +[![ru](https://img.shields.io/badge/lang-ru-yellow.svg)](README.ru.md) +[![uk-UA](https://img.shields.io/badge/lang-uk--UA-blue)](README.uk-UA.md) - ![Hydra Catalogue](./docs/screenshot.png) +![Hydra Catalogue](./docs/screenshot.png)
diff --git a/README.ru.md b/README.ru.md index 78220ad4..cdc214f0 100644 --- a/README.ru.md +++ b/README.ru.md @@ -2,7 +2,7 @@
- [](https://hydralauncher.site) +[](https://hydralauncher.site)

Hydra Launcher

@@ -10,15 +10,15 @@ Hydra - это игровой лаунчер с собственным встроенным клиентом BitTorrent и самостоятельным scraper`ом для репаков.

- [![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) - [![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) +[![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) +[![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) - [![pt-BR](https://img.shields.io/badge/lang-pt--BR-green.svg)](README.pt-BR.md) - [![en](https://img.shields.io/badge/lang-en-red.svg)](README.md) - [![ru](https://img.shields.io/badge/lang-ru-yellow.svg)](README.ru.md) - [![uk-UA](https://img.shields.io/badge/lang-uk--UA-blue)](README.uk-UA.md) +[![pt-BR](https://img.shields.io/badge/lang-pt--BR-green.svg)](README.pt-BR.md) +[![en](https://img.shields.io/badge/lang-en-red.svg)](README.md) +[![ru](https://img.shields.io/badge/lang-ru-yellow.svg)](README.ru.md) +[![uk-UA](https://img.shields.io/badge/lang-uk--UA-blue)](README.uk-UA.md) - ![Hydra Catalogue](./docs/screenshot.png) +![Hydra Catalogue](./docs/screenshot.png)
@@ -67,8 +67,8 @@ Чтобы установить, выполните следующие шаги: 1. Скачайте последнюю версию Hydra с [страницы релизов](https://github.com/hydralauncher/hydra/releases/latest). - - Загрузите только .exe, если хотите установить Hydra на Windows. - - Загрузите .deb или .rpm или .zip, если хотите установить Hydra на Linux (в зависимости от вашего дистрибутива Linux). + - Загрузите только .exe, если хотите установить Hydra на Windows. + - Загрузите .deb или .rpm или .zip, если хотите установить Hydra на Linux (в зависимости от вашего дистрибутива Linux). 2. Запустите скачанный файл. 3. Наслаждайтесь Hydra! diff --git a/README.uk-UA.md b/README.uk-UA.md index 3b77009a..edb79c61 100644 --- a/README.uk-UA.md +++ b/README.uk-UA.md @@ -2,7 +2,7 @@
- [](https://hydralauncher.site) +[](https://hydralauncher.site)

Hydra Launcher

@@ -10,15 +10,15 @@ Hydra - це ігровий лаунчер з власним вбудованим bittorrent-клієнтом і самокерованим збирачем репаків.

- [![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) - [![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) +[![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) +[![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) - [![pt-BR](https://img.shields.io/badge/lang-pt--BR-green.svg)](README.pt-BR.md) - [![en](https://img.shields.io/badge/lang-en-red.svg)](README.md) - [![ru](https://img.shields.io/badge/lang-ru-yellow.svg)](README.ru.md) - [![uk-UA](https://img.shields.io/badge/lang-uk--UA-blue)](README.uk-UA.md) +[![pt-BR](https://img.shields.io/badge/lang-pt--BR-green.svg)](README.pt-BR.md) +[![en](https://img.shields.io/badge/lang-en-red.svg)](README.md) +[![ru](https://img.shields.io/badge/lang-ru-yellow.svg)](README.ru.md) +[![uk-UA](https://img.shields.io/badge/lang-uk--UA-blue)](README.uk-UA.md) - ![Hydra Catalogue](./docs/screenshot.png) +![Hydra Catalogue](./docs/screenshot.png)
diff --git a/resources/hydra.db b/resources/hydra.db deleted file mode 100644 index e69de29b..00000000 diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 0674d1b5..63a9e8d1 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -96,7 +96,8 @@ "dont_show_it_again": "Don't show it again", "copy_to_clipboard": "Copy", "copied_to_clipboard": "Copied", - "got_it": "Got it" + "got_it": "Got it", + "no_shop_details": "Could not retrieve shop details." }, "activation": { "title": "Activate Hydra", diff --git a/src/locales/nl/translation.json b/src/locales/nl/translation.json index 1bb59251..22cb1d90 100644 --- a/src/locales/nl/translation.json +++ b/src/locales/nl/translation.json @@ -1,175 +1,174 @@ { - "home": { - "featured": "Uitgelicht", - "recently_added": "Recent Toegevoegd", - "trending": "Trending", - "surprise_me": "Verrasing", - "no_results": "Geen resultaten gevonden" - }, - "sidebar": { - "catalogue": "catalogus", - "downloads": "Downloads", - "settings": "Instellingen", - "my_library": "Mijn Bibliotheek", - "downloading_metadata": "{{title}} (Downloading metadata…)", - "checking_files": "{{title}} ({{percentage}} - Folders checken…)", - "paused": "{{title}} (Gepauzeerd)", - "downloading": "{{title}} ({{percentage}} - Downloading…)", - "filter": "Filter Bibliotheek", - "follow_us": "volg ons", - "home": "Home", - "discord": "Volg onze Discord", - "telegram": "Volg onze Telegram", - "x": "Volg ons op X", - "github": "Contribute op GitHub" - }, - "header": { - "search": "Zoek spellen", - "home": "Home", - "catalogue": "Bibliotheek", - "downloads": "Downloads", - "search_results": "Zoek resultaten", - "settings": "Instellingen" - }, - "bottom_panel": { - "no_downloads_in_progress": "Geen Downloads bezig", - "downloading_metadata": "Downloading {{title}} metadata…", - "checking_files": "Checking {{title}} files… ({{percentage}} complete)", - "downloading": "Downloading {{title}}… ({{percentage}} complete) - Conclusion {{eta}} - {{speed}}" - }, - "catalogue": { - "next_page": "Volgende Pagina", - "previous_page": "Vorige Pagina" - }, - "game_details": { - "open_download_options": "Open download Instellingen", - "download_options_zero": "Geen download Instellingen", - "download_options_one": "{{count}} download Instellingen", - "download_options_other": "{{count}} download Instellingen", - "updated_at": "Geupdate {{updated_at}}", - "install": "Instaleer", - "resume": "Verder gaan", - "pause": "Pauze", - "cancel": "Stoppen", - "remove": "Verwijderen", - "remove_from_list": "Verwijdere van lijst", - "space_left_on_disk": "{{space}} Over op schijf", - "eta": "Conclusie {{eta}}", - "downloading_metadata": "Downloading metadata…", - "checking_files": "Files nakijken…", - "filter": "Filter repacks", - "requirements": "Systeem vereisten", - "minimum": "Minimaal", - "recommended": "Aanbevolen", - "no_minimum_requirements": "{{title}} biedt geen informatie over de minimale vereisten", - "no_recommended_requirements": "{{title}} biedt geen informatie over aanbevolen vereisten", - "paused_progress": "{{progress}} (Paused)", - "release_date": "Uitgebracht op {{date}}", - "publisher": "Gepubliceerd door {{publisher}}", - "copy_link_to_clipboard": "Kopieer link", - "copied_link_to_clipboard": "Link Gekopieerd", - "hours": "uren", - "minutes": "minuten", - "amount_hours": "{{amount}} uren", - "amount_minutes": "{{amount}} minuten", - "accuracy": "{{accuracy}}% nauwkeurigheid", - "add_to_library": "Toevoegen aan bibliotheek", - "remove_from_library": "Verwijderen uit bibliotheek", - "no_downloads": "Geen downloads beschikbaar", - "play_time": "Voor gespeeld {{amount}}", - "last_time_played": "Laatst gespeeld {{period}}", - "not_played_yet": "Je hebt nog niet gespeeld {{title}}", - "next_suggestion": "Volgende suggestie", - "play": "Speel", - "deleting": "Installatieprogramma verwijderen…", - "close": "Sluiten", - "playing_now": "Speel nu", - "change": "Verander", - "repacks_modal_description": "Kies de herverpakking die u wilt downloaden", - "downloads_path": "Downloads path", - "select_folder_hint": "Om de standaardmap te wijzigen, gaat u naar <0>instellingen", - "download_now": "Download nu", - "installation_instructions": "Installatie instructies", - "installation_instructions_description": "Er zijn extra stappen vereist om deze game te installeren", - "online_fix_instruction": "OnlineFix-spellen vereisen dat een wachtwoord wordt uitgepakt. Gebruik indien nodig het volgende wachtwoord:", - "dodi_installation_instruction": "Wanneer u het DODI-installatieprogramma opent, drukt u op de toets omhoog <0 /> op uw toetsenbord om het installatieproces te starten:", - "dont_show_it_again": "Laat het niet meer zien", - "copy_to_clipboard": "Kopiëren", - "copied_to_clipboard": "Gekopieerd", - "got_it": "Begrepen" - }, - "activation": { - "title": "Activeer Hydra", - "installation_id": "Installatie-ID:", - "enter_activation_code": "Voer uw activatiecode in", - "message": "Als je niet weet waar je dit moet vragen, dan moet je dit niet hebben.", - "activate": "Activeren", - "loading": "Bezig met laden…" - }, - "downloads": { - "resume": "Hervatten", - "pause": "Pauze", - "eta": "Conclusie{{eta}}", - "paused": "Gepauzeerd", - "verifying": "Verifiëren…", - "completed_at": "Voltooid binnen {{date}}", - "completed": "Voltooid", - "cancelled": "Geannuleerd", - "download_again": "Opnieuw downloaden", - "cancel": "Annuleren", - "filter": "Filter gedownloade games", - "remove": "Verwijderen", - "downloading_metadata": "Metagegevens downloaden", - "checking_files": "Bestanden controleren", - "starting_download": "download starten", - "deleting": "Installatieprogramma verwijderen…", - "delete": "Installatieprogramma verwijderen", - "remove_from_list": "Verwijderen", - "delete_modal_title": "Weet je het zeker?", - "delete_modal_description": "Hiermee worden alle installatiebestanden van uw computer verwijderd", - "install": "Installeren", - "real_debrid": "Real Debrid", - "torrent": "Torrent" - }, - "settings": { - "downloads_path": "Downloadpad", - "change": "Update", - "notifications": "Meldingen", - "enable_download_notifications": "Wanneer een download voltooid is", - "enable_repack_list_notifications": "Wanneer een nieuwe herverpakking wordt toegevoegd", - "telemetry": "Telemetrie", - "telemetry_description": "Schakel anonieme gebruiksstatistieken in", - "real_debrid_api_token_description": "Real Debrid API token", - "quit_app_instead_hiding": "Sluit Hydra af in plaats van te minimaliseren naar de lade", - "launch_with_system": "Start Hydra bij het opstarten van het systeem", - "general": "Algemeen", - "behavior": "Gedrag", - "enable_real_debrid": "Enable Real Debrid", - "real_debrid": "Real Debrid", - "real_debrid_api_token_hint": "U kunt uw API-sleutel <0>hier verkrijgen.", - "save_changes": "Wijzigingen opslaan" - }, - "notifications": { - "download_complete": "Download compleet", - "game_ready_to_install": "{{title}} is klaar om te installeren", - "repack_list_updated": "Herpaklijst bijgewerkt", - "repack_count_one": "{{count}} herverpakking toegevoegd", - "repack_count_other": "{{count}} herverpakkingen toegevoegd" - }, - "system_tray": { - "open": "Open Hydra", - "quit": "Verlaten" - }, - "game_card": { - "no_downloads": "Geen downloads beschikbaar" - }, - "binary_not_found_modal": { - "title": "Programma's niet geïnstalleerd", - "description": "Er zijn geen uitvoerbare bestanden van Wine of Lutris gevonden op uw systeem", - "instructions": "Controleer de juiste manier om ze op je Linux-distro te installeren, zodat de game normaal kan werken" - }, - "modal": { - "close": "Knop Sluiten" - } + "home": { + "featured": "Uitgelicht", + "recently_added": "Recent Toegevoegd", + "trending": "Trending", + "surprise_me": "Verrasing", + "no_results": "Geen resultaten gevonden" + }, + "sidebar": { + "catalogue": "catalogus", + "downloads": "Downloads", + "settings": "Instellingen", + "my_library": "Mijn Bibliotheek", + "downloading_metadata": "{{title}} (Downloading metadata…)", + "checking_files": "{{title}} ({{percentage}} - Folders checken…)", + "paused": "{{title}} (Gepauzeerd)", + "downloading": "{{title}} ({{percentage}} - Downloading…)", + "filter": "Filter Bibliotheek", + "follow_us": "volg ons", + "home": "Home", + "discord": "Volg onze Discord", + "telegram": "Volg onze Telegram", + "x": "Volg ons op X", + "github": "Contribute op GitHub" + }, + "header": { + "search": "Zoek spellen", + "home": "Home", + "catalogue": "Bibliotheek", + "downloads": "Downloads", + "search_results": "Zoek resultaten", + "settings": "Instellingen" + }, + "bottom_panel": { + "no_downloads_in_progress": "Geen Downloads bezig", + "downloading_metadata": "Downloading {{title}} metadata…", + "checking_files": "Checking {{title}} files… ({{percentage}} complete)", + "downloading": "Downloading {{title}}… ({{percentage}} complete) - Conclusion {{eta}} - {{speed}}" + }, + "catalogue": { + "next_page": "Volgende Pagina", + "previous_page": "Vorige Pagina" + }, + "game_details": { + "open_download_options": "Open download Instellingen", + "download_options_zero": "Geen download Instellingen", + "download_options_one": "{{count}} download Instellingen", + "download_options_other": "{{count}} download Instellingen", + "updated_at": "Geupdate {{updated_at}}", + "install": "Instaleer", + "resume": "Verder gaan", + "pause": "Pauze", + "cancel": "Stoppen", + "remove": "Verwijderen", + "remove_from_list": "Verwijdere van lijst", + "space_left_on_disk": "{{space}} Over op schijf", + "eta": "Conclusie {{eta}}", + "downloading_metadata": "Downloading metadata…", + "checking_files": "Files nakijken…", + "filter": "Filter repacks", + "requirements": "Systeem vereisten", + "minimum": "Minimaal", + "recommended": "Aanbevolen", + "no_minimum_requirements": "{{title}} biedt geen informatie over de minimale vereisten", + "no_recommended_requirements": "{{title}} biedt geen informatie over aanbevolen vereisten", + "paused_progress": "{{progress}} (Paused)", + "release_date": "Uitgebracht op {{date}}", + "publisher": "Gepubliceerd door {{publisher}}", + "copy_link_to_clipboard": "Kopieer link", + "copied_link_to_clipboard": "Link Gekopieerd", + "hours": "uren", + "minutes": "minuten", + "amount_hours": "{{amount}} uren", + "amount_minutes": "{{amount}} minuten", + "accuracy": "{{accuracy}}% nauwkeurigheid", + "add_to_library": "Toevoegen aan bibliotheek", + "remove_from_library": "Verwijderen uit bibliotheek", + "no_downloads": "Geen downloads beschikbaar", + "play_time": "Voor gespeeld {{amount}}", + "last_time_played": "Laatst gespeeld {{period}}", + "not_played_yet": "Je hebt nog niet gespeeld {{title}}", + "next_suggestion": "Volgende suggestie", + "play": "Speel", + "deleting": "Installatieprogramma verwijderen…", + "close": "Sluiten", + "playing_now": "Speel nu", + "change": "Verander", + "repacks_modal_description": "Kies de herverpakking die u wilt downloaden", + "downloads_path": "Downloads path", + "select_folder_hint": "Om de standaardmap te wijzigen, gaat u naar <0>instellingen", + "download_now": "Download nu", + "installation_instructions": "Installatie instructies", + "installation_instructions_description": "Er zijn extra stappen vereist om deze game te installeren", + "online_fix_instruction": "OnlineFix-spellen vereisen dat een wachtwoord wordt uitgepakt. Gebruik indien nodig het volgende wachtwoord:", + "dodi_installation_instruction": "Wanneer u het DODI-installatieprogramma opent, drukt u op de toets omhoog <0 /> op uw toetsenbord om het installatieproces te starten:", + "dont_show_it_again": "Laat het niet meer zien", + "copy_to_clipboard": "Kopiëren", + "copied_to_clipboard": "Gekopieerd", + "got_it": "Begrepen" + }, + "activation": { + "title": "Activeer Hydra", + "installation_id": "Installatie-ID:", + "enter_activation_code": "Voer uw activatiecode in", + "message": "Als je niet weet waar je dit moet vragen, dan moet je dit niet hebben.", + "activate": "Activeren", + "loading": "Bezig met laden…" + }, + "downloads": { + "resume": "Hervatten", + "pause": "Pauze", + "eta": "Conclusie{{eta}}", + "paused": "Gepauzeerd", + "verifying": "Verifiëren…", + "completed_at": "Voltooid binnen {{date}}", + "completed": "Voltooid", + "cancelled": "Geannuleerd", + "download_again": "Opnieuw downloaden", + "cancel": "Annuleren", + "filter": "Filter gedownloade games", + "remove": "Verwijderen", + "downloading_metadata": "Metagegevens downloaden", + "checking_files": "Bestanden controleren", + "starting_download": "download starten", + "deleting": "Installatieprogramma verwijderen…", + "delete": "Installatieprogramma verwijderen", + "remove_from_list": "Verwijderen", + "delete_modal_title": "Weet je het zeker?", + "delete_modal_description": "Hiermee worden alle installatiebestanden van uw computer verwijderd", + "install": "Installeren", + "real_debrid": "Real Debrid", + "torrent": "Torrent" + }, + "settings": { + "downloads_path": "Downloadpad", + "change": "Update", + "notifications": "Meldingen", + "enable_download_notifications": "Wanneer een download voltooid is", + "enable_repack_list_notifications": "Wanneer een nieuwe herverpakking wordt toegevoegd", + "telemetry": "Telemetrie", + "telemetry_description": "Schakel anonieme gebruiksstatistieken in", + "real_debrid_api_token_description": "Real Debrid API token", + "quit_app_instead_hiding": "Sluit Hydra af in plaats van te minimaliseren naar de lade", + "launch_with_system": "Start Hydra bij het opstarten van het systeem", + "general": "Algemeen", + "behavior": "Gedrag", + "enable_real_debrid": "Enable Real Debrid", + "real_debrid": "Real Debrid", + "real_debrid_api_token_hint": "U kunt uw API-sleutel <0>hier verkrijgen.", + "save_changes": "Wijzigingen opslaan" + }, + "notifications": { + "download_complete": "Download compleet", + "game_ready_to_install": "{{title}} is klaar om te installeren", + "repack_list_updated": "Herpaklijst bijgewerkt", + "repack_count_one": "{{count}} herverpakking toegevoegd", + "repack_count_other": "{{count}} herverpakkingen toegevoegd" + }, + "system_tray": { + "open": "Open Hydra", + "quit": "Verlaten" + }, + "game_card": { + "no_downloads": "Geen downloads beschikbaar" + }, + "binary_not_found_modal": { + "title": "Programma's niet geïnstalleerd", + "description": "Er zijn geen uitvoerbare bestanden van Wine of Lutris gevonden op uw systeem", + "instructions": "Controleer de juiste manier om ze op je Linux-distro te installeren, zodat de game normaal kan werken" + }, + "modal": { + "close": "Knop Sluiten" } - \ No newline at end of file +} diff --git a/src/locales/tr/translation.json b/src/locales/tr/translation.json index 5c19edea..6a7033b3 100644 --- a/src/locales/tr/translation.json +++ b/src/locales/tr/translation.json @@ -1,165 +1,164 @@ { - "home": { - "featured": "Öne çıkan", - "recently_added": "Son eklenen", - "trending": "Popüler", - "surprise_me": "Şaşırt beni", - "no_results": "Sonuç bulunamadı" - }, - "sidebar": { - "catalogue": "Katalog", - "downloads": "İndirmeler", - "settings": "Ayarlar", - "my_library": "Kütüphane", - "downloading_metadata": "{{title}} (Metadata indiriliyor…)", - "checking_files": "{{title}} ({{percentage}} - Dosyalar kontrol ediliyor…)", - "paused": "{{title}} (Duraklatıldı)", - "downloading": "{{title}} ({{percentage}} - İndiriliyor…)", - "filter": "Kütüphaneyi filtrele", - "follow_us": "Bizi takip et", - "home": "Ana menü", - "discord": "Discord'umuza katıl", - "telegram": "Telegram'umuza katıl", - "x": "X'te bizi takip et", - "github": "GitHub'da bize katkı yap" - }, - "header": { - "search": "Ara", - "home": "Ana menü", - "catalogue": "Katalog", - "downloads": "İndirmeler", - "search_results": "Arama sonuçları", - "settings": "Ayarlar" - }, - "bottom_panel": { - "no_downloads_in_progress": "İndirilen bir şey yok", - "downloading_metadata": "{{title}} metadatası indiriliyor…", - "checking_files": "{{title}} dosyaları kontrol ediliyor… ({{percentage}} tamamlandı)", - "downloading": "{{title}} indiriliyor… ({{percentage}} tamamlandı) - Bitiş {{eta}} - {{speed}}" - }, - "catalogue": { - "next_page": "Sonraki sayfa", - "previous_page": "Önceki sayfa" - }, - "game_details": { - "open_download_options": "İndirme seçeneklerini aç", - "download_options_zero": "İndirme seçeneği yok", - "download_options_one": "{{count}} indirme seçeneği", - "download_options_other": "{{count}} indirme seçeneği", - "updated_at": "{{updated_at}} güncellendi", - "install": "İndir", - "resume": "Devam et", - "pause": "Duraklat", - "cancel": "İptal et", - "remove": "Sil", - "remove_from_list": "Sil", - "space_left_on_disk": "Diskte {{space}} yer kaldı", - "eta": "Bitiş {{eta}}", - "downloading_metadata": "Metadata indiriliyor…", - "checking_files": "Dosyalar kontrol ediliyor…", - "filter": "Repackleri filtrele", - "requirements": "Sistem gereksinimleri", - "minimum": "Minimum", - "recommended": "Önerilen", - "no_minimum_requirements": "{{title}} minimum sistem gereksinim bilgilerini karşılamıyor", - "no_recommended_requirements": "{{title}} önerilen sistem gereksinim bilgilerini karşılamıyor", - "paused_progress": "{{progress}} (Duraklatıldı)", - "release_date": "{{date}} tarihinde çıktı", - "publisher": "{{publisher}} tarihinde yayınlandı", - "copy_link_to_clipboard": "Link'i kopyala", - "copied_link_to_clipboard": "Link kopyalandı", - "hours": "saatler", - "minutes": "dakikalar", - "amount_hours": "{{amount}} saat", - "amount_minutes": "{{amount}} dakika", - "accuracy": "%{{accuracy}} doğruluk", - "add_to_library": "Kütüphaneye ekle", - "remove_from_library": "Kütüphaneden kaldır", - "no_downloads": "İndirme yok", - "play_time": "{{amount}} oynandı", - "last_time_played": "Son oynanan {{period}}", - "not_played_yet": "Bu {{title}} hiç oynanmadı", - "next_suggestion": "Sıradaki öneri", - "play": "Oyna", - "deleting": "Installer siliniyor…", - "close": "Kapat", - "playing_now": "Şimdi oynanıyor", - "change": "Değiştir", - "repacks_modal_description": "İndirmek istediğiiniz repacki seçin", - "downloads_path": "İndirme yolu", - "select_folder_hint": "Varsayılan klasörü değiştirmek için ulaşmanız gereken ayar", - "settings": "Ayarlar", - "download_now": "Şimdi", - "installation_instructions": "Kurulum", - "installation_instructions_description": "Bu oyunu kurmak için ek adımlar gerekiyor", - "online_fix_instruction": "OnlineFix oyunlarını ayıklamak için parola gerekiyor. Gerekli olduğunda bu parolayı kullanın:", - "dodi_installation_instruction": "Dodi installerını açtığınızda, kurulumu başlatmak için bu tuşa basın <0 />:", - "dont_show_it_again": "Tekrar gösterme", - "copy_to_clipboard": "Kopyala", - "copied_to_clipboard": "Kopyalandı", - "got_it": "Tamam" - }, - "activation": { - "title": "Hydra'yı aktif et", - "installation_id": "Kurulum ID'si:", - "enter_activation_code": "Aktifleştirme kodunuzu girin", - "message": "Bunu nerede soracağınızı bilmiyorsanız, buna sahip olmamanız gerekiyor.", - "activate": "Aktif et", - "loading": "Yükleniyor…" - }, - "downloads": { - "resume": "Devam et", - "pause": "Duraklat", - "eta": "Bitiş {{eta}}", - "paused": "Duraklatıldı", - "verifying": "Doğrulanıyor…", - "completed_at": "{{date}} tarihinde tamamlanacak", - "completed": "Tamamlandı", - "cancelled": "İptal edildi", - "download_again": "Tekrar indir", - "cancel": "İptal et", - "filter": "Yüklü oyunları filtrele", - "remove": "Kaldır", - "downloading_metadata": "Metadata indiriliyor…", - "checking_files": "Dosyalar kontrol ediliyor…", - "starting_download": "İndirme başlatılıyor…", - "deleting": "Installer siliniyor…", - "delete": "Installer'ı sil", - "remove_from_list": "Kaldır", - "delete_modal_title": "Emin misiniz?", - "delete_modal_description": "Bu bilgisayarınızdan tüm kurulum dosyalarını silecek", - "install": "Kur" - }, - "settings": { - "downloads_path": "İndirme yolu", - "change": "Güncelle", - "notifications": "Bildirimler", - "enable_download_notifications": "Bir indirme bittiğinde", - "enable_repack_list_notifications": "Yeni bir repack eklendiğinde", - "telemetry": "Telemetri", - "telemetry_description": "Anonim kullanım istatistiklerini aktifleştir" - }, - "notifications": { - "download_complete": "İndirme tamamlandı", - "game_ready_to_install": "{{title}} kuruluma hazır", - "repack_list_updated": "Repack listesi güncellendi", - "repack_count_one": "{{count}} yeni repack eklendi", - "repack_count_other": "{{count}} yeni repack eklendi" - }, - "system_tray": { - "open": "Hydra'yı aç", - "quit": "Çık" - }, - "game_card": { - "no_downloads": "İndirme mevcut değil" - }, - "binary_not_found_modal": { - "title": "Programlar yüklü değil", - "description": "Sisteminizde Wine veya Lutris çalıştırılabiliri bulunamadı", - "instructions": "Oyunları düzgün şekilde çalıştırmak için Linux distronuza bunlardan birini nasıl yükleyebileceğinize bakın" - }, - "modal": { - "close": "Kapat tuşu" - } + "home": { + "featured": "Öne çıkan", + "recently_added": "Son eklenen", + "trending": "Popüler", + "surprise_me": "Şaşırt beni", + "no_results": "Sonuç bulunamadı" + }, + "sidebar": { + "catalogue": "Katalog", + "downloads": "İndirmeler", + "settings": "Ayarlar", + "my_library": "Kütüphane", + "downloading_metadata": "{{title}} (Metadata indiriliyor…)", + "checking_files": "{{title}} ({{percentage}} - Dosyalar kontrol ediliyor…)", + "paused": "{{title}} (Duraklatıldı)", + "downloading": "{{title}} ({{percentage}} - İndiriliyor…)", + "filter": "Kütüphaneyi filtrele", + "follow_us": "Bizi takip et", + "home": "Ana menü", + "discord": "Discord'umuza katıl", + "telegram": "Telegram'umuza katıl", + "x": "X'te bizi takip et", + "github": "GitHub'da bize katkı yap" + }, + "header": { + "search": "Ara", + "home": "Ana menü", + "catalogue": "Katalog", + "downloads": "İndirmeler", + "search_results": "Arama sonuçları", + "settings": "Ayarlar" + }, + "bottom_panel": { + "no_downloads_in_progress": "İndirilen bir şey yok", + "downloading_metadata": "{{title}} metadatası indiriliyor…", + "checking_files": "{{title}} dosyaları kontrol ediliyor… ({{percentage}} tamamlandı)", + "downloading": "{{title}} indiriliyor… ({{percentage}} tamamlandı) - Bitiş {{eta}} - {{speed}}" + }, + "catalogue": { + "next_page": "Sonraki sayfa", + "previous_page": "Önceki sayfa" + }, + "game_details": { + "open_download_options": "İndirme seçeneklerini aç", + "download_options_zero": "İndirme seçeneği yok", + "download_options_one": "{{count}} indirme seçeneği", + "download_options_other": "{{count}} indirme seçeneği", + "updated_at": "{{updated_at}} güncellendi", + "install": "İndir", + "resume": "Devam et", + "pause": "Duraklat", + "cancel": "İptal et", + "remove": "Sil", + "remove_from_list": "Sil", + "space_left_on_disk": "Diskte {{space}} yer kaldı", + "eta": "Bitiş {{eta}}", + "downloading_metadata": "Metadata indiriliyor…", + "checking_files": "Dosyalar kontrol ediliyor…", + "filter": "Repackleri filtrele", + "requirements": "Sistem gereksinimleri", + "minimum": "Minimum", + "recommended": "Önerilen", + "no_minimum_requirements": "{{title}} minimum sistem gereksinim bilgilerini karşılamıyor", + "no_recommended_requirements": "{{title}} önerilen sistem gereksinim bilgilerini karşılamıyor", + "paused_progress": "{{progress}} (Duraklatıldı)", + "release_date": "{{date}} tarihinde çıktı", + "publisher": "{{publisher}} tarihinde yayınlandı", + "copy_link_to_clipboard": "Link'i kopyala", + "copied_link_to_clipboard": "Link kopyalandı", + "hours": "saatler", + "minutes": "dakikalar", + "amount_hours": "{{amount}} saat", + "amount_minutes": "{{amount}} dakika", + "accuracy": "%{{accuracy}} doğruluk", + "add_to_library": "Kütüphaneye ekle", + "remove_from_library": "Kütüphaneden kaldır", + "no_downloads": "İndirme yok", + "play_time": "{{amount}} oynandı", + "last_time_played": "Son oynanan {{period}}", + "not_played_yet": "Bu {{title}} hiç oynanmadı", + "next_suggestion": "Sıradaki öneri", + "play": "Oyna", + "deleting": "Installer siliniyor…", + "close": "Kapat", + "playing_now": "Şimdi oynanıyor", + "change": "Değiştir", + "repacks_modal_description": "İndirmek istediğiiniz repacki seçin", + "downloads_path": "İndirme yolu", + "select_folder_hint": "Varsayılan klasörü değiştirmek için ulaşmanız gereken ayar", + "settings": "Ayarlar", + "download_now": "Şimdi", + "installation_instructions": "Kurulum", + "installation_instructions_description": "Bu oyunu kurmak için ek adımlar gerekiyor", + "online_fix_instruction": "OnlineFix oyunlarını ayıklamak için parola gerekiyor. Gerekli olduğunda bu parolayı kullanın:", + "dodi_installation_instruction": "Dodi installerını açtığınızda, kurulumu başlatmak için bu tuşa basın <0 />:", + "dont_show_it_again": "Tekrar gösterme", + "copy_to_clipboard": "Kopyala", + "copied_to_clipboard": "Kopyalandı", + "got_it": "Tamam" + }, + "activation": { + "title": "Hydra'yı aktif et", + "installation_id": "Kurulum ID'si:", + "enter_activation_code": "Aktifleştirme kodunuzu girin", + "message": "Bunu nerede soracağınızı bilmiyorsanız, buna sahip olmamanız gerekiyor.", + "activate": "Aktif et", + "loading": "Yükleniyor…" + }, + "downloads": { + "resume": "Devam et", + "pause": "Duraklat", + "eta": "Bitiş {{eta}}", + "paused": "Duraklatıldı", + "verifying": "Doğrulanıyor…", + "completed_at": "{{date}} tarihinde tamamlanacak", + "completed": "Tamamlandı", + "cancelled": "İptal edildi", + "download_again": "Tekrar indir", + "cancel": "İptal et", + "filter": "Yüklü oyunları filtrele", + "remove": "Kaldır", + "downloading_metadata": "Metadata indiriliyor…", + "checking_files": "Dosyalar kontrol ediliyor…", + "starting_download": "İndirme başlatılıyor…", + "deleting": "Installer siliniyor…", + "delete": "Installer'ı sil", + "remove_from_list": "Kaldır", + "delete_modal_title": "Emin misiniz?", + "delete_modal_description": "Bu bilgisayarınızdan tüm kurulum dosyalarını silecek", + "install": "Kur" + }, + "settings": { + "downloads_path": "İndirme yolu", + "change": "Güncelle", + "notifications": "Bildirimler", + "enable_download_notifications": "Bir indirme bittiğinde", + "enable_repack_list_notifications": "Yeni bir repack eklendiğinde", + "telemetry": "Telemetri", + "telemetry_description": "Anonim kullanım istatistiklerini aktifleştir" + }, + "notifications": { + "download_complete": "İndirme tamamlandı", + "game_ready_to_install": "{{title}} kuruluma hazır", + "repack_list_updated": "Repack listesi güncellendi", + "repack_count_one": "{{count}} yeni repack eklendi", + "repack_count_other": "{{count}} yeni repack eklendi" + }, + "system_tray": { + "open": "Hydra'yı aç", + "quit": "Çık" + }, + "game_card": { + "no_downloads": "İndirme mevcut değil" + }, + "binary_not_found_modal": { + "title": "Programlar yüklü değil", + "description": "Sisteminizde Wine veya Lutris çalıştırılabiliri bulunamadı", + "instructions": "Oyunları düzgün şekilde çalıştırmak için Linux distronuza bunlardan birini nasıl yükleyebileceğinize bakın" + }, + "modal": { + "close": "Kapat tuşu" } - +} diff --git a/src/locales/uk/translation.json b/src/locales/uk/translation.json index e810e30e..e8d1c117 100644 --- a/src/locales/uk/translation.json +++ b/src/locales/uk/translation.json @@ -1,167 +1,167 @@ { - "home": { - "featured": "Рекомендоване", - "recently_added": "Нове", - "trending": "У тренді", - "surprise_me": "Здивуй мене", - "no_results": "Результатів не знайдено" - }, - "sidebar": { - "catalogue": "Каталог", - "downloads": "Завантаження", - "settings": "Налаштування", - "my_library": "Бібліотека", - "downloading_metadata": "{{title}} (Завантаження метаданих…)", - "checking_files": "{{title}} ({{percentage}} - Перевірка файлів…)", - "paused": "{{title}} (Призупинено)", - "downloading": "{{title}} ({{percentage}} - Завантаження…)", - "filter": "Фільтр бібліотеки", - "follow_us": "Підписуйтесь на нас", - "home": "Головна", - "discord": "Приєднуйтесь до Discord", - "telegram": "Приєднуйтесь до Telegram", - "x": "Підписуйтесь на X", - "github": "Зробіть свій внесок на GitHub" - }, - "header": { - "search": "Пошук", - "home": "Головна", - "catalogue": "Каталог", - "downloads": "Завантаження", - "search_results": "Результати пошуку", - "settings": "Налаштування" - }, - "bottom_panel": { - "no_downloads_in_progress": "Немає активних завантажень", - "downloading_metadata": "Завантаження метаданих {{title}}…", - "checking_files": "Перевірка файлів {{title}}… ({{percentage}} завершено)", - "downloading": "Завантаження {{title}}… ({{percentage}} завершено) - Закінчення {{eta}} - {{speed}}" - }, - "catalogue": { - "next_page": "Наступна сторінка", - "previous_page": "Попередня сторінка" - }, - "game_details": { - "open_download_options": "Відкрити варіанти завантаження", - "download_options_zero": "Немає варіантів завантаження", - "download_options_one": "{{count}} варіант завантаження", - "download_options_other": "{{count}} варіантів завантаження", - "updated_at": "Оновлено {{updated_at}}", - "install": "Встановити", - "resume": "Відновити", - "pause": "Призупинити", - "cancel": "Скасувати", - "remove": "Видалити", - "remove_from_list": "Видалити", - "space_left_on_disk": "{{space}} вільно на диску", - "eta": "Закінчення {{eta}}", - "downloading_metadata": "Завантаження метаданих…", - "checking_files": "Перевірка файлів…", - "filter": "Фільтр репаків", - "requirements": "Системні вимоги", - "minimum": "Мінімальні", - "recommended": "Рекомендовані", - "no_minimum_requirements": "Для {{title}} не вказані мінімальні вимоги", - "no_recommended_requirements": "Для {{title}} не вказані рекомендовані вимоги", - "paused_progress": "{{progress}} (Призупинено)", - "release_date": "Випущено {{date}}", - "publisher": "Видавець {{publisher}}", - "copy_link_to_clipboard": "Скопіювати посилання", - "copied_link_to_clipboard": "Посилання скопійовано", - "hours": "годин", - "minutes": "хвилин", - "amount_hours": "{{amount}} годин", - "amount_minutes": "{{amount}} хвилин", - "accuracy": "{{accuracy}}% точність", - "add_to_library": "Додати до бібліотеки", - "remove_from_library": "Видалити з бібліотеки", - "no_downloads": "Немає доступних завантажень", - "play_time": "Час гри: {{amount}}", - "last_time_played": "Востаннє зіграно: {{period}}", - "not_played_yet": "Ви ще не грали в {{title}}", - "next_suggestion": "Наступна пропозиція", - "play": "Грати", - "deleting": "Видалення інсталятора…", - "close": "Закрити", - "playing_now": "Поточна гра", - "change": "Змінити", - "repacks_modal_description": "Виберіть репак, який хочете завантажити", - "downloads_path": "Шлях завантажень", - "select_folder_hint": "Щоб змінити теку за замовчуванням, відкрийте", - "settings": "Налаштування Hydra", - "download_now": "Завантажити зараз", - "installation_instructions": "Інструкція зі встановлення", - "installation_instructions_description": "Для встановлення цієї гри потрібні додаткові кроки", - "online_fix_instruction": "В іграх з OnlineFix потрібно ввести пароль для вилучення. За необхідності використовуйте наступний пароль:", - "dodi_installation_instruction": "Коли ви відкриєте інсталятор DODI, натисніть на клавіатурі клавішу 'вгору' <0 />, щоб почати процес встановлення:", - "dont_show_it_again": "Не показувати це знову", - "copy_to_clipboard": "Копіювати", - "copied_to_clipboard": "Скопійовано", - "got_it": "Зрозуміло" - }, - "activation": { - "title": "Активувати Hydra", - "installation_id": "ID установки:", - "enter_activation_code": "Введіть ваш активаційний код", - "message": "Якщо ви не знаєте, де його запросити, то не повинні мати цього.", - "activate": "Активувати", - "loading": "Завантаження…" - }, - "downloads": { - "resume": "Продовжити", - "pause": "Призупинити", - "eta": "Закінчення {{eta}}", - "paused": "Призупинено", - "verifying": "Перевірка…", - "completed_at": "Завершено в {{date}}", - "completed": "Завершено", - "cancelled": "Скасовано", - "download_again": "Завантажити знову", - "cancel": "Скасувати", - "filter": "Фільтр завантажених ігор", - "remove": "Видалити", - "downloading_metadata": "Завантаження метаданих…", - "checking_files": "Перевірка файлів…", - "starting_download": "Початок завантаження…", - "deleting": "Видалення інсталятора…", - "delete": "Видалити інсталятор", - "remove_from_list": "Видалити", - "delete_modal_title": "Ви впевнені?", - "delete_modal_description": "Це видалить усі інсталяційні файли з вашого комп'ютера", - "install": "Встановити" - }, - "settings": { - "downloads_path": "Тека завантажень", - "change": "Змінити", - "notifications": "Повідомлення", - "enable_download_notifications": "Після завершення завантаження", - "enable_repack_list_notifications": "Коли додається новий репак", - "telemetry": "Телеметрія", - "telemetry_description": "Відправляти анонімну статистику використання", - "behavior": "Поведінка", - "quit_app_instead_hiding": "Закривати програму замість того, щоб згортати її в трей", - "launch_with_system": "Запускати програми із запуском комп'ютера" - }, - "notifications": { - "download_complete": "Завантаження завершено", - "game_ready_to_install": "{{title}} готова до встановлення", - "repack_list_updated": "Список репаків оновлено", - "repack_count_one": "{{count}} репак додано", - "repack_count_other": "{{count}} репаків додано" - }, - "system_tray": { - "open": "Відкрити Hydra", - "quit": "Вийти" - }, - "game_card": { - "no_downloads": "Немає доступних завантажень" - }, - "binary_not_found_modal": { - "title": "Програми не встановлені", - "description": "Виконувані файли Wine або Lutris не знайдено у вашій системі", - "instructions": "Дізнайтеся правильний спосіб встановити будь-який з них на ваш дистрибутив Linux, щоб гра могла нормально працювати" - }, - "modal": { - "close": "Закрити" - } - } \ No newline at end of file + "home": { + "featured": "Рекомендоване", + "recently_added": "Нове", + "trending": "У тренді", + "surprise_me": "Здивуй мене", + "no_results": "Результатів не знайдено" + }, + "sidebar": { + "catalogue": "Каталог", + "downloads": "Завантаження", + "settings": "Налаштування", + "my_library": "Бібліотека", + "downloading_metadata": "{{title}} (Завантаження метаданих…)", + "checking_files": "{{title}} ({{percentage}} - Перевірка файлів…)", + "paused": "{{title}} (Призупинено)", + "downloading": "{{title}} ({{percentage}} - Завантаження…)", + "filter": "Фільтр бібліотеки", + "follow_us": "Підписуйтесь на нас", + "home": "Головна", + "discord": "Приєднуйтесь до Discord", + "telegram": "Приєднуйтесь до Telegram", + "x": "Підписуйтесь на X", + "github": "Зробіть свій внесок на GitHub" + }, + "header": { + "search": "Пошук", + "home": "Головна", + "catalogue": "Каталог", + "downloads": "Завантаження", + "search_results": "Результати пошуку", + "settings": "Налаштування" + }, + "bottom_panel": { + "no_downloads_in_progress": "Немає активних завантажень", + "downloading_metadata": "Завантаження метаданих {{title}}…", + "checking_files": "Перевірка файлів {{title}}… ({{percentage}} завершено)", + "downloading": "Завантаження {{title}}… ({{percentage}} завершено) - Закінчення {{eta}} - {{speed}}" + }, + "catalogue": { + "next_page": "Наступна сторінка", + "previous_page": "Попередня сторінка" + }, + "game_details": { + "open_download_options": "Відкрити варіанти завантаження", + "download_options_zero": "Немає варіантів завантаження", + "download_options_one": "{{count}} варіант завантаження", + "download_options_other": "{{count}} варіантів завантаження", + "updated_at": "Оновлено {{updated_at}}", + "install": "Встановити", + "resume": "Відновити", + "pause": "Призупинити", + "cancel": "Скасувати", + "remove": "Видалити", + "remove_from_list": "Видалити", + "space_left_on_disk": "{{space}} вільно на диску", + "eta": "Закінчення {{eta}}", + "downloading_metadata": "Завантаження метаданих…", + "checking_files": "Перевірка файлів…", + "filter": "Фільтр репаків", + "requirements": "Системні вимоги", + "minimum": "Мінімальні", + "recommended": "Рекомендовані", + "no_minimum_requirements": "Для {{title}} не вказані мінімальні вимоги", + "no_recommended_requirements": "Для {{title}} не вказані рекомендовані вимоги", + "paused_progress": "{{progress}} (Призупинено)", + "release_date": "Випущено {{date}}", + "publisher": "Видавець {{publisher}}", + "copy_link_to_clipboard": "Скопіювати посилання", + "copied_link_to_clipboard": "Посилання скопійовано", + "hours": "годин", + "minutes": "хвилин", + "amount_hours": "{{amount}} годин", + "amount_minutes": "{{amount}} хвилин", + "accuracy": "{{accuracy}}% точність", + "add_to_library": "Додати до бібліотеки", + "remove_from_library": "Видалити з бібліотеки", + "no_downloads": "Немає доступних завантажень", + "play_time": "Час гри: {{amount}}", + "last_time_played": "Востаннє зіграно: {{period}}", + "not_played_yet": "Ви ще не грали в {{title}}", + "next_suggestion": "Наступна пропозиція", + "play": "Грати", + "deleting": "Видалення інсталятора…", + "close": "Закрити", + "playing_now": "Поточна гра", + "change": "Змінити", + "repacks_modal_description": "Виберіть репак, який хочете завантажити", + "downloads_path": "Шлях завантажень", + "select_folder_hint": "Щоб змінити теку за замовчуванням, відкрийте", + "settings": "Налаштування Hydra", + "download_now": "Завантажити зараз", + "installation_instructions": "Інструкція зі встановлення", + "installation_instructions_description": "Для встановлення цієї гри потрібні додаткові кроки", + "online_fix_instruction": "В іграх з OnlineFix потрібно ввести пароль для вилучення. За необхідності використовуйте наступний пароль:", + "dodi_installation_instruction": "Коли ви відкриєте інсталятор DODI, натисніть на клавіатурі клавішу 'вгору' <0 />, щоб почати процес встановлення:", + "dont_show_it_again": "Не показувати це знову", + "copy_to_clipboard": "Копіювати", + "copied_to_clipboard": "Скопійовано", + "got_it": "Зрозуміло" + }, + "activation": { + "title": "Активувати Hydra", + "installation_id": "ID установки:", + "enter_activation_code": "Введіть ваш активаційний код", + "message": "Якщо ви не знаєте, де його запросити, то не повинні мати цього.", + "activate": "Активувати", + "loading": "Завантаження…" + }, + "downloads": { + "resume": "Продовжити", + "pause": "Призупинити", + "eta": "Закінчення {{eta}}", + "paused": "Призупинено", + "verifying": "Перевірка…", + "completed_at": "Завершено в {{date}}", + "completed": "Завершено", + "cancelled": "Скасовано", + "download_again": "Завантажити знову", + "cancel": "Скасувати", + "filter": "Фільтр завантажених ігор", + "remove": "Видалити", + "downloading_metadata": "Завантаження метаданих…", + "checking_files": "Перевірка файлів…", + "starting_download": "Початок завантаження…", + "deleting": "Видалення інсталятора…", + "delete": "Видалити інсталятор", + "remove_from_list": "Видалити", + "delete_modal_title": "Ви впевнені?", + "delete_modal_description": "Це видалить усі інсталяційні файли з вашого комп'ютера", + "install": "Встановити" + }, + "settings": { + "downloads_path": "Тека завантажень", + "change": "Змінити", + "notifications": "Повідомлення", + "enable_download_notifications": "Після завершення завантаження", + "enable_repack_list_notifications": "Коли додається новий репак", + "telemetry": "Телеметрія", + "telemetry_description": "Відправляти анонімну статистику використання", + "behavior": "Поведінка", + "quit_app_instead_hiding": "Закривати програму замість того, щоб згортати її в трей", + "launch_with_system": "Запускати програми із запуском комп'ютера" + }, + "notifications": { + "download_complete": "Завантаження завершено", + "game_ready_to_install": "{{title}} готова до встановлення", + "repack_list_updated": "Список репаків оновлено", + "repack_count_one": "{{count}} репак додано", + "repack_count_other": "{{count}} репаків додано" + }, + "system_tray": { + "open": "Відкрити Hydra", + "quit": "Вийти" + }, + "game_card": { + "no_downloads": "Немає доступних завантажень" + }, + "binary_not_found_modal": { + "title": "Програми не встановлені", + "description": "Виконувані файли Wine або Lutris не знайдено у вашій системі", + "instructions": "Дізнайтеся правильний спосіб встановити будь-який з них на ваш дистрибутив Linux, щоб гра могла нормально працювати" + }, + "modal": { + "close": "Закрити" + } +} diff --git a/src/main/events/catalogue/get-game-shop-details.ts b/src/main/events/catalogue/get-game-shop-details.ts index 61629242..f53bf398 100644 --- a/src/main/events/catalogue/get-game-shop-details.ts +++ b/src/main/events/catalogue/get-game-shop-details.ts @@ -4,7 +4,29 @@ import { getSteamAppDetails } from "@main/services"; import type { ShopDetails, GameShop, SteamAppDetails } from "@types"; import { registerEvent } from "../register-event"; -import { searchRepacks } from "../helpers/search-games"; + +const getLocalizedSteamAppDetails = ( + objectID: string, + language: string +): Promise => { + const englishAppDetails = getSteamAppDetails(objectID, "english"); + + if (language === "english") return englishAppDetails; + + return Promise.all([ + englishAppDetails, + getSteamAppDetails(objectID, language), + ]).then(([appDetails, localizedAppDetails]) => { + if (appDetails && localizedAppDetails) { + return { + ...localizedAppDetails, + name: appDetails.name, + }; + } + + return null; + }); +}; const getGameShopDetails = async ( _event: Electron.IpcMainInvokeEvent, @@ -17,27 +39,21 @@ const getGameShopDetails = async ( where: { objectID, language }, }); - const result = Promise.all([ - getSteamAppDetails(objectID, "english"), - getSteamAppDetails(objectID, language), - ]).then(([appDetails, localizedAppDetails]) => { - if (appDetails && localizedAppDetails) { + const appDetails = getLocalizedSteamAppDetails(objectID, language).then( + (result) => { gameShopCacheRepository.upsert( { objectID, shop: "steam", language, - serializedData: JSON.stringify({ - ...localizedAppDetails, - name: appDetails.name, - }), + serializedData: JSON.stringify(result), }, ["objectID"] ); - } - return [appDetails, localizedAppDetails]; - }); + return result; + } + ); const cachedGame = cachedData?.serializedData ? (JSON.parse(cachedData?.serializedData) as SteamAppDetails) @@ -46,21 +62,11 @@ const getGameShopDetails = async ( if (cachedGame) { return { ...cachedGame, - repacks: searchRepacks(cachedGame.name), objectID, } as ShopDetails; } - return result.then(([appDetails, localizedAppDetails]) => { - if (!appDetails || !localizedAppDetails) return null; - - return { - ...localizedAppDetails, - name: appDetails.name, - repacks: searchRepacks(appDetails.name), - objectID, - } as ShopDetails; - }); + return Promise.resolve(appDetails); } throw new Error("Not implemented"); diff --git a/src/main/events/catalogue/search-game-repacks.ts b/src/main/events/catalogue/search-game-repacks.ts new file mode 100644 index 00000000..448c6daf --- /dev/null +++ b/src/main/events/catalogue/search-game-repacks.ts @@ -0,0 +1,14 @@ +import { searchRepacks } from "../helpers/search-games"; +import { registerEvent } from "../register-event"; + +const searchGameRepacks = ( + _event: Electron.IpcMainInvokeEvent, + query: string +) => { + return searchRepacks(query); +}; + +registerEvent(searchGameRepacks, { + name: "searchGameRepacks", + memoize: true, +}); diff --git a/src/main/events/index.ts b/src/main/events/index.ts index 822cb9d5..ab35ff79 100644 --- a/src/main/events/index.ts +++ b/src/main/events/index.ts @@ -7,6 +7,7 @@ import "./catalogue/get-games"; import "./catalogue/get-how-long-to-beat"; import "./catalogue/get-random-game"; import "./catalogue/search-games"; +import "./catalogue/search-game-repacks"; import "./hardware/get-disk-free-space"; import "./library/add-game-to-library"; import "./library/close-game"; diff --git a/src/main/services/real-debrid.ts b/src/main/services/real-debrid.ts index 44798062..355a59b3 100644 --- a/src/main/services/real-debrid.ts +++ b/src/main/services/real-debrid.ts @@ -12,8 +12,7 @@ export class RealDebridClient { private static instance: AxiosInstance; static async addMagnet(magnet: string) { - const searchParams = new URLSearchParams(); - searchParams.append("magnet", magnet); + const searchParams = new URLSearchParams({ magnet }); const response = await this.instance.post( "/torrents/addMagnet", @@ -31,8 +30,7 @@ export class RealDebridClient { } static async selectAllFiles(id: string) { - const searchParams = new URLSearchParams(); - searchParams.append("files", "all"); + const searchParams = new URLSearchParams({ files: "all" }); await this.instance.post( `/torrents/selectFiles/${id}`, @@ -41,8 +39,7 @@ export class RealDebridClient { } static async unrestrictLink(link: string) { - const searchParams = new URLSearchParams(); - searchParams.append("link", link); + const searchParams = new URLSearchParams({ link }); const response = await this.instance.post( "/unrestrict/link", diff --git a/src/preload/index.d.ts b/src/preload/index.d.ts deleted file mode 100644 index 51163f1a..00000000 --- a/src/preload/index.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -// See the Electron documentation for details on how to use preload scripts: -// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts -import { contextBridge, ipcRenderer } from "electron"; - -import type { - CatalogueCategory, - GameShop, - TorrentProgress, - UserPreferences, -} from "@types"; - -contextBridge.exposeInMainWorld("electron", { - /* Torrenting */ - startGameDownload: ( - repackId: number, - objectID: string, - title: string, - shop: GameShop - ) => ipcRenderer.invoke("startGameDownload", repackId, objectID, title, shop), - cancelGameDownload: (gameId: number) => - ipcRenderer.invoke("cancelGameDownload", gameId), - pauseGameDownload: (gameId: number) => - ipcRenderer.invoke("pauseGameDownload", gameId), - resumeGameDownload: (gameId: number) => - ipcRenderer.invoke("resumeGameDownload", gameId), - onDownloadProgress: (cb: (value: TorrentProgress) => void) => { - const listener = ( - _event: Electron.IpcRendererEvent, - value: TorrentProgress - ) => cb(value); - ipcRenderer.on("on-download-progress", listener); - return () => ipcRenderer.removeListener("on-download-progress", listener); - }, - - /* Catalogue */ - searchGames: (query: string) => ipcRenderer.invoke("searchGames", query), - getCatalogue: (category: CatalogueCategory) => - ipcRenderer.invoke("getCatalogue", category), - getGameShopDetails: (objectID: string, shop: GameShop, language: string) => - ipcRenderer.invoke("getGameShopDetails", objectID, shop, language), - getRandomGame: () => ipcRenderer.invoke("getRandomGame"), - getHowLongToBeat: (objectID: string, shop: GameShop, title: string) => - ipcRenderer.invoke("getHowLongToBeat", objectID, shop, title), - getGames: (take?: number, prevCursor?: number) => - ipcRenderer.invoke("getGames", take, prevCursor), - - /* User preferences */ - getUserPreferences: () => ipcRenderer.invoke("getUserPreferences"), - updateUserPreferences: (preferences: UserPreferences) => - ipcRenderer.invoke("updateUserPreferences", preferences), - autoLaunch: (enabled: boolean) => ipcRenderer.invoke("autoLaunch", enabled), - - /* Library */ - addGameToLibrary: ( - objectID: string, - title: string, - shop: GameShop, - executablePath: string - ) => - ipcRenderer.invoke( - "addGameToLibrary", - objectID, - title, - shop, - executablePath - ), - getLibrary: () => ipcRenderer.invoke("getLibrary"), - getRepackersFriendlyNames: () => - ipcRenderer.invoke("getRepackersFriendlyNames"), - openGameInstaller: (gameId: number) => - ipcRenderer.invoke("openGameInstaller", gameId), - openGame: (gameId: number, executablePath: string) => - ipcRenderer.invoke("openGame", gameId, executablePath), - closeGame: (gameId: number) => ipcRenderer.invoke("closeGame", gameId), - removeGameFromLibrary: (gameId: number) => - ipcRenderer.invoke("removeGameFromLibrary", gameId), - deleteGameFolder: (gameId: number) => - ipcRenderer.invoke("deleteGameFolder", gameId), - getGameByObjectID: (objectID: string) => - ipcRenderer.invoke("getGameByObjectID", objectID), - onPlaytime: (cb: (gameId: number) => void) => { - const listener = (_event: Electron.IpcRendererEvent, gameId: number) => - cb(gameId); - ipcRenderer.on("on-playtime", listener); - return () => ipcRenderer.removeListener("on-playtime", listener); - }, - onGameClose: (cb: (gameId: number) => void) => { - const listener = (_event: Electron.IpcRendererEvent, gameId: number) => - cb(gameId); - ipcRenderer.on("on-game-close", listener); - return () => ipcRenderer.removeListener("on-game-close", listener); - }, - - /* Hardware */ - getDiskFreeSpace: () => ipcRenderer.invoke("getDiskFreeSpace"), - - /* Misc */ - ping: () => ipcRenderer.invoke("ping"), - getVersion: () => ipcRenderer.invoke("getVersion"), - getDefaultDownloadsPath: () => ipcRenderer.invoke("getDefaultDownloadsPath"), - openExternal: (src: string) => ipcRenderer.invoke("openExternal", src), - showOpenDialog: (options: Electron.OpenDialogOptions) => - ipcRenderer.invoke("showOpenDialog", options), - platform: process.platform, -}); diff --git a/src/preload/index.ts b/src/preload/index.ts index 7d5eb7fe..9151942f 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -52,6 +52,8 @@ contextBridge.exposeInMainWorld("electron", { ipcRenderer.invoke("getHowLongToBeat", objectID, shop, title), getGames: (take?: number, prevCursor?: number) => ipcRenderer.invoke("getGames", take, prevCursor), + searchGameRepacks: (query: string) => + ipcRenderer.invoke("searchGameRepacks", query), /* User preferences */ getUserPreferences: () => ipcRenderer.invoke("getUserPreferences"), diff --git a/src/renderer/src/components/game-card/game-card.css.ts b/src/renderer/src/components/game-card/game-card.css.ts index 9f2f0654..1f45c106 100644 --- a/src/renderer/src/components/game-card/game-card.css.ts +++ b/src/renderer/src/components/game-card/game-card.css.ts @@ -1,31 +1,18 @@ import { style } from "@vanilla-extract/css"; -import { recipe } from "@vanilla-extract/recipes"; import { SPACING_UNIT, vars } from "../../theme.css"; -export const card = recipe({ - base: { - width: "100%", - height: "180px", - boxShadow: "0px 0px 15px 0px #000000", - overflow: "hidden", - borderRadius: "4px", - transition: "all ease 0.2s", - border: `solid 1px ${vars.color.border}`, - cursor: "pointer", - zIndex: "1", - ":active": { - opacity: vars.opacity.active, - }, - }, - variants: { - disabled: { - true: { - pointerEvents: "none", - boxShadow: "none", - opacity: vars.opacity.disabled, - filter: "grayscale(50%)", - }, - }, +export const card = style({ + width: "100%", + height: "180px", + boxShadow: "0px 0px 15px 0px #000000", + overflow: "hidden", + borderRadius: "4px", + transition: "all ease 0.2s", + border: `solid 1px ${vars.color.border}`, + cursor: "pointer", + zIndex: "1", + ":active": { + opacity: vars.opacity.active, }, }); @@ -48,7 +35,7 @@ export const cover = style({ zIndex: "-1", transition: "all ease 0.2s", selectors: { - [`${card({})}:hover &`]: { + [`${card}:hover &`]: { transform: "scale(1.05)", }, }, @@ -64,7 +51,7 @@ export const content = style({ transition: "all ease 0.2s", transform: "translateY(24px)", selectors: { - [`${card({})}:hover &`]: { + [`${card}:hover &`]: { transform: "translateY(0px)", }, }, diff --git a/src/renderer/src/components/game-card/game-card.tsx b/src/renderer/src/components/game-card/game-card.tsx index f7f6ffe4..b3ac3fa2 100644 --- a/src/renderer/src/components/game-card/game-card.tsx +++ b/src/renderer/src/components/game-card/game-card.tsx @@ -14,7 +14,6 @@ export interface GameCardProps HTMLButtonElement > { game: CatalogueEntry; - disabled?: boolean; } const shopIcon = { @@ -22,7 +21,7 @@ const shopIcon = { steam: , }; -export function GameCard({ game, disabled, ...props }: GameCardProps) { +export function GameCard({ game, ...props }: GameCardProps) { const { t } = useTranslation("game_card"); const repackersFriendlyNames = useAppSelector( @@ -34,12 +33,7 @@ export function GameCard({ game, disabled, ...props }: GameCardProps) { ); return ( - diff --git a/src/renderer/src/components/sidebar/sidebar.tsx b/src/renderer/src/components/sidebar/sidebar.tsx index 8e5b5df5..ffce96ae 100644 --- a/src/renderer/src/components/sidebar/sidebar.tsx +++ b/src/renderer/src/components/sidebar/sidebar.tsx @@ -15,6 +15,7 @@ import XLogo from "@renderer/assets/x-icon.svg?react"; import * as styles from "./sidebar.css"; import { GameStatus, GameStatusHelper } from "@shared"; +import { buildGameDetailsPath } from "@renderer/helpers"; const SIDEBAR_MIN_WIDTH = 200; const SIDEBAR_INITIAL_WIDTH = 250; @@ -209,9 +210,7 @@ export function Sidebar() { type="button" className={styles.menuItemButton} onClick={() => - handleSidebarItemClick( - `/game/${game.shop}/${game.objectID}` - ) + handleSidebarItemClick(buildGameDetailsPath(game)) } > Promise<{ results: CatalogueEntry[]; cursor: number }>; + searchGameRepacks: (query: string) => Promise; /* Library */ addGameToLibrary: ( diff --git a/src/renderer/src/helpers.ts b/src/renderer/src/helpers.ts index 51e708a0..e3ff7a01 100644 --- a/src/renderer/src/helpers.ts +++ b/src/renderer/src/helpers.ts @@ -1,3 +1,5 @@ +import type { CatalogueEntry } from "@types"; + export const steamUrlBuilder = { library: (objectID: string) => `https://steamcdn-a.akamaihd.net/steam/apps/${objectID}/header.jpg`, @@ -28,3 +30,11 @@ export const getSteamLanguage = (language: string) => { return "english"; }; + +export const buildGameDetailsPath = ( + game: Pick, + params: Record = {} +) => { + const searchParams = new URLSearchParams({ title: game.title, ...params }); + return `/game/${game.shop}/${game.objectID}?${searchParams.toString()}`; +}; diff --git a/src/renderer/src/pages/catalogue/catalogue.tsx b/src/renderer/src/pages/catalogue/catalogue.tsx index a809e246..6720b83f 100644 --- a/src/renderer/src/pages/catalogue/catalogue.tsx +++ b/src/renderer/src/pages/catalogue/catalogue.tsx @@ -11,6 +11,7 @@ import { useEffect, useRef, useState } from "react"; import { useNavigate, useSearchParams } from "react-router-dom"; import * as styles from "../home/home.css"; import { ArrowLeftIcon, ArrowRightIcon } from "@primer/octicons-react"; +import { buildGameDetailsPath } from "@renderer/helpers"; export function Catalogue() { const dispatch = useAppDispatch(); @@ -31,7 +32,7 @@ export function Catalogue() { const handleGameClick = (game: CatalogueEntry) => { dispatch(clearSearch()); - navigate(`/game/${game.shop}/${game.objectID}`); + navigate(buildGameDetailsPath(game)); }; useEffect(() => { diff --git a/src/renderer/src/pages/game-details/description-header.tsx b/src/renderer/src/pages/game-details/description-header.tsx index df1455e9..860e8025 100644 --- a/src/renderer/src/pages/game-details/description-header.tsx +++ b/src/renderer/src/pages/game-details/description-header.tsx @@ -11,7 +11,7 @@ import * as styles from "./game-details.css"; const OPEN_HYDRA_URL = "https://open.hydralauncher.site"; export interface DescriptionHeaderProps { - gameDetails: ShopDetails | null; + gameDetails: ShopDetails; } export function DescriptionHeader({ gameDetails }: DescriptionHeaderProps) { @@ -64,7 +64,7 @@ export function DescriptionHeader({ gameDetails }: DescriptionHeaderProps) { date: gameDetails?.release_date.date, })}

-

{t("publisher", { publisher: gameDetails?.publishers[0] })}

+

{t("publisher", { publisher: gameDetails.publishers[0] })}

-
+
{Array.from({ length: 6 }).map((_, index) => ( ))} diff --git a/src/renderer/src/pages/game-details/game-details.css.ts b/src/renderer/src/pages/game-details/game-details.css.ts index 72c5e4d3..dadfb641 100644 --- a/src/renderer/src/pages/game-details/game-details.css.ts +++ b/src/renderer/src/pages/game-details/game-details.css.ts @@ -79,62 +79,6 @@ export const descriptionContent = style({ height: "100%", }); -export const contentSidebar = style({ - borderLeft: `solid 1px ${vars.color.border};`, - width: "100%", - height: "100%", - "@media": { - "(min-width: 768px)": { - width: "100%", - maxWidth: "200px", - }, - "(min-width: 1024px)": { - maxWidth: "300px", - width: "100%", - }, - "(min-width: 1280px)": { - width: "100%", - maxWidth: "400px", - }, - }, -}); - -export const contentSidebarTitle = style({ - height: "72px", - padding: `${SPACING_UNIT * 2}px ${SPACING_UNIT * 2}px`, - display: "flex", - alignItems: "center", - backgroundColor: vars.color.background, -}); - -export const requirementButtonContainer = style({ - width: "100%", - display: "flex", -}); - -export const requirementButton = style({ - border: `solid 1px ${vars.color.border};`, - borderLeft: "none", - borderRight: "none", - borderRadius: "0", - width: "100%", -}); - -export const requirementsDetails = style({ - padding: `${SPACING_UNIT * 2}px`, - lineHeight: "22px", - fontFamily: "'Fira Sans', sans-serif", - fontSize: "16px", -}); - -export const requirementsDetailsSkeleton = style({ - display: "flex", - flexDirection: "column", - gap: "8px", - padding: `${SPACING_UNIT * 2}px`, - fontSize: "16px", -}); - export const description = style({ userSelect: "text", lineHeight: "22px", @@ -183,34 +127,6 @@ export const descriptionHeaderInfo = style({ flexDirection: "column", }); -export const howLongToBeatCategoriesList = style({ - margin: "0", - padding: "16px", - display: "flex", - flexDirection: "column", - gap: "16px", -}); - -export const howLongToBeatCategory = style({ - display: "flex", - flexDirection: "column", - gap: "4px", - backgroundColor: vars.color.background, - borderRadius: "8px", - padding: `8px 16px`, - border: `solid 1px ${vars.color.border}`, -}); - -export const howLongToBeatCategoryLabel = style({ - color: vars.color.muted, -}); - -export const howLongToBeatCategorySkeleton = style({ - border: `solid 1px ${vars.color.border}`, - borderRadius: "8px", - height: "76px", -}); - export const randomizerButton = style({ animationName: slideIn, animationDuration: "0.2s", @@ -260,8 +176,3 @@ globalStyle(`${description} img`, { globalStyle(`${description} a`, { color: vars.color.bodyText, }); - -globalStyle(`${requirementsDetails} a`, { - display: "flex", - color: vars.color.bodyText, -}); diff --git a/src/renderer/src/pages/game-details/game-details.tsx b/src/renderer/src/pages/game-details/game-details.tsx index 02c880d8..ed709c80 100644 --- a/src/renderer/src/pages/game-details/game-details.tsx +++ b/src/renderer/src/pages/game-details/game-details.tsx @@ -3,14 +3,7 @@ import { average } from "color.js"; import { useCallback, useEffect, useState } from "react"; import { useNavigate, useParams, useSearchParams } from "react-router-dom"; -import type { - Game, - GameRepack, - GameShop, - HowLongToBeatCategory, - ShopDetails, - SteamAppDetails, -} from "@types"; +import type { Game, GameRepack, GameShop, ShopDetails } from "@types"; import { Button } from "@renderer/components"; import { setHeaderTitle } from "@renderer/features"; @@ -26,7 +19,6 @@ import { DescriptionHeader } from "./description-header"; import { GameDetailsSkeleton } from "./game-details-skeleton"; import * as styles from "./game-details.css"; import { HeroPanel } from "./hero"; -import { HowLongToBeatSection } from "./how-long-to-beat-section"; import { RepacksModal } from "./repacks-modal"; import { vars } from "../../theme.css"; @@ -37,6 +29,7 @@ import { OnlineFixInstallationGuide, } from "./installation-guides"; import { GallerySlider } from "./gallery-slider"; +import { Sidebar } from "./sidebar/sidebar"; export function GameDetails() { const { objectID, shop } = useParams(); @@ -45,10 +38,7 @@ export function GameDetails() { const [isLoadingRandomGame, setIsLoadingRandomGame] = useState(false); const [color, setColor] = useState({ dark: "", light: "" }); const [gameDetails, setGameDetails] = useState(null); - const [howLongToBeat, setHowLongToBeat] = useState<{ - isLoading: boolean; - data: HowLongToBeatCategory[] | null; - }>({ isLoading: true, data: null }); + const [repacks, setRepacks] = useState([]); const [game, setGame] = useState(null); const [isGamePlaying, setIsGamePlaying] = useState(false); @@ -56,12 +46,12 @@ export function GameDetails() { null | "onlinefix" | "DODI" >(null); - const [activeRequirement, setActiveRequirement] = - useState("minimum"); - const navigate = useNavigate(); const [searchParams] = useSearchParams(); + const fromRandomizer = searchParams.get("fromRandomizer"); + const title = searchParams.get("title")!; + const { t, i18n } = useTranslation("game_details"); const [showRepacksModal, setShowRepacksModal] = useState(false); @@ -90,28 +80,24 @@ export function GameDetails() { useEffect(() => { getGame(); }, [getGame, gameDownloading?.id]); + useEffect(() => { setGame(null); setIsLoading(true); setIsGamePlaying(false); - dispatch(setHeaderTitle("")); + dispatch(setHeaderTitle(title)); - window.electron - .getGameShopDetails(objectID!, "steam", getSteamLanguage(i18n.language)) - .then((result) => { - if (!result) { - navigate(-1); - return; - } - - window.electron - .getHowLongToBeat(objectID!, "steam", result.name) - .then((data) => { - setHowLongToBeat({ isLoading: false, data }); - }); - - setGameDetails(result); - dispatch(setHeaderTitle(result.name)); + Promise.all([ + window.electron.getGameShopDetails( + objectID!, + "steam", + getSteamLanguage(i18n.language) + ), + window.electron.searchGameRepacks(title), + ]) + .then(([appDetails, repacks]) => { + if (appDetails) setGameDetails(appDetails); + setRepacks(repacks); setIsLoadingRandomGame(false); }) .finally(() => { @@ -119,8 +105,7 @@ export function GameDetails() { }); getGame(); - setHowLongToBeat({ isLoading: true, data: null }); - }, [getGame, dispatch, navigate, objectID, i18n.language]); + }, [getGame, dispatch, navigate, title, objectID, i18n.language]); const isGameDownloading = gameDownloading?.id === game?.id; @@ -154,30 +139,28 @@ export function GameDetails() { repack: GameRepack, downloadPath: string ) => { - if (gameDetails) { - return startDownload( - repack.id, - gameDetails.objectID, - gameDetails.name, - shop as GameShop, - downloadPath - ).then(() => { - getGame(); - setShowRepacksModal(false); + return startDownload( + repack.id, + objectID!, + title, + shop as GameShop, + downloadPath + ).then(() => { + getGame(); + setShowRepacksModal(false); - if ( - repack.repacker === "onlinefix" && - !window.localStorage.getItem(DONT_SHOW_ONLINE_FIX_INSTRUCTIONS_KEY) - ) { - setShowInstructionsModal("onlinefix"); - } else if ( - repack.repacker === "DODI" && - !window.localStorage.getItem(DONT_SHOW_DODI_INSTRUCTIONS_KEY) - ) { - setShowInstructionsModal("DODI"); - } - }); - } + if ( + repack.repacker === "onlinefix" && + !window.localStorage.getItem(DONT_SHOW_ONLINE_FIX_INSTRUCTIONS_KEY) + ) { + setShowInstructionsModal("onlinefix"); + } else if ( + repack.repacker === "DODI" && + !window.localStorage.getItem(DONT_SHOW_DODI_INSTRUCTIONS_KEY) + ) { + setShowInstructionsModal("DODI"); + } + }); }; const handleRandomizerClick = async () => { @@ -191,18 +174,14 @@ export function GameDetails() { navigate(`/game/steam/${randomGameObjectID}?${searchParams.toString()}`); }; - const fromRandomizer = searchParams.get("fromRandomizer"); - return ( - {gameDetails && ( - setShowRepacksModal(false)} - /> - )} + setShowRepacksModal(false)} + /> setShowRepacksModal(true)} getGame={getGame} isGamePlaying={isGamePlaying} @@ -247,63 +228,22 @@ export function GameDetails() {
- - - + {gameDetails && } + {gameDetails && }
-
- - -
-

{t("requirements")}

-
- -
- - -
- -
-
+
)} diff --git a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx index 7638f53e..c88d9411 100644 --- a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx +++ b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx @@ -3,7 +3,7 @@ import { NoEntryIcon, PlusCircleIcon } from "@primer/octicons-react"; import { Button } from "@renderer/components"; import { useDownload, useLibrary } from "@renderer/hooks"; -import type { Game, ShopDetails } from "@types"; +import type { Game, GameRepack } from "@types"; import { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -11,9 +11,11 @@ import * as styles from "./hero-panel-actions.css"; export interface HeroPanelActionsProps { game: Game | null; - gameDetails: ShopDetails | null; + repacks: GameRepack[]; isGamePlaying: boolean; isGameDownloading: boolean; + objectID: string; + title: string; openRepacksModal: () => void; openBinaryNotFoundModal: () => void; getGame: () => void; @@ -21,9 +23,11 @@ export interface HeroPanelActionsProps { export function HeroPanelActions({ game, - gameDetails, isGamePlaying, isGameDownloading, + repacks, + objectID, + title, openRepacksModal, openBinaryNotFoundModal, getGame, @@ -69,12 +73,12 @@ export function HeroPanelActions({ try { if (game) { await removeGameFromLibrary(game.id); - } else if (gameDetails) { + } else { const gameExecutablePath = await selectGameExecutable(); await window.electron.addGameToLibrary( - gameDetails.objectID, - gameDetails.name, + objectID, + title, "steam", gameExecutablePath ); @@ -123,7 +127,7 @@ export function HeroPanelActions({ const toggleGameOnLibraryButton = ( + + +
+ +
+ + ); +} diff --git a/src/renderer/src/pages/home/home.tsx b/src/renderer/src/pages/home/home.tsx index 7230e51e..c1587512 100644 --- a/src/renderer/src/pages/home/home.tsx +++ b/src/renderer/src/pages/home/home.tsx @@ -12,6 +12,7 @@ import starsAnimation from "@renderer/assets/lottie/stars.json"; import * as styles from "./home.css"; import { vars } from "../../theme.css"; import Lottie from "lottie-react"; +import { buildGameDetailsPath } from "@renderer/helpers"; const categories: CatalogueCategory[] = ["trending", "recently_added"]; @@ -129,9 +130,7 @@ export function Home() { - navigate(`/game/${result.shop}/${result.objectID}`) - } + onClick={() => navigate(buildGameDetailsPath(result))} /> ))} diff --git a/src/renderer/src/pages/home/search-results.tsx b/src/renderer/src/pages/home/search-results.tsx index 2def747d..be461918 100644 --- a/src/renderer/src/pages/home/search-results.tsx +++ b/src/renderer/src/pages/home/search-results.tsx @@ -14,6 +14,7 @@ import { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate, useSearchParams } from "react-router-dom"; import * as styles from "./home.css"; +import { buildGameDetailsPath } from "@renderer/helpers"; export function SearchResults() { const dispatch = useAppDispatch(); @@ -30,7 +31,7 @@ export function SearchResults() { const handleGameClick = (game: CatalogueEntry) => { dispatch(clearSearch()); - navigate(`/game/${game.shop}/${game.objectID}`); + navigate(buildGameDetailsPath(game)); }; useEffect(() => { diff --git a/src/types/index.ts b/src/types/index.ts index 94361564..5723245d 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -69,7 +69,6 @@ export interface GameRepack { export type ShopDetails = SteamAppDetails & { objectID: string; - repacks: GameRepack[]; }; export interface TorrentFile { From ad5e6c63139789677f58e7be923b86b013d0028f Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 12 May 2024 23:52:03 +0100 Subject: [PATCH 09/26] ci: fixing translations --- src/locales/be/translation.json | 1 - src/locales/en/translation.json | 6 ++++-- src/locales/es/translation.json | 1 - src/locales/id/translation.json | 1 - src/locales/it/translation.json | 1 - src/locales/nl/translation.json | 2 +- src/locales/pl/translation.json | 1 - src/locales/pt/translation.json | 10 ++++++++-- src/locales/ru/translation.json | 1 - src/locales/tr/translation.json | 1 - src/locales/uk/translation.json | 1 - src/renderer/src/pages/game-details/repacks-modal.tsx | 2 +- .../src/pages/game-details/select-folder-modal.tsx | 2 +- .../src/pages/settings/settings-real-debrid.tsx | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/locales/be/translation.json b/src/locales/be/translation.json index ccada6a7..c55ec394 100644 --- a/src/locales/be/translation.json +++ b/src/locales/be/translation.json @@ -88,7 +88,6 @@ "repacks_modal_description": "Абярыце рэпак, які хочаце сьцягнуць", "downloads_path": "Шлях сьцягваньня", "select_folder_hint": "Каб зьмяніць папку па змоўчаньні, адкрыйце", - "settings": "Налады Hydra", "download_now": "Сьцягнуць зараз", "installation_instructions": "Інструкцыя ўсталёўкі", "installation_instructions_description": "Усталёўка гэтай гульні патрабуе дадатковых крокаў", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 63a9e8d1..8a5f0838 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -97,7 +97,9 @@ "copy_to_clipboard": "Copy", "copied_to_clipboard": "Copied", "got_it": "Got it", - "no_shop_details": "Could not retrieve shop details." + "no_shop_details": "Could not retrieve shop details.", + "download_options": "Download options", + "download_folder": "Download folder" }, "activation": { "title": "Activate Hydra", @@ -140,7 +142,7 @@ "enable_repack_list_notifications": "When a new repack is added", "telemetry": "Telemetry", "telemetry_description": "Enable anonymous usage statistics", - "real_debrid_api_token_description": "Real Debrid API token", + "real_debrid_api_token_label": "Real Debrid API token", "quit_app_instead_hiding": "Quit Hydra instead of minimizing to tray", "launch_with_system": "Launch Hydra on system start-up", "general": "General", diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index a692fd16..1c97adae 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -85,7 +85,6 @@ "repacks_modal_description": "Selecciona el repack que quieres descargar", "downloads_path": "Ruta de descarga", "select_folder_hint": "Para cambiar la carpeta predeterminada, accede a", - "settings": "Ajustes", "download_now": "Descargar ahora", "installation_instructions": "Instrucciones de instalación", "installation_instructions_description": "Se requieren de pasos adicionales para instalar este juego", diff --git a/src/locales/id/translation.json b/src/locales/id/translation.json index 49d3a991..60de327a 100644 --- a/src/locales/id/translation.json +++ b/src/locales/id/translation.json @@ -88,7 +88,6 @@ "repacks_modal_description": "Pilih repack yang kamu ingin unduh", "downloads_path": "Lokasi Unduhan", "select_folder_hint": "Untuk merubah folder bawaan, akses melalui", - "settings": "Pengaturan", "download_now": "Unduh sekarang", "installation_instructions": "Instruksi Instalasi", "installation_instructions_description": "Langkah tambahan dibutuhkan untuk meng-instal game ini", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 9889dd0c..57706dc9 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -88,7 +88,6 @@ "repacks_modal_description": "Scegli il repack che vuoi scaricare", "downloads_path": "Percorso dei download", "select_folder_hint": "Per cambiare la cartella predefinita, accedi alle", - "settings": "Impostazioni", "download_now": "Scarica ora", "installation_instructions": "Istruzioni di installazione", "installation_instructions_description": "Sono necessari passaggi aggiuntivi per installare questo gioco", diff --git a/src/locales/nl/translation.json b/src/locales/nl/translation.json index 22cb1d90..4be69007 100644 --- a/src/locales/nl/translation.json +++ b/src/locales/nl/translation.json @@ -139,7 +139,7 @@ "enable_repack_list_notifications": "Wanneer een nieuwe herverpakking wordt toegevoegd", "telemetry": "Telemetrie", "telemetry_description": "Schakel anonieme gebruiksstatistieken in", - "real_debrid_api_token_description": "Real Debrid API token", + "real_debrid_api_token_label": "Real Debrid API token", "quit_app_instead_hiding": "Sluit Hydra af in plaats van te minimaliseren naar de lade", "launch_with_system": "Start Hydra bij het opstarten van het systeem", "general": "Algemeen", diff --git a/src/locales/pl/translation.json b/src/locales/pl/translation.json index 5623c74e..5214019e 100644 --- a/src/locales/pl/translation.json +++ b/src/locales/pl/translation.json @@ -82,7 +82,6 @@ "repacks_modal_description": "Wybierz repack, który chcesz pobrać", "downloads_path": "Ścieżka pobierania", "select_folder_hint": "Aby zmienić domyślny folder, przejdź do", - "settings": "Ustawienia Hydra", "download_now": "Pobierz teraz" }, "activation": { diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json index dda53065..a202f0be 100644 --- a/src/locales/pt/translation.json +++ b/src/locales/pt/translation.json @@ -92,7 +92,10 @@ "dont_show_it_again": "Não mostrar novamente", "copy_to_clipboard": "Copiar", "copied_to_clipboard": "Copiado", - "got_it": "Entendi" + "got_it": "Entendi", + "no_shop_details": "Não foi possível obter os detalhes da loja.", + "download_options": "Opções de download", + "download_folder": "Diretório de download" }, "activation": { "title": "Ativação", @@ -123,7 +126,9 @@ "delete_modal_description": "Isso removerá todos os arquivos de instalação do seu computador", "delete_modal_title": "Tem certeza?", "deleting": "Excluindo instalador…", - "install": "Instalar" + "install": "Instalar", + "torrent": "Torrent", + "real_debrid": "Real Debrid" }, "settings": { "downloads_path": "Diretório dos downloads", @@ -133,6 +138,7 @@ "enable_repack_list_notifications": "Quando a lista de repacks for atualizada", "telemetry": "Telemetria", "telemetry_description": "Habilitar estatísticas de uso anônimas", + "real_debrid_api_token_label": "Token de API do Real Debrid", "quit_app_instead_hiding": "Fechar o aplicativo em vez de minimizá-lo", "launch_with_system": "Iniciar aplicativo na inicialização do sistema", "general": "Geral", diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json index efeaba37..c2c30cd5 100644 --- a/src/locales/ru/translation.json +++ b/src/locales/ru/translation.json @@ -88,7 +88,6 @@ "repacks_modal_description": "Выберите репак для загрузки", "downloads_path": "Путь загрузок", "select_folder_hint": "Изменить папку по умолчанию", - "settings": "Настройки Hydra", "download_now": "Загрузить сейчас", "installation_instructions": "Инструкция по установке", "installation_instructions_description": "Для установки этой игры требуются дополнительные шаги", diff --git a/src/locales/tr/translation.json b/src/locales/tr/translation.json index 6a7033b3..be40e013 100644 --- a/src/locales/tr/translation.json +++ b/src/locales/tr/translation.json @@ -88,7 +88,6 @@ "repacks_modal_description": "İndirmek istediğiiniz repacki seçin", "downloads_path": "İndirme yolu", "select_folder_hint": "Varsayılan klasörü değiştirmek için ulaşmanız gereken ayar", - "settings": "Ayarlar", "download_now": "Şimdi", "installation_instructions": "Kurulum", "installation_instructions_description": "Bu oyunu kurmak için ek adımlar gerekiyor", diff --git a/src/locales/uk/translation.json b/src/locales/uk/translation.json index e8d1c117..e0f6af7b 100644 --- a/src/locales/uk/translation.json +++ b/src/locales/uk/translation.json @@ -88,7 +88,6 @@ "repacks_modal_description": "Виберіть репак, який хочете завантажити", "downloads_path": "Шлях завантажень", "select_folder_hint": "Щоб змінити теку за замовчуванням, відкрийте", - "settings": "Налаштування Hydra", "download_now": "Завантажити зараз", "installation_instructions": "Інструкція зі встановлення", "installation_instructions_description": "Для встановлення цієї гри потрібні додаткові кроки", diff --git a/src/renderer/src/pages/game-details/repacks-modal.tsx b/src/renderer/src/pages/game-details/repacks-modal.tsx index fd4db423..3ee3631a 100644 --- a/src/renderer/src/pages/game-details/repacks-modal.tsx +++ b/src/renderer/src/pages/game-details/repacks-modal.tsx @@ -69,7 +69,7 @@ export function RepacksModal({ diff --git a/src/renderer/src/pages/game-details/select-folder-modal.tsx b/src/renderer/src/pages/game-details/select-folder-modal.tsx index 69b6aaba..a33f9d64 100644 --- a/src/renderer/src/pages/game-details/select-folder-modal.tsx +++ b/src/renderer/src/pages/game-details/select-folder-modal.tsx @@ -72,7 +72,7 @@ export function SelectFolderModal({ return ( From 329309718b7fb62d4ef9cbe442cbecb3c9ed0d7e Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 01:02:21 +0100 Subject: [PATCH 10/26] ci: changing lint script to push only --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 293a898b..3e5072c7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [pull_request, push] +on: [push] jobs: lint: From ff20d531c28cad92ea827a9516807f4b70cf3446 Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 02:02:55 +0100 Subject: [PATCH 11/26] feat: improving buttons on gallery slider --- src/locales/en/translation.json | 4 +- src/locales/pt/translation.json | 4 +- src/renderer/src/components/modal/modal.tsx | 9 +- .../pages/game-details/gallery-slider.css.ts | 100 +++++++++++------- .../src/pages/game-details/gallery-slider.tsx | 81 ++++++++------ 5 files changed, 127 insertions(+), 71 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 0674d1b5..f3c5719e 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -96,7 +96,9 @@ "dont_show_it_again": "Don't show it again", "copy_to_clipboard": "Copy", "copied_to_clipboard": "Copied", - "got_it": "Got it" + "got_it": "Got it", + "previous_screenshot": "Previous screenshot", + "next_screenshot": "Next screenshot" }, "activation": { "title": "Activate Hydra", diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json index dda53065..bb29957a 100644 --- a/src/locales/pt/translation.json +++ b/src/locales/pt/translation.json @@ -92,7 +92,9 @@ "dont_show_it_again": "Não mostrar novamente", "copy_to_clipboard": "Copiar", "copied_to_clipboard": "Copiado", - "got_it": "Entendi" + "got_it": "Entendi", + "previous_screenshot": "Captura de tela anterior", + "next_screenshot": "Próxima captura de tela" }, "activation": { "title": "Ativação", diff --git a/src/renderer/src/components/modal/modal.tsx b/src/renderer/src/components/modal/modal.tsx index 79308c1e..82c3b481 100644 --- a/src/renderer/src/components/modal/modal.tsx +++ b/src/renderer/src/components/modal/modal.tsx @@ -24,6 +24,7 @@ export function Modal({ }: ModalProps) { const [isClosing, setIsClosing] = useState(false); const modalContentRef = useRef(null); + const titleRef = useRef(null); const { t } = useTranslation("modal"); @@ -52,6 +53,8 @@ export function Modal({ useEffect(() => { if (visible) { + if (titleRef.current) titleRef.current.focus(); + const onKeyDown = (e: KeyboardEvent) => { if (e.key === "Escape" && isTopMostModal()) { handleCloseClick(); @@ -94,8 +97,10 @@ export function Modal({ >
-

{title}

- {description &&

{description}

} +

+ {title} +

+ {description &&

{description}

}
- - - )} + + +
@@ -144,7 +156,9 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { loading="lazy" onClick={() => setMediaIndex(i)} src={video.thumbnail} - className={`${styles.gallerySliderMediaPreview} ${mediaIndex === i ? styles.gallerySliderMediaPreviewActive : ""}`} + className={styles.gallerySliderMediaPreview({ + active: mediaIndex === i, + })} /> ))} {gameDetails.screenshots && @@ -158,7 +172,12 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) { i + (gameDetails.movies ? gameDetails.movies.length : 0) ) } - className={`${styles.gallerySliderMediaPreview} ${mediaIndex === i + (gameDetails.movies ? gameDetails.movies.length : 0) ? styles.gallerySliderMediaPreviewActive : ""}`} + className={styles.gallerySliderMediaPreview({ + active: + mediaIndex === + i + + (gameDetails.movies ? gameDetails.movies.length : 0), + })} src={image.path_full} /> ) From 0d937bacc8eaa9c18a2ce4d8d633010fd6183a86 Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 02:07:24 +0100 Subject: [PATCH 12/26] chore: fixing translation --- src/locales/en/translation.json | 3 +-- src/locales/pt/translation.json | 3 +-- .../src/pages/game-details/select-folder-modal.tsx | 9 ++------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 8a5f0838..d920cfdb 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -86,7 +86,6 @@ "playing_now": "Playing now", "change": "Change", "repacks_modal_description": "Choose the repack you want to download", - "downloads_path": "Downloads path", "select_folder_hint": "To change the default folder, go to the <0>Settings", "download_now": "Download now", "installation_instructions": "Installation Instructions", @@ -99,7 +98,7 @@ "got_it": "Got it", "no_shop_details": "Could not retrieve shop details.", "download_options": "Download options", - "download_folder": "Download folder" + "download_path": "Download path" }, "activation": { "title": "Activate Hydra", diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json index a202f0be..ab33bfe5 100644 --- a/src/locales/pt/translation.json +++ b/src/locales/pt/translation.json @@ -82,7 +82,6 @@ "playing_now": "Jogando agora", "change": "Mudar", "repacks_modal_description": "Escolha o repack do jogo que deseja baixar", - "downloads_path": "Diretório do download", "select_folder_hint": "Para trocar a pasta padrão, acesse a <0>Tela de Configurações", "download_now": "Baixe agora", "installation_instructions": "Instruções de Instalação", @@ -95,7 +94,7 @@ "got_it": "Entendi", "no_shop_details": "Não foi possível obter os detalhes da loja.", "download_options": "Opções de download", - "download_folder": "Diretório de download" + "download_path": "Diretório de download" }, "activation": { "title": "Ativação", diff --git a/src/renderer/src/pages/game-details/select-folder-modal.tsx b/src/renderer/src/pages/game-details/select-folder-modal.tsx index a33f9d64..d43990dc 100644 --- a/src/renderer/src/pages/game-details/select-folder-modal.tsx +++ b/src/renderer/src/pages/game-details/select-folder-modal.tsx @@ -72,7 +72,7 @@ export function SelectFolderModal({ return (
- + + ))}
)} From 0e09f59412781b0760c74e8f12e44874eb708888 Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 10:24:14 +0100 Subject: [PATCH 21/26] chore: fixing a11y for gallery slider --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 293a898b..3e5072c7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [pull_request, push] +on: [push] jobs: lint: From bdb58e0e59e980c59723efd6de19dd1dd28d140c Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 10:41:21 +0100 Subject: [PATCH 22/26] ci: changing lint.yml to pull_request --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3e5072c7..5d5fc277 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [push] +on: [pull_request] jobs: lint: From 914e0d82e67e1439065243921e60b01b764b5abb Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 10:46:22 +0100 Subject: [PATCH 23/26] ci: moving prettier to eslint --- .eslintrc.cjs | 2 +- .github/workflows/lint.yml | 3 --- package.json | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 564daa84..e23081dc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -6,7 +6,7 @@ module.exports = { "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", "@electron-toolkit/eslint-config-ts/recommended", - "prettier", + "plugin:prettier/recommended", ], rules: { "@typescript-eslint/explicit-function-return-type": "off", diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5d5fc277..af4cbae7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,9 +21,6 @@ jobs: - name: Validate current commit (last commit) with commitlint run: npx commitlint --last --verbose - - name: Check formatting - run: yarn format:check - - name: Typecheck run: yarn typecheck diff --git a/package.json b/package.json index 85043c80..e59d3e12 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "type": "module", "scripts": { "format": "prettier --write .", - "format:check": "prettier --check .", "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix", "typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false", "typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false", From d30e095dc4a0f6ee0b46226319c9dede0db2a3f9 Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 10:48:17 +0100 Subject: [PATCH 24/26] ci: adding macos-latest --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59527b31..9a71e379 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: build: strategy: matrix: - os: [windows-latest, ubuntu-latest] + os: [windows-latest, macos-latest, ubuntu-latest] runs-on: ${{ matrix.os }} From a6bc937dda56abb6148f3bb3e37d24505be3797d Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 10:51:22 +0100 Subject: [PATCH 25/26] ci: removing macos-latest --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a71e379..59527b31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: build: strategy: matrix: - os: [windows-latest, macos-latest, ubuntu-latest] + os: [windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} From 76981b4fc81c61acb15b93e5ce554c0c5aad1ba7 Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 13 May 2024 10:59:04 +0100 Subject: [PATCH 26/26] chore: removing hardcoded language change --- src/renderer/src/hooks/use-date.ts | 14 +++++++++++++- src/renderer/src/main.tsx | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/hooks/use-date.ts b/src/renderer/src/hooks/use-date.ts index c9c6ecc1..bce73186 100644 --- a/src/renderer/src/hooks/use-date.ts +++ b/src/renderer/src/hooks/use-date.ts @@ -1,6 +1,18 @@ import { formatDistance } from "date-fns"; import type { FormatDistanceOptions } from "date-fns"; -import { ptBR, enUS, es, fr, pl, hu, tr, ru, it, be, da } from "date-fns/locale"; +import { + ptBR, + enUS, + es, + fr, + pl, + hu, + tr, + ru, + it, + be, + da, +} from "date-fns/locale"; import { useTranslation } from "react-i18next"; export function useDate() { diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx index 1ffc5099..d9b7821e 100644 --- a/src/renderer/src/main.tsx +++ b/src/renderer/src/main.tsx @@ -57,7 +57,6 @@ i18n }, }) .then(() => { - i18n.changeLanguage("pt-BR"); window.electron.updateUserPreferences({ language: i18n.language }); });