mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 06:55:51 +01:00
� Module styling
This commit is contained in:
@@ -1,12 +1,26 @@
|
|||||||
{
|
{
|
||||||
"name": "config",
|
"name": "config",
|
||||||
"services": [],
|
"services": [
|
||||||
|
{
|
||||||
|
"type": "Other",
|
||||||
|
"name": "YouTube",
|
||||||
|
"icon": "https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/youtube.png",
|
||||||
|
"url": "https://youtube.com/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Other",
|
||||||
|
"name": "YouTube ",
|
||||||
|
"icon": "https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/youtube.png",
|
||||||
|
"url": "https://youtube.com/"
|
||||||
|
}
|
||||||
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"searchBar": true,
|
"searchBar": true,
|
||||||
"searchUrl": "https://duckduckgo.com/?q=",
|
"searchUrl": "Custom",
|
||||||
"enabledModules": [
|
"enabledModules": [
|
||||||
"Date",
|
"Date",
|
||||||
"Calendar"
|
"Calendar",
|
||||||
|
"Weather"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import { useConfig } from '../../tools/state';
|
|||||||
import { serviceItem } from '../../tools/types';
|
import { serviceItem } from '../../tools/types';
|
||||||
import AppShelfMenu from './AppShelfMenu';
|
import AppShelfMenu from './AppShelfMenu';
|
||||||
|
|
||||||
const AppShelf = () => {
|
const AppShelf = (props: any) => {
|
||||||
const { config } = useConfig();
|
const { config } = useConfig();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export default function SearchBar(props: any) {
|
|||||||
target={
|
target={
|
||||||
<Group direction="row">
|
<Group direction="row">
|
||||||
<TextInput
|
<TextInput
|
||||||
|
width={'100%'}
|
||||||
variant="filled"
|
variant="filled"
|
||||||
icon={icon}
|
icon={icon}
|
||||||
ref={textInput}
|
ref={textInput}
|
||||||
|
|||||||
@@ -13,16 +13,7 @@ export default function ModuleWrapper(props: any) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card hidden={!isShown} mx="sm" withBorder radius="lg" shadow="sm">
|
||||||
hidden={!isShown}
|
|
||||||
mx="sm"
|
|
||||||
radius="lg"
|
|
||||||
shadow="sm"
|
|
||||||
style={{
|
|
||||||
// Make background color of the card depend on the theme
|
|
||||||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : 'white',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<module.component />
|
<module.component />
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import fs from 'fs';
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import AppShelf from '../components/AppShelf/AppShelf';
|
import AppShelf from '../components/AppShelf/AppShelf';
|
||||||
import LoadConfigComponent from '../components/Config/LoadConfig';
|
import LoadConfigComponent from '../components/Config/LoadConfig';
|
||||||
|
import SearchBar from '../components/SearchBar/SearchBar';
|
||||||
import { Config } from '../tools/types';
|
import { Config } from '../tools/types';
|
||||||
import { useConfig } from '../tools/state';
|
import { useConfig } from '../tools/state';
|
||||||
|
|
||||||
@@ -53,9 +54,7 @@ export default function HomePage(props: any) {
|
|||||||
}, [initialConfig]);
|
}, [initialConfig]);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Group align="start" position="apart" noWrap>
|
|
||||||
<AppShelf />
|
<AppShelf />
|
||||||
</Group>
|
|
||||||
<LoadConfigComponent />
|
<LoadConfigComponent />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user