Merge pull request #960 from hydralauncher/feat/message-warning-hydra-close

feat: message warning hydra closing while downloading
This commit is contained in:
Zamitto 2024-09-14 17:01:01 -03:00 committed by GitHub
commit d92a9ab410
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 30 additions and 19 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

@ -43,7 +43,7 @@ export function GameDetailsSkeleton() {
</div>
</div>
<div className={sidebarStyles.contentSidebar}>
<div className={sidebarStyles.contentSidebarTitle}>
{/* <div className={sidebarStyles.contentSidebarTitle}>
<h3>HowLongToBeat</h3>
</div>
<ul className={sidebarStyles.howLongToBeatCategoriesList}>
@ -53,7 +53,7 @@ export function GameDetailsSkeleton() {
className={sidebarStyles.howLongToBeatCategorySkeleton}
/>
))}
</ul>
</ul> */}
<div
className={sidebarStyles.contentSidebarTitle}
style={{ border: "none" }}

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
<div
style={{
marginBottom: `${SPACING_UNIT}px`,
display: "block",
display: "flex",
flexDirection: "column",
gap: `${SPACING_UNIT}px`,
}}
>
{t("downloader")}
</span>
<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

View File

@ -1,5 +1,4 @@
import { useContext, useEffect, useState } from "react";
import { HowLongToBeatSection } from "./how-long-to-beat-section";
import type { HowLongToBeatCategory, SteamAppDetails } from "@types";
import { useTranslation } from "react-i18next";
import { Button } from "@renderer/components";
@ -10,7 +9,7 @@ import { useFormat } from "@renderer/hooks";
import { DownloadIcon, PeopleIcon } from "@primer/octicons-react";
export function Sidebar() {
const [howLongToBeat, setHowLongToBeat] = useState<{
const [_howLongToBeat, setHowLongToBeat] = useState<{
isLoading: boolean;
data: HowLongToBeatCategory[] | null;
}>({ isLoading: true, data: null });
@ -42,10 +41,10 @@ export function Sidebar() {
return (
<aside className={styles.contentSidebar}>
<HowLongToBeatSection
{/* <HowLongToBeatSection
howLongToBeatData={howLongToBeat.data}
isLoading={howLongToBeat.isLoading}
/>
/> */}
{stats && (
<>