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",
"download_error": "This download option is not available",
"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": {
"title": "Activate Hydra",

View File

@ -124,7 +124,9 @@
"player_count": "Jogadores ativos",
"download_error": "Essa opção de download falhou",
"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": {
"title": "Ativação",

View File

@ -113,7 +113,9 @@
"create_shortcut_success": "Atalho criado com sucesso",
"create_shortcut_error": "Erro ao criar atalho",
"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": {
"title": "Ativação",

View File

@ -8,7 +8,7 @@ import { CheckCircleFillIcon, DownloadIcon } from "@primer/octicons-react";
import { Downloader, formatBytes, getDownloadersForUris } from "@shared";
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 { useAppSelector, useToast } from "@renderer/hooks";
@ -129,15 +129,14 @@ export function DownloadSettingsModal({
onClose={onClose}
>
<div className={styles.container}>
<div>
<span
style={{
marginBottom: `${SPACING_UNIT}px`,
display: "block",
}}
>
{t("downloader")}
</span>
<div
style={{
display: "flex",
flexDirection: "column",
gap: `${SPACING_UNIT}px`,
}}
>
<span>{t("downloader")}</span>
<div className={styles.downloaders}>
{downloaders.map((downloader) => (
@ -160,6 +159,13 @@ export function DownloadSettingsModal({
</Button>
))}
</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