diff --git a/public/locales/en/layout/app-shelf.json b/public/locales/en/layout/app-shelf.json index 3297ffe7d..2074f4105 100644 --- a/public/locales/en/layout/app-shelf.json +++ b/public/locales/en/layout/app-shelf.json @@ -1,7 +1,9 @@ { "accordions": { "downloads": { - "text": "Your downloads" + "text": "Your downloads", + "torrents": "Your Torrent downloads", + "usenet": "Your Usenet downloads" }, "others": { "text": "Others" diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx index c4e59219a..114d98ec4 100644 --- a/src/components/AppShelf/AppShelf.tsx +++ b/src/components/AppShelf/AppShelf.tsx @@ -5,6 +5,7 @@ import { Grid, Paper, Stack, + Text, Title, useMantineColorScheme, } from '@mantine/core'; @@ -200,17 +201,18 @@ const AppShelf = (props: any) => { > {t('accordions.downloads.text')} - - {torrentEnabled && ( + + {torrentEnabled && ( <> - + {t('accordions.downloads.torrents')} + )} {usenetEnabled && ( <> - {torrentEnabled && } - + {t('accordions.downloads.usenet')} + )} diff --git a/src/modules/ModuleTypes.d.ts b/src/modules/ModuleTypes.d.ts index 8ccf82c9d..177ce5ae7 100644 --- a/src/modules/ModuleTypes.d.ts +++ b/src/modules/ModuleTypes.d.ts @@ -11,6 +11,15 @@ export interface IModule { icon: TablerIcon; component: React.ComponentType; options?: Option; + padding?: PaddingOptions = { + right: 15, + top: 15, + }, +} + +interface PaddingOptions { + top: number; + right: number; } interface Option { diff --git a/src/modules/moduleWrapper.tsx b/src/modules/moduleWrapper.tsx index c429e80af..d62e6b02e 100644 --- a/src/modules/moduleWrapper.tsx +++ b/src/modules/moduleWrapper.tsx @@ -186,8 +186,13 @@ export function ModuleWrapper(props: any) { ); } -export function ModuleMenu(props: any) { - const { module, styles, hovered } = props; +interface ModuleMenuProps { + hovered: boolean; + module: IModule; +} + +export function ModuleMenu(props: ModuleMenuProps) { + const { module, hovered } = props; const items: JSX.Element[] = getItems(module); const { t } = useTranslation('modules/common'); return ( @@ -207,12 +212,13 @@ export function ModuleMenu(props: any) { diff --git a/src/modules/torrents/TorrentsModule.tsx b/src/modules/torrents/TorrentsModule.tsx index aa4e12a18..d81696e24 100644 --- a/src/modules/torrents/TorrentsModule.tsx +++ b/src/modules/torrents/TorrentsModule.tsx @@ -34,6 +34,10 @@ export const TorrentsModule: IModule = { value: false, }, }, + padding: { + right: 0, + top: -10, + }, }; export default function TorrentsComponent() {