fix: update Portuguese translations and enhance dropdown menu styling

This commit is contained in:
Hachi-R 2024-12-22 19:30:05 -03:00
parent 855f0aa334
commit 859d849d36
3 changed files with 22 additions and 5 deletions

View File

@ -199,8 +199,8 @@
"no_downloads_description": "Você ainda não baixou nada pelo Hydra, mas nunca é tarde para começar.", "no_downloads_description": "Você ainda não baixou nada pelo Hydra, mas nunca é tarde para começar.",
"checking_files": "Verificando arquivos…", "checking_files": "Verificando arquivos…",
"seeding": "Semeando", "seeding": "Semeando",
"stop_seeding": "Parar semeio", "stop_seeding": "Parar de semear",
"resume_seeding": "Retomar semeio", "resume_seeding": "Semear",
"options": "Gerenciar" "options": "Gerenciar"
}, },
"settings": { "settings": {

View File

@ -4,7 +4,7 @@
&__content { &__content {
background-color: globals.$dark-background-color; background-color: globals.$dark-background-color;
border: 1px solid globals.$border-color; border: 1px solid globals.$border-color;
border-radius: 4px; border-radius: 6px;
min-width: 200px; min-width: 200px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;

View File

@ -20,7 +20,16 @@ import {
DropdownMenu, DropdownMenu,
DropdownMenuItem, DropdownMenuItem,
} from "@renderer/components/dropdown-menu/dropdown-menu"; } from "@renderer/components/dropdown-menu/dropdown-menu";
import { ThreeBarsIcon } from "@primer/octicons-react"; import {
ColumnsIcon,
DownloadIcon,
LinkIcon,
PlayIcon,
ThreeBarsIcon,
TrashIcon,
UnlinkIcon,
XCircleIcon,
} from "@primer/octicons-react";
export interface DownloadGroupProps { export interface DownloadGroupProps {
library: LibraryGame[]; library: LibraryGame[];
@ -168,10 +177,12 @@ export function DownloadGroup({
label: t("install"), label: t("install"),
disabled: deleting, disabled: deleting,
onClick: () => openGameInstaller(game.id), onClick: () => openGameInstaller(game.id),
icon: <DownloadIcon />,
}, },
{ {
label: t("stop_seeding"), label: t("stop_seeding"),
disabled: deleting, disabled: deleting,
icon: <UnlinkIcon />,
show: show:
game.status === "seeding" && game.downloader === Downloader.Torrent, game.status === "seeding" && game.downloader === Downloader.Torrent,
onClick: () => pauseSeeding(game.id), onClick: () => pauseSeeding(game.id),
@ -179,6 +190,7 @@ export function DownloadGroup({
{ {
label: t("resume_seeding"), label: t("resume_seeding"),
disabled: deleting, disabled: deleting,
icon: <LinkIcon />,
show: show:
game.status !== "seeding" && game.downloader === Downloader.Torrent, game.status !== "seeding" && game.downloader === Downloader.Torrent,
onClick: () => resumeSeeding(game.id), onClick: () => resumeSeeding(game.id),
@ -186,6 +198,7 @@ export function DownloadGroup({
{ {
label: t("delete"), label: t("delete"),
disabled: deleting, disabled: deleting,
icon: <TrashIcon />,
onClick: () => openDeleteGameModal(game.id), onClick: () => openDeleteGameModal(game.id),
}, },
]; ];
@ -196,10 +209,12 @@ export function DownloadGroup({
{ {
label: t("pause"), label: t("pause"),
onClick: () => pauseDownload(game.id), onClick: () => pauseDownload(game.id),
icon: <ColumnsIcon />,
}, },
{ {
label: t("cancel"), label: t("cancel"),
onClick: () => cancelDownload(game.id), onClick: () => cancelDownload(game.id),
icon: <XCircleIcon />,
}, },
]; ];
} }
@ -211,10 +226,12 @@ export function DownloadGroup({
game.downloader === Downloader.RealDebrid && game.downloader === Downloader.RealDebrid &&
!userPreferences?.realDebridApiToken, !userPreferences?.realDebridApiToken,
onClick: () => resumeDownload(game.id), onClick: () => resumeDownload(game.id),
icon: <PlayIcon />,
}, },
{ {
label: t("cancel"), label: t("cancel"),
onClick: () => cancelDownload(game.id), onClick: () => cancelDownload(game.id),
icon: <XCircleIcon />,
}, },
]; ];
}; };
@ -290,7 +307,7 @@ export function DownloadGroup({
<DropdownMenu <DropdownMenu
align="end" align="end"
items={getGameActions(game)} items={getGameActions(game)}
sideOffset={-70} sideOffset={-75}
> >
<Button <Button
style={{ style={{