feat: message warning hydra close

This commit is contained in:
Zamitto 2024-09-14 16:51:09 -03:00
parent f2211ec6ce
commit b0876b93ed
4 changed files with 25 additions and 13 deletions

View File

@ -128,7 +128,9 @@
"player_count": "Active players", "player_count": "Active players",
"download_error": "This download option is not available", "download_error": "This download option is not available",
"download": "Download", "download": "Download",
"executable_path_in_use": "Executable already in use by \"{{game}}\"" "executable_path_in_use": "Executable already in use by \"{{game}}\"",
"warning": "Warning:",
"hydra_needs_to_remain_open": "for this download, Hydra needs to remain open util its conclusion. In case Hydra closes before the conclusion, you will lose your progress."
}, },
"activation": { "activation": {
"title": "Activate Hydra", "title": "Activate Hydra",

View File

@ -124,7 +124,9 @@
"player_count": "Jogadores ativos", "player_count": "Jogadores ativos",
"download_error": "Essa opção de download falhou", "download_error": "Essa opção de download falhou",
"download": "Baixar", "download": "Baixar",
"executable_path_in_use": "Executável em uso por \"{{game}}\"" "executable_path_in_use": "Executável em uso por \"{{game}}\"",
"warning": "Aviso:",
"hydra_needs_to_remain_open": "para este download, o Hydra precisa ficar aberto até a conclusão. Caso o Hydra encerre antes da conclusão, perderá seu progresso."
}, },
"activation": { "activation": {
"title": "Ativação", "title": "Ativação",

View File

@ -113,7 +113,9 @@
"create_shortcut_success": "Atalho criado com sucesso", "create_shortcut_success": "Atalho criado com sucesso",
"create_shortcut_error": "Erro ao criar atalho", "create_shortcut_error": "Erro ao criar atalho",
"download": "Transferir", "download": "Transferir",
"executable_path_in_use": "Executável em uso por \"{{game}}\"" "executable_path_in_use": "Executável em uso por \"{{game}}\"",
"warning": "Aviso:",
"hydra_needs_to_remain_open": "para este download, o Hydra precisa ficar aberto até a conclusão. Caso o Hydra encerre antes da conclusão, perderá seu progresso."
}, },
"activation": { "activation": {
"title": "Ativação", "title": "Ativação",

View File

@ -8,7 +8,7 @@ import { CheckCircleFillIcon, DownloadIcon } from "@primer/octicons-react";
import { Downloader, formatBytes, getDownloadersForUris } from "@shared"; import { Downloader, formatBytes, getDownloadersForUris } from "@shared";
import type { GameRepack } from "@types"; import type { GameRepack } from "@types";
import { SPACING_UNIT } from "@renderer/theme.css"; import { SPACING_UNIT, vars } from "@renderer/theme.css";
import { DOWNLOADER_NAME } from "@renderer/constants"; import { DOWNLOADER_NAME } from "@renderer/constants";
import { useAppSelector, useToast } from "@renderer/hooks"; import { useAppSelector, useToast } from "@renderer/hooks";
@ -129,15 +129,14 @@ export function DownloadSettingsModal({
onClose={onClose} onClose={onClose}
> >
<div className={styles.container}> <div className={styles.container}>
<div> <div
<span style={{
style={{ display: "flex",
marginBottom: `${SPACING_UNIT}px`, flexDirection: "column",
display: "block", gap: `${SPACING_UNIT}px`,
}} }}
> >
{t("downloader")} <span>{t("downloader")}</span>
</span>
<div className={styles.downloaders}> <div className={styles.downloaders}>
{downloaders.map((downloader) => ( {downloaders.map((downloader) => (
@ -160,6 +159,13 @@ export function DownloadSettingsModal({
</Button> </Button>
))} ))}
</div> </div>
{selectedDownloader && selectedDownloader !== Downloader.Torrent && (
<p style={{ marginTop: `${SPACING_UNIT}px` }}>
<span style={{ color: vars.color.warning }}>{t("warning")}</span>{" "}
{t("hydra_needs_to_remain_open")}
</p>
)}
</div> </div>
<div <div