From 1416cd46a379e421a1bbc3e2fc487907ff4bde48 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Sat, 9 Nov 2024 16:03:43 -0300 Subject: [PATCH 1/9] feat: seed downloads from previous versions --- src/main/migrations/20241108200154_add_should_seed_colum.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/migrations/20241108200154_add_should_seed_colum.ts b/src/main/migrations/20241108200154_add_should_seed_colum.ts index 60be0730..7e90a3b1 100644 --- a/src/main/migrations/20241108200154_add_should_seed_colum.ts +++ b/src/main/migrations/20241108200154_add_should_seed_colum.ts @@ -5,7 +5,7 @@ export const AddShouldSeedColumn: HydraMigration = { name: "AddShouldSeedColumn", up: (knex: Knex) => { return knex.schema.alterTable("game", (table) => { - return table.boolean("shouldSeed").notNullable().defaultTo(false); + return table.boolean("shouldSeed").notNullable().defaultTo(true); }); }, From a7b8018ed953b7b2fb3861996499c434ece8254f Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Mon, 11 Nov 2024 16:24:04 -0300 Subject: [PATCH 2/9] "feat: pause seeding if game folder is deleted" --- .../services/download/download-manager.ts | 26 +++++++++++++++++++ src/preload/index.ts | 5 ++++ src/renderer/src/app.tsx | 8 ++++++ src/renderer/src/declaration.d.ts | 1 + 4 files changed, 40 insertions(+) diff --git a/src/main/services/download/download-manager.ts b/src/main/services/download/download-manager.ts index 9efe3e2e..b5508cce 100644 --- a/src/main/services/download/download-manager.ts +++ b/src/main/services/download/download-manager.ts @@ -9,6 +9,8 @@ import type { DownloadProgress } from "@types"; import { GofileApi, QiwiApi } from "../hosters"; import { GenericHttpDownloader } from "./generic-http-downloader"; import { In, Not } from "typeorm"; +import path from "path"; +import fs from "fs"; export class DownloadManager { private static currentDownloader: Downloader | null = null; @@ -85,6 +87,30 @@ export class DownloadManager { } const gameIds = seedStatus.map((status) => status.gameId); + + for (const gameId of gameIds) { + const game = await gameRepository.findOne({ + where: { id: gameId }, + }); + + if (game) { + const isNotDeleted = fs.existsSync( + path.join(game.downloadPath!, game.folderName!) + ); + + if (!isNotDeleted) { + await this.pauseSeeding(game.id); + + await gameRepository.update(game.id, { + status: "complete", + shouldSeed: false, + }); + + WindowManager.mainWindow?.webContents.send("on-hard-delete"); + } + } + } + const updateList = await gameRepository.find({ where: { id: In(gameIds), diff --git a/src/preload/index.ts b/src/preload/index.ts index 12c5054a..28d8d030 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -39,6 +39,11 @@ contextBridge.exposeInMainWorld("electron", { ipcRenderer.on("on-download-progress", listener); return () => ipcRenderer.removeListener("on-download-progress", listener); }, + onHardDelete: (cb: () => void) => { + const listener = (_event: Electron.IpcRendererEvent) => cb(); + ipcRenderer.on("on-hard-delete", listener); + return () => ipcRenderer.removeListener("on-hard-delete", listener); + }, onSeedingStatus: (cb: (value: SeedingStatus[]) => void) => { const listener = ( _event: Electron.IpcRendererEvent, diff --git a/src/renderer/src/app.tsx b/src/renderer/src/app.tsx index 5a479879..c4124e13 100644 --- a/src/renderer/src/app.tsx +++ b/src/renderer/src/app.tsx @@ -109,6 +109,14 @@ export function App() { }; }, [clearDownload, setLastPacket, updateLibrary]); + useEffect(() => { + const unsubscribe = window.electron.onHardDelete(() => { + updateLibrary(); + }); + + return () => unsubscribe(); + }, [updateLibrary]); + useEffect(() => { const cachedUserDetails = window.localStorage.getItem("userDetails"); diff --git a/src/renderer/src/declaration.d.ts b/src/renderer/src/declaration.d.ts index 9e658463..a8027f76 100644 --- a/src/renderer/src/declaration.d.ts +++ b/src/renderer/src/declaration.d.ts @@ -55,6 +55,7 @@ declare global { onSeedingStatus: ( cb: (value: SeedingStatus[]) => void ) => () => Electron.IpcRenderer; + onHardDelete: (cb: () => void) => () => Electron.IpcRenderer; /* Catalogue */ searchGames: (query: string) => Promise; From 40ec77342509c70bcf3ea941cc91941614429eb0 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Mon, 11 Nov 2024 16:39:58 -0300 Subject: [PATCH 3/9] lint --- src/renderer/src/app.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/app.tsx b/src/renderer/src/app.tsx index c4124e13..992e8714 100644 --- a/src/renderer/src/app.tsx +++ b/src/renderer/src/app.tsx @@ -113,7 +113,7 @@ export function App() { const unsubscribe = window.electron.onHardDelete(() => { updateLibrary(); }); - + return () => unsubscribe(); }, [updateLibrary]); From 2c1c3e3c984cd4bef8e7151f89f8a67a9ea34469 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Tue, 12 Nov 2024 04:10:19 -0300 Subject: [PATCH 4/9] feat: add dropdown menu component --- package.json | 1 + .../dropdown-menu/dropdown-menu.scss | 69 ++++ .../dropdown-menu/dropdown-menu.tsx | 78 +++++ yarn.lock | 321 +++++++++++++++++- 4 files changed, 463 insertions(+), 6 deletions(-) create mode 100644 src/renderer/src/components/dropdown-menu/dropdown-menu.scss create mode 100644 src/renderer/src/components/dropdown-menu/dropdown-menu.tsx diff --git a/package.json b/package.json index 457f2ff8..d3a2bab9 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@hookform/resolvers": "^3.9.0", "@intercom/messenger-js-sdk": "^0.0.14", "@primer/octicons-react": "^19.9.0", + "@radix-ui/react-dropdown-menu": "^2.1.2", "@reduxjs/toolkit": "^2.2.3", "@vanilla-extract/css": "^1.14.2", "@vanilla-extract/dynamic": "^2.1.1", diff --git a/src/renderer/src/components/dropdown-menu/dropdown-menu.scss b/src/renderer/src/components/dropdown-menu/dropdown-menu.scss new file mode 100644 index 00000000..c3474063 --- /dev/null +++ b/src/renderer/src/components/dropdown-menu/dropdown-menu.scss @@ -0,0 +1,69 @@ +@use "../../scss/globals.scss"; + +.dropdown-menu { + + &__content { + background-color: globals.$dark-background-color; + border: 1px solid globals.$border-color; + border-radius: 4px; + min-width: 200px; + flex-direction: column; + align-items: center; + } + + &__group { + width: 100%; + padding: 4px; + } + + &__title-bar { + width: 100%; + padding: 4px 12px; + font-size: 14px; + font-weight: 500; + color: globals.$muted-color; +} + + &__separator { + width: 100%; + height: 1px; + background-color: globals.$border-color; + } + + &__item { + width: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; + gap: 8px; + border-radius: 4px; + padding: 5px 12px; + cursor: pointer; + transition: background-color 0.1s ease-in-out; + font-size: 14px; +} + + &__item--disabled { + cursor: default; + opacity: 0.6; + } + + &:not(&__item--disabled) &__item:hover { + background-color: globals.$background-color; + color: globals.$muted-color; + } + + &__item:focus { + background-color: globals.$background-color; + outline: none; + } + + &__item-icon { + width: 16px; + height: 16px; + display: flex; + align-items: center; + justify-content: center; + } +} diff --git a/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx b/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx new file mode 100644 index 00000000..50888d1f --- /dev/null +++ b/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx @@ -0,0 +1,78 @@ +import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; +import "./dropdown-menu.scss"; + +export interface DropdownMenuItem { + icon?: React.ReactNode; + label: string; + disabled?: boolean; + show?: boolean; + onClick?: () => void; +} + +interface DropdownMenuProps { + children: React.ReactNode; + title?: string; + loop?: boolean; + items: DropdownMenuItem[]; + sideOffset?: number; + side?: "top" | "bottom" | "left" | "right"; + align?: "start" | "center" | "end"; + alignOffset?: number; +} + +export default ({ + children, + title, + items, + sideOffset = 5, + side = "bottom", + loop = true, + align = "center", + alignOffset = 0, +}: DropdownMenuProps) => ( + + + + + + + + {title && ( + +
+ {title} +
+
+ )} + + + + + {items.map((item) => + item.show !== false && ( + + {item.icon && ( +
{item.icon}
+ )} + {item.label} +
+ ) + )} +
+
+
+
+); diff --git a/yarn.lock b/yarn.lock index 0220a873..add1310b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1032,6 +1032,33 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== +"@floating-ui/core@^1.6.0": + version "1.6.8" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12" + integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA== + dependencies: + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/dom@^1.0.0": + version "1.6.12" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.12.tgz#6333dcb5a8ead3b2bf82f33d6bc410e95f54e556" + integrity sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w== + dependencies: + "@floating-ui/core" "^1.6.0" + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/react-dom@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz#a1349bbf6a0e5cb5ded55d023766f20a4d439a31" + integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== + dependencies: + "@floating-ui/dom" "^1.0.0" + +"@floating-ui/utils@^0.2.8": + version "0.2.8" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" + integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== + "@fontsource/noto-sans@^5.0.22": version "5.0.22" resolved "https://registry.yarnpkg.com/@fontsource/noto-sans/-/noto-sans-5.0.22.tgz#2c5249347ba84fef16e71a58e0ec01b460174093" @@ -1306,6 +1333,221 @@ resolved "https://registry.npmjs.org/@primer/octicons-react/-/octicons-react-19.9.0.tgz" integrity sha512-Uk4XrHyfylyfzZN9d8VFjF8FpfYHEyT4sabw+9+oP+GWAJHhPvNPTz6gXvUzJZmoblAvgcTrDslIPjz8zMh76w== +"@radix-ui/primitive@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.0.tgz#42ef83b3b56dccad5d703ae8c42919a68798bbe2" + integrity sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA== + +"@radix-ui/react-arrow@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz#744f388182d360b86285217e43b6c63633f39e7a" + integrity sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw== + dependencies: + "@radix-ui/react-primitive" "2.0.0" + +"@radix-ui/react-collection@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.1.0.tgz#f18af78e46454a2360d103c2251773028b7724ed" + integrity sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-slot" "1.1.0" + +"@radix-ui/react-compose-refs@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz#656432461fc8283d7b591dcf0d79152fae9ecc74" + integrity sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw== + +"@radix-ui/react-context@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.0.tgz#6df8d983546cfd1999c8512f3a8ad85a6e7fcee8" + integrity sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A== + +"@radix-ui/react-context@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.1.tgz#82074aa83a472353bb22e86f11bcbd1c61c4c71a" + integrity sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q== + +"@radix-ui/react-direction@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.1.0.tgz#a7d39855f4d077adc2a1922f9c353c5977a09cdc" + integrity sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg== + +"@radix-ui/react-dismissable-layer@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.1.tgz#cbdcb739c5403382bdde5f9243042ba643883396" + integrity sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-escape-keydown" "1.1.0" + +"@radix-ui/react-dropdown-menu@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.2.tgz#acc49577130e3c875ef0133bd1e271ea3392d924" + integrity sha512-GVZMR+eqK8/Kes0a36Qrv+i20bAPXSn8rCBTHx30w+3ECnR5o3xixAlqcVaYvLeyKUsm0aqyhWfmUcqufM8nYA== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-menu" "2.1.2" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-controllable-state" "1.1.0" + +"@radix-ui/react-focus-guards@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz#8635edd346304f8b42cae86b05912b61aef27afe" + integrity sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg== + +"@radix-ui/react-focus-scope@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz#ebe2891a298e0a33ad34daab2aad8dea31caf0b2" + integrity sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + +"@radix-ui/react-id@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.0.tgz#de47339656594ad722eb87f94a6b25f9cffae0ed" + integrity sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/react-menu@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-menu/-/react-menu-2.1.2.tgz#91f6815845a4298dde775563ed2d80b7ad667899" + integrity sha512-lZ0R4qR2Al6fZ4yCCZzu/ReTFrylHFxIqy7OezIpWF4bL0o9biKo0pFIvkaew3TyZ9Fy5gYVrR5zCGZBVbO1zg== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-collection" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-direction" "1.1.0" + "@radix-ui/react-dismissable-layer" "1.1.1" + "@radix-ui/react-focus-guards" "1.1.1" + "@radix-ui/react-focus-scope" "1.1.0" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-popper" "1.2.0" + "@radix-ui/react-portal" "1.1.2" + "@radix-ui/react-presence" "1.1.1" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-roving-focus" "1.1.0" + "@radix-ui/react-slot" "1.1.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + aria-hidden "^1.1.1" + react-remove-scroll "2.6.0" + +"@radix-ui/react-popper@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.2.0.tgz#a3e500193d144fe2d8f5d5e60e393d64111f2a7a" + integrity sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg== + dependencies: + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + "@radix-ui/react-use-rect" "1.1.0" + "@radix-ui/react-use-size" "1.1.0" + "@radix-ui/rect" "1.1.0" + +"@radix-ui/react-portal@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.2.tgz#51eb46dae7505074b306ebcb985bf65cc547d74e" + integrity sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg== + dependencies: + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/react-presence@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.1.tgz#98aba423dba5e0c687a782c0669dcd99de17f9b1" + integrity sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/react-primitive@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz#fe05715faa9203a223ccc0be15dc44b9f9822884" + integrity sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw== + dependencies: + "@radix-ui/react-slot" "1.1.0" + +"@radix-ui/react-roving-focus@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz#b30c59daf7e714c748805bfe11c76f96caaac35e" + integrity sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-collection" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-direction" "1.1.0" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-controllable-state" "1.1.0" + +"@radix-ui/react-slot@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.1.0.tgz#7c5e48c36ef5496d97b08f1357bb26ed7c714b84" + integrity sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + +"@radix-ui/react-use-callback-ref@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz#bce938ca413675bc937944b0d01ef6f4a6dc5bf1" + integrity sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw== + +"@radix-ui/react-use-controllable-state@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz#1321446857bb786917df54c0d4d084877aab04b0" + integrity sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw== + dependencies: + "@radix-ui/react-use-callback-ref" "1.1.0" + +"@radix-ui/react-use-escape-keydown@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz#31a5b87c3b726504b74e05dac1edce7437b98754" + integrity sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw== + dependencies: + "@radix-ui/react-use-callback-ref" "1.1.0" + +"@radix-ui/react-use-layout-effect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz#3c2c8ce04827b26a39e442ff4888d9212268bd27" + integrity sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w== + +"@radix-ui/react-use-rect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz#13b25b913bd3e3987cc9b073a1a164bb1cf47b88" + integrity sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ== + dependencies: + "@radix-ui/rect" "1.1.0" + +"@radix-ui/react-use-size@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz#b4dba7fbd3882ee09e8d2a44a3eed3a7e555246b" + integrity sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/rect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.0.tgz#f817d1d3265ac5415dadc67edab30ae196696438" + integrity sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg== + "@reduxjs/toolkit@^2.2.3": version "2.2.5" resolved "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.5.tgz" @@ -2279,6 +2521,13 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +aria-hidden@^1.1.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.4.tgz#b78e383fdbc04d05762c78b4a25a501e736c4522" + integrity sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A== + dependencies: + tslib "^2.0.0" + aria-query@~5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" @@ -3220,6 +3469,11 @@ detect-libc@^2.0.0, detect-libc@^2.0.1: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== +detect-node-es@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" + integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== + detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" @@ -4145,6 +4399,11 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-nonce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" + integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -4592,6 +4851,13 @@ interpret@^2.2.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + ip-address@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" @@ -5233,7 +5499,7 @@ log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -6130,6 +6396,25 @@ react-refresh@^0.14.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== +react-remove-scroll-bar@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz#3e585e9d163be84a010180b18721e851ac81a29c" + integrity sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g== + dependencies: + react-style-singleton "^2.2.1" + tslib "^2.0.0" + +react-remove-scroll@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.6.0.tgz#fb03a0845d7768a4f1519a99fdb84983b793dc07" + integrity sha512-I2U4JVEsQenxDAKaVa3VZ/JeJZe0/2DxPWL8Tj8yLKctQJQiZM52pn/GWFpSp8dftjM3pSAHVJZscAnC/y+ySQ== + dependencies: + react-remove-scroll-bar "^2.3.6" + react-style-singleton "^2.2.1" + tslib "^2.1.0" + use-callback-ref "^1.3.0" + use-sidecar "^1.1.2" + react-router-dom@^6.22.3: version "6.26.2" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.26.2.tgz#a6e3b0cbd6bfd508e42b9342099d015a0ac59680" @@ -6145,6 +6430,15 @@ react-router@6.26.2: dependencies: "@remix-run/router" "1.19.2" +react-style-singleton@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.1.tgz#f99e420492b2d8f34d38308ff660b60d0b1205b4" + integrity sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g== + dependencies: + get-nonce "^1.0.0" + invariant "^2.2.4" + tslib "^2.0.0" + react@^18.2.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" @@ -7163,16 +7457,16 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tslib@^2.0.0, tslib@^2.1.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tslib@^2.0.3, tslib@^2.5.0, tslib@^2.6.2: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== -tslib@^2.1.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" - integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -7366,6 +7660,21 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" +use-callback-ref@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.2.tgz#6134c7f6ff76e2be0b56c809b17a650c942b1693" + integrity sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA== + dependencies: + tslib "^2.0.0" + +use-sidecar@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.2.tgz#2f43126ba2d7d7e117aa5855e5d8f0276dfe73c2" + integrity sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw== + dependencies: + detect-node-es "^1.1.0" + tslib "^2.0.0" + use-sync-external-store@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9" From ca953de4640e92e6985bd6dff45d815419829eba Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Tue, 12 Nov 2024 04:10:43 -0300 Subject: [PATCH 5/9] lint --- .../dropdown-menu/dropdown-menu.scss | 5 ++- .../dropdown-menu/dropdown-menu.tsx | 35 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/renderer/src/components/dropdown-menu/dropdown-menu.scss b/src/renderer/src/components/dropdown-menu/dropdown-menu.scss index c3474063..3c615116 100644 --- a/src/renderer/src/components/dropdown-menu/dropdown-menu.scss +++ b/src/renderer/src/components/dropdown-menu/dropdown-menu.scss @@ -1,7 +1,6 @@ @use "../../scss/globals.scss"; .dropdown-menu { - &__content { background-color: globals.$dark-background-color; border: 1px solid globals.$border-color; @@ -22,7 +21,7 @@ font-size: 14px; font-weight: 500; color: globals.$muted-color; -} + } &__separator { width: 100%; @@ -42,7 +41,7 @@ cursor: pointer; transition: background-color 0.1s ease-in-out; font-size: 14px; -} + } &__item--disabled { cursor: default; diff --git a/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx b/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx index 50888d1f..747bad0a 100644 --- a/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx +++ b/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx @@ -46,30 +46,29 @@ export default ({ > {title && ( -
- {title} -
+
{title}
)} - {items.map((item) => - item.show !== false && ( - - {item.icon && ( -
{item.icon}
- )} - {item.label} -
- ) + {items.map( + (item) => + item.show !== false && ( + + {item.icon && ( +
{item.icon}
+ )} + {item.label} +
+ ) )}
From 94ef1679a9f078ad3c22937dedd0d0c77ae43841 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Tue, 12 Nov 2024 04:12:22 -0300 Subject: [PATCH 6/9] feat: add menu with download options on download page --- src/locales/en/translation.json | 3 +- src/locales/pt-BR/translation.json | 3 +- .../src/pages/downloads/download-group.tsx | 145 +++++++++--------- 3 files changed, 79 insertions(+), 72 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index a052f19d..1b9cd254 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -202,7 +202,8 @@ "checking_files": "Checking files…", "seeding": "Seeding", "stop_seeding": "Stop seeding", - "resume_seeding": "Resume seeding" + "resume_seeding": "Resume seeding", + "options": "Manage" }, "settings": { "downloads_path": "Downloads path", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index d845a082..865083ef 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -198,7 +198,8 @@ "checking_files": "Verificando arquivos…", "seeding": "Semeando", "stop_seeding": "Parar semeio", - "resume_seeding": "Retomar semeio" + "resume_seeding": "Retomar semeio", + "options": "Gerenciar" }, "settings": { "downloads_path": "Diretório dos downloads", diff --git a/src/renderer/src/pages/downloads/download-group.tsx b/src/renderer/src/pages/downloads/download-group.tsx index ac1d0919..5bff2b62 100644 --- a/src/renderer/src/pages/downloads/download-group.tsx +++ b/src/renderer/src/pages/downloads/download-group.tsx @@ -15,8 +15,11 @@ import { useAppSelector, useDownload } from "@renderer/hooks"; import * as styles from "./download-group.css"; import { useTranslation } from "react-i18next"; import { SPACING_UNIT, vars } from "@renderer/theme.css"; -import { XCircleIcon } from "@primer/octicons-react"; import { useMemo } from "react"; +import DropdownMenu, { + DropdownMenuItem, +} from "@renderer/components/dropdown-menu/dropdown-menu"; +import { ThreeBarsIcon } from "@primer/octicons-react"; export interface DownloadGroupProps { library: LibraryGame[]; @@ -152,65 +155,64 @@ export function DownloadGroup({ return

{t(game.status as string)}

; }; - const getGameActions = (game: LibraryGame) => { + const getGameActions = (game: LibraryGame): DropdownMenuItem[] => { const isGameDownloading = lastPacket?.game.id === game.id; const deleting = isGameDeleting(game.id); if (game.progress === 1) { - return ( - <> - - - {game.status === "seeding" ? ( - - ) : ( - - )} - - ); + return [ + { + label: t("install"), + disabled: deleting, + onClick: () => openGameInstaller(game.id), + }, + { + label: t("stop_seeding"), + disabled: deleting, + show: game.status === "seeding", + onClick: () => pauseSeeding(game.id), + }, + { + label: t("resume_seeding"), + disabled: deleting, + show: game.status !== "seeding", + onClick: () => resumeSeeding(game.id), + }, + { + label: t("delete"), + disabled: deleting, + onClick: () => openDeleteGameModal(game.id), + }, + ]; } if (isGameDownloading || game.status === "active") { - return ( - <> - - - - ); + return [ + { + label: t("pause"), + onClick: () => pauseDownload(game.id), + }, + { + label: t("cancel"), + onClick: () => cancelDownload(game.id), + }, + ]; } - return ( - <> - - - - ); + return [ + { + label: t("resume"), + disabled: + game.downloader === Downloader.RealDebrid && + !userPreferences?.realDebridApiToken, + onClick: () => resumeDownload(game.id), + }, + { + label: t("cancel"), + onClick: () => cancelDownload(game.id), + }, + ]; }; if (!library.length) return null; @@ -280,26 +282,29 @@ export function DownloadGroup({ {getGameInfo(game)} -
- {getGameActions(game)} -
- + {getGameActions(game) !== null && ( + + + + )} ); From 9d1c04d07ab51f8f9473b71b63b644b009a7f723 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Tue, 12 Nov 2024 04:32:08 -0300 Subject: [PATCH 7/9] refactor: export with component definition --- .../dropdown-menu/dropdown-menu.tsx | 96 ++++++++++--------- .../src/pages/downloads/download-group.tsx | 4 +- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx b/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx index 747bad0a..713697e7 100644 --- a/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx +++ b/src/renderer/src/components/dropdown-menu/dropdown-menu.tsx @@ -1,4 +1,4 @@ -import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; +import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; import "./dropdown-menu.scss"; export interface DropdownMenuItem { @@ -20,7 +20,7 @@ interface DropdownMenuProps { alignOffset?: number; } -export default ({ +export function DropdownMenu({ children, title, items, @@ -29,49 +29,53 @@ export default ({ loop = true, align = "center", alignOffset = 0, -}: DropdownMenuProps) => ( - - - - +}: DropdownMenuProps) { + return ( + + + + - - - {title && ( - -
{title}
-
- )} - - - - - {items.map( - (item) => - item.show !== false && ( - - {item.icon && ( -
{item.icon}
- )} - {item.label} -
- ) + + + {title && ( + +
{title}
+
)} -
-
-
-
-); + + + + + {items.map( + (item) => + item.show !== false && ( + + {item.icon && ( +
+ {item.icon} +
+ )} + {item.label} +
+ ) + )} +
+ + + + ); +} diff --git a/src/renderer/src/pages/downloads/download-group.tsx b/src/renderer/src/pages/downloads/download-group.tsx index 5bff2b62..05954535 100644 --- a/src/renderer/src/pages/downloads/download-group.tsx +++ b/src/renderer/src/pages/downloads/download-group.tsx @@ -16,9 +16,7 @@ import * as styles from "./download-group.css"; import { useTranslation } from "react-i18next"; import { SPACING_UNIT, vars } from "@renderer/theme.css"; import { useMemo } from "react"; -import DropdownMenu, { - DropdownMenuItem, -} from "@renderer/components/dropdown-menu/dropdown-menu"; +import { DropdownMenu, DropdownMenuItem } from "@renderer/components/dropdown-menu/dropdown-menu"; import { ThreeBarsIcon } from "@primer/octicons-react"; export interface DownloadGroupProps { From 330341392d0ccd9569007e0d8fae58b685fb0ff7 Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Tue, 12 Nov 2024 04:32:34 -0300 Subject: [PATCH 8/9] lint --- src/renderer/src/pages/downloads/download-group.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/pages/downloads/download-group.tsx b/src/renderer/src/pages/downloads/download-group.tsx index 05954535..0bebc292 100644 --- a/src/renderer/src/pages/downloads/download-group.tsx +++ b/src/renderer/src/pages/downloads/download-group.tsx @@ -16,7 +16,10 @@ import * as styles from "./download-group.css"; import { useTranslation } from "react-i18next"; import { SPACING_UNIT, vars } from "@renderer/theme.css"; import { useMemo } from "react"; -import { DropdownMenu, DropdownMenuItem } from "@renderer/components/dropdown-menu/dropdown-menu"; +import { + DropdownMenu, + DropdownMenuItem, +} from "@renderer/components/dropdown-menu/dropdown-menu"; import { ThreeBarsIcon } from "@primer/octicons-react"; export interface DownloadGroupProps { From f2cc20cb7c26b1823549f15d624e73f5e61dbd2a Mon Sep 17 00:00:00 2001 From: Hachi-R Date: Fri, 15 Nov 2024 23:54:45 -0300 Subject: [PATCH 9/9] refactor: removed dropdown title because its ugly --- src/renderer/src/pages/downloads/download-group.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/renderer/src/pages/downloads/download-group.tsx b/src/renderer/src/pages/downloads/download-group.tsx index 0bebc292..728114e3 100644 --- a/src/renderer/src/pages/downloads/download-group.tsx +++ b/src/renderer/src/pages/downloads/download-group.tsx @@ -285,7 +285,6 @@ export function DownloadGroup({ {getGameActions(game) !== null && (