mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
🐛 Fix a bug where download module was always there
This commit is contained in:
@@ -152,6 +152,7 @@ const AppShelf = (props: any) => {
|
|||||||
const noCategory = config.services.filter(
|
const noCategory = config.services.filter(
|
||||||
(e) => e.category === undefined || e.category === null
|
(e) => e.category === undefined || e.category === null
|
||||||
);
|
);
|
||||||
|
const downloadEnabled = config.modules?.[DownloadsModule.title]?.enabled ?? false;
|
||||||
// Create an item with 0: true, 1: true, 2: true... For each category
|
// Create an item with 0: true, 1: true, 2: true... For each category
|
||||||
return (
|
return (
|
||||||
// Return one item for each category
|
// Return one item for each category
|
||||||
@@ -176,6 +177,7 @@ const AppShelf = (props: any) => {
|
|||||||
{item()}
|
{item()}
|
||||||
</Accordion.Item>
|
</Accordion.Item>
|
||||||
) : null}
|
) : null}
|
||||||
|
{downloadEnabled ? (
|
||||||
<Accordion.Item key="Downloads" label="Your downloads">
|
<Accordion.Item key="Downloads" label="Your downloads">
|
||||||
<Paper
|
<Paper
|
||||||
p="lg"
|
p="lg"
|
||||||
@@ -191,6 +193,7 @@ const AppShelf = (props: any) => {
|
|||||||
<DownloadComponent />
|
<DownloadComponent />
|
||||||
</Paper>
|
</Paper>
|
||||||
</Accordion.Item>
|
</Accordion.Item>
|
||||||
|
) : null}
|
||||||
</Accordion>
|
</Accordion>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user