mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 07:55:52 +01:00
Quick FIX
This commit is contained in:
@@ -18,6 +18,7 @@ import { SortableAppShelfItem, AppShelfItem } from './AppShelfItem';
|
|||||||
import { ModuleMenu, ModuleWrapper } from '../../modules/moduleWrapper';
|
import { ModuleMenu, ModuleWrapper } from '../../modules/moduleWrapper';
|
||||||
import { UsenetModule, TorrentsModule } from '../../modules';
|
import { UsenetModule, TorrentsModule } from '../../modules';
|
||||||
import TorrentsComponent from '../../modules/torrents/TorrentsModule';
|
import TorrentsComponent from '../../modules/torrents/TorrentsModule';
|
||||||
|
import UsenetComponent from '../../modules/usenet/UsenetModule';
|
||||||
|
|
||||||
const AppShelf = (props: any) => {
|
const AppShelf = (props: any) => {
|
||||||
const { config, setConfig } = useConfig();
|
const { config, setConfig } = useConfig();
|
||||||
@@ -126,7 +127,11 @@ 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?.[TorrentsModule.id]?.enabled ?? false;
|
|
||||||
|
const usenetEnabled = config.modules?.[TorrentsModule.id]?.enabled ?? false;
|
||||||
|
const torrentEnabled = config.modules?.[UsenetModule.id]?.enabled ?? false;
|
||||||
|
|
||||||
|
const downloadEnabled = usenetEnabled || torrentEnabled;
|
||||||
// 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 (
|
||||||
// TODO: Style accordion so that the bar is transparent to the user settings
|
// TODO: Style accordion so that the bar is transparent to the user settings
|
||||||
@@ -170,8 +175,18 @@ const AppShelf = (props: any) => {
|
|||||||
${(config.settings.appOpacity || 100) / 100}`,
|
${(config.settings.appOpacity || 100) / 100}`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{torrentEnabled && (
|
||||||
|
<>
|
||||||
<ModuleMenu module={TorrentsModule} />
|
<ModuleMenu module={TorrentsModule} />
|
||||||
<TorrentsComponent />
|
<TorrentsComponent />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{usenetEnabled && (
|
||||||
|
<>
|
||||||
|
<ModuleMenu module={UsenetModule} />
|
||||||
|
<UsenetComponent />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Paper>
|
</Paper>
|
||||||
</Accordion.Panel>
|
</Accordion.Panel>
|
||||||
</Accordion.Item>
|
</Accordion.Item>
|
||||||
|
|||||||
Reference in New Issue
Block a user