mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 13:34:54 +03:00
fix: fixing sonar issues
This commit is contained in:
parent
dcd16346ab
commit
93fc486e90
@ -6,7 +6,7 @@ export interface DropdownMenuItem {
|
||||
label: string;
|
||||
disabled?: boolean;
|
||||
show?: boolean;
|
||||
onClick?: () => void | Promise<void>;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
interface DropdownMenuProps {
|
||||
@ -29,7 +29,7 @@ export function DropdownMenu({
|
||||
loop = true,
|
||||
align = "center",
|
||||
alignOffset = 0,
|
||||
}: DropdownMenuProps) {
|
||||
}: Readonly<DropdownMenuProps>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Root>
|
||||
<DropdownMenuPrimitive.Trigger asChild>
|
||||
|
@ -179,7 +179,9 @@ export function DownloadGroup({
|
||||
{
|
||||
label: t("install"),
|
||||
disabled: deleting,
|
||||
onClick: () => openGameInstaller(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
openGameInstaller(game.shop, game.objectId);
|
||||
},
|
||||
icon: <DownloadIcon />,
|
||||
},
|
||||
{
|
||||
@ -189,7 +191,9 @@ export function DownloadGroup({
|
||||
show:
|
||||
download.status === "seeding" &&
|
||||
download.downloader === Downloader.Torrent,
|
||||
onClick: () => pauseSeeding(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
pauseSeeding(game.shop, game.objectId);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t("resume_seeding"),
|
||||
@ -198,13 +202,17 @@ export function DownloadGroup({
|
||||
show:
|
||||
download.status !== "seeding" &&
|
||||
download.downloader === Downloader.Torrent,
|
||||
onClick: () => resumeSeeding(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
resumeSeeding(game.shop, game.objectId);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t("delete"),
|
||||
disabled: deleting,
|
||||
icon: <TrashIcon />,
|
||||
onClick: () => openDeleteGameModal(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
openDeleteGameModal(game.shop, game.objectId);
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
@ -213,12 +221,16 @@ export function DownloadGroup({
|
||||
return [
|
||||
{
|
||||
label: t("pause"),
|
||||
onClick: () => pauseDownload(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
pauseDownload(game.shop, game.objectId);
|
||||
},
|
||||
icon: <ColumnsIcon />,
|
||||
},
|
||||
{
|
||||
label: t("cancel"),
|
||||
onClick: () => cancelDownload(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
cancelDownload(game.shop, game.objectId);
|
||||
},
|
||||
icon: <XCircleIcon />,
|
||||
},
|
||||
];
|
||||
@ -230,12 +242,16 @@ export function DownloadGroup({
|
||||
disabled:
|
||||
download?.downloader === Downloader.RealDebrid &&
|
||||
!userPreferences?.realDebridApiToken,
|
||||
onClick: () => resumeDownload(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
resumeDownload(game.shop, game.objectId);
|
||||
},
|
||||
icon: <PlayIcon />,
|
||||
},
|
||||
{
|
||||
label: t("cancel"),
|
||||
onClick: () => cancelDownload(game.shop, game.objectId),
|
||||
onClick: () => {
|
||||
cancelDownload(game.shop, game.objectId);
|
||||
},
|
||||
icon: <XCircleIcon />,
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user