Add a module enabler

Add module enabler in settings.
This loops over all the exported Modules in the components/modules folder and renders them. (Interpreted language magic/ metaclasses)
This commit is contained in:
Aj - Thomas
2022-05-10 20:33:11 +02:00
parent 1245f97e72
commit 2c461a6695
7 changed files with 57 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import { Settings as SettingsIcon } from 'tabler-icons-react';
import { useConfig } from '../../tools/state';
import { ColorSchemeSwitch } from '../ColorSchemeToggle/ColorSchemeSwitch';
import SaveConfigComponent from '../Config/SaveConfig';
import ModuleEnabler from './ModuleEnabler';
function SettingsMenu(props: any) {
const { config, setConfig } = useConfig();
@@ -63,6 +64,7 @@ function SettingsMenu(props: any) {
label="Enable search bar"
/>
</Group>
<ModuleEnabler />
<ColorSchemeSwitch />
<SaveConfigComponent />
<Text