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;
|
label: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
show?: boolean;
|
show?: boolean;
|
||||||
onClick?: () => void | Promise<void>;
|
onClick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DropdownMenuProps {
|
interface DropdownMenuProps {
|
||||||
@ -29,7 +29,7 @@ export function DropdownMenu({
|
|||||||
loop = true,
|
loop = true,
|
||||||
align = "center",
|
align = "center",
|
||||||
alignOffset = 0,
|
alignOffset = 0,
|
||||||
}: DropdownMenuProps) {
|
}: Readonly<DropdownMenuProps>) {
|
||||||
return (
|
return (
|
||||||
<DropdownMenuPrimitive.Root>
|
<DropdownMenuPrimitive.Root>
|
||||||
<DropdownMenuPrimitive.Trigger asChild>
|
<DropdownMenuPrimitive.Trigger asChild>
|
||||||
|
@ -179,7 +179,9 @@ export function DownloadGroup({
|
|||||||
{
|
{
|
||||||
label: t("install"),
|
label: t("install"),
|
||||||
disabled: deleting,
|
disabled: deleting,
|
||||||
onClick: () => openGameInstaller(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
openGameInstaller(game.shop, game.objectId);
|
||||||
|
},
|
||||||
icon: <DownloadIcon />,
|
icon: <DownloadIcon />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -189,7 +191,9 @@ export function DownloadGroup({
|
|||||||
show:
|
show:
|
||||||
download.status === "seeding" &&
|
download.status === "seeding" &&
|
||||||
download.downloader === Downloader.Torrent,
|
download.downloader === Downloader.Torrent,
|
||||||
onClick: () => pauseSeeding(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
pauseSeeding(game.shop, game.objectId);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t("resume_seeding"),
|
label: t("resume_seeding"),
|
||||||
@ -198,13 +202,17 @@ export function DownloadGroup({
|
|||||||
show:
|
show:
|
||||||
download.status !== "seeding" &&
|
download.status !== "seeding" &&
|
||||||
download.downloader === Downloader.Torrent,
|
download.downloader === Downloader.Torrent,
|
||||||
onClick: () => resumeSeeding(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
resumeSeeding(game.shop, game.objectId);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t("delete"),
|
label: t("delete"),
|
||||||
disabled: deleting,
|
disabled: deleting,
|
||||||
icon: <TrashIcon />,
|
icon: <TrashIcon />,
|
||||||
onClick: () => openDeleteGameModal(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
openDeleteGameModal(game.shop, game.objectId);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -213,12 +221,16 @@ export function DownloadGroup({
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: t("pause"),
|
label: t("pause"),
|
||||||
onClick: () => pauseDownload(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
pauseDownload(game.shop, game.objectId);
|
||||||
|
},
|
||||||
icon: <ColumnsIcon />,
|
icon: <ColumnsIcon />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t("cancel"),
|
label: t("cancel"),
|
||||||
onClick: () => cancelDownload(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
cancelDownload(game.shop, game.objectId);
|
||||||
|
},
|
||||||
icon: <XCircleIcon />,
|
icon: <XCircleIcon />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -230,12 +242,16 @@ export function DownloadGroup({
|
|||||||
disabled:
|
disabled:
|
||||||
download?.downloader === Downloader.RealDebrid &&
|
download?.downloader === Downloader.RealDebrid &&
|
||||||
!userPreferences?.realDebridApiToken,
|
!userPreferences?.realDebridApiToken,
|
||||||
onClick: () => resumeDownload(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
resumeDownload(game.shop, game.objectId);
|
||||||
|
},
|
||||||
icon: <PlayIcon />,
|
icon: <PlayIcon />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t("cancel"),
|
label: t("cancel"),
|
||||||
onClick: () => cancelDownload(game.shop, game.objectId),
|
onClick: () => {
|
||||||
|
cancelDownload(game.shop, game.objectId);
|
||||||
|
},
|
||||||
icon: <XCircleIcon />,
|
icon: <XCircleIcon />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user