diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx
index 422435052..ede6a307f 100644
--- a/src/components/AppShelf/AppShelf.tsx
+++ b/src/components/AppShelf/AppShelf.tsx
@@ -15,8 +15,9 @@ import { useLocalStorage } from '@mantine/hooks';
import { useConfig } from '../../tools/state';
import { SortableAppShelfItem, AppShelfItem } from './AppShelfItem';
-import { ModuleWrapper } from '../modules/moduleWrapper';
+import { ModuleMenu, ModuleWrapper } from '../modules/moduleWrapper';
import { DownloadsModule } from '../modules';
+import DownloadComponent from '../modules/downloads/DownloadsModule';
const useStyles = createStyles((theme, _params) => ({
item: {
@@ -137,6 +138,7 @@ const AppShelf = (props: any) => {
// Return one item for each category
{
{item()}
) : null}
+
+
+
+
-
);
}
diff --git a/src/components/Config/ConfigChanger.tsx b/src/components/Config/ConfigChanger.tsx
index fa4920242..a34846556 100644
--- a/src/components/Config/ConfigChanger.tsx
+++ b/src/components/Config/ConfigChanger.tsx
@@ -26,7 +26,10 @@ export default function ConfigChanger() {
label="Config loader"
onChange={(e) => {
loadConfig(e ?? 'default');
- setCookies('config-name', e ?? 'default', { maxAge: 60 * 60 * 24 * 30, sameSite: 'strict' });
+ setCookies('config-name', e ?? 'default', {
+ maxAge: 60 * 60 * 24 * 30,
+ sameSite: 'strict',
+ });
}}
data={
// If config list is empty, return the current config
diff --git a/src/components/modules/downloads/DownloadsModule.tsx b/src/components/modules/downloads/DownloadsModule.tsx
index 84a013955..527a6e835 100644
--- a/src/components/modules/downloads/DownloadsModule.tsx
+++ b/src/components/modules/downloads/DownloadsModule.tsx
@@ -136,8 +136,7 @@ export default function DownloadComponent() {
);
return (
-
- Your torrents
+
{rows.length > 0 ? (
diff --git a/src/components/modules/moduleWrapper.tsx b/src/components/modules/moduleWrapper.tsx
index 15a8df738..2d974e53b 100644
--- a/src/components/modules/moduleWrapper.tsx
+++ b/src/components/modules/moduleWrapper.tsx
@@ -1,4 +1,4 @@
-import { Button, Card, Group, Menu, Switch, TextInput, useMantineTheme } from '@mantine/core';
+import { Button, Card, Group, Menu, Switch, TextInput } from '@mantine/core';
import { useConfig } from '../../tools/state';
import { IModule } from './modules';
@@ -95,14 +95,32 @@ export function ModuleWrapper(props: any) {
const enabledModules = config.modules ?? {};
// Remove 'Module' from enabled modules titles
const isShown = enabledModules[module.title]?.enabled ?? false;
- const theme = useMantineTheme();
- const items: JSX.Element[] = getItems(module);
if (!isShown) {
return null;
}
return (
+
+
+
+ );
+}
+
+export function ModuleMenu(props: any) {
+ const { module, styles } = props;
+ const items: JSX.Element[] = getItems(module);
+ return (
+ <>
{module.options && (