diff --git a/README.md b/README.md index 5a45f1438..1cdf298a9 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,14 @@ _Requirements_: - [Docker](https://docs.docker.com/get-docker/) **Standard Docker Install** -```sh -docker run --name homarr --restart unless-stopped -p 7575:7575 -v /data/docker/homarr:/app/data/configs -d ghcr.io/ajnart/homarr:latest +```bash +docker run \ + --name homarr \ + --restart unless-stopped \ + -p 7575:7575 \ + -v ./homarr/configs:/app/data/configs \ + -v ./homarr/icons:/app/public/icons \ + -d ghcr.io/ajnart/homarr:latest ``` **Docker Compose** @@ -116,7 +122,8 @@ services: image: ghcr.io/ajnart/homarr:latest restart: unless-stopped volumes: - - /data/docker/homarr:/app/data/configs + - ./homarr/configs:/app/data/configs + - ./homarr/icons:/app/public/icons ports: - '7575:7575' ``` diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 000000000..eabc088db --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,3 @@ +files: + - source: /public/locales/en/*.json + translation: /public/locales/%two_letters_code%/%original_file_name%.json diff --git a/data/configs/default.json b/data/configs/default.json index 8f606710e..ba6a91144 100644 --- a/data/configs/default.json +++ b/data/configs/default.json @@ -10,6 +10,14 @@ } ], "settings": { - "searchUrl": "https://bing.com/search?q=" + "searchUrl": "https://google.com/search?q=" + }, + "modules": { + "Search Bar": { + "enabled": true + }, + "Date": { + "enabled": false + } } } \ No newline at end of file diff --git a/data/constants.ts b/data/constants.ts index 0e475f1c6..5b60573c6 100644 --- a/data/constants.ts +++ b/data/constants.ts @@ -1,2 +1,2 @@ export const REPO_URL = 'ajnart/homarr'; -export const CURRENT_VERSION = 'v0.5.1'; +export const CURRENT_VERSION = 'v0.5.2'; diff --git a/package.json b/package.json index 203aa805d..cb3609e7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homarr", - "version": "0.5.1", + "version": "0.5.2", "private": "false", "description": "Homarr - A homepage for your server.", "repository": { @@ -25,8 +25,10 @@ "ci": "yarn test && yarn lint --fix && yarn typecheck && yarn prettier:write" }, "dependencies": { - "@dnd-kit/core": "^6.0.1", - "@dnd-kit/sortable": "^7.0.0", + "@ctrl/deluge": "^4.0.0", + "@ctrl/qbittorrent": "^4.0.0", + "@dnd-kit/core": "^6.0.1", + "@dnd-kit/sortable": "^7.0.0", "@mantine/core": "^4.2.6", "@mantine/dates": "^4.2.6", "@mantine/dropzone": "^4.2.6", diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index 871e45f05..2ac5805f2 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -74,6 +74,8 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & icon: props.icon ?? '/favicon.svg', url: props.url ?? '', apiKey: props.apiKey ?? (undefined as unknown as string), + username: props.username ?? (undefined as unknown as string), + password: props.password ?? (undefined as unknown as string), }, validate: { apiKey: () => null, @@ -188,6 +190,44 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & error={form.errors.apiKey && 'Invalid API key'} /> )} + {form.values.type === 'qBittorrent' && ( + <> + { + form.setFieldValue('username', event.currentTarget.value); + }} + error={form.errors.username && 'Invalid username'} + /> + { + form.setFieldValue('password', event.currentTarget.value); + }} + error={form.errors.password && 'Invalid password'} + /> + + )} + {form.values.type === 'Deluge' && ( + <> + { + form.setFieldValue('password', event.currentTarget.value); + }} + error={form.errors.password && 'Invalid password'} + /> + + )} diff --git a/src/components/AppShelf/AppShelfMenu.tsx b/src/components/AppShelf/AppShelfMenu.tsx index 0a491796d..03eb6ca71 100644 --- a/src/components/AppShelf/AppShelfMenu.tsx +++ b/src/components/AppShelf/AppShelfMenu.tsx @@ -3,10 +3,11 @@ import { showNotification } from '@mantine/notifications'; import { useState } from 'react'; import { Check, Edit, Trash } from 'tabler-icons-react'; import { useConfig } from '../../tools/state'; +import { serviceItem } from '../../tools/types'; import { AddAppShelfItemForm } from './AddAppShelfItem'; export default function AppShelfMenu(props: any) { - const { service } = props; + const { service }: { service: serviceItem } = props; const { config, setConfig } = useConfig(); const theme = useMantineTheme(); const [opened, setOpened] = useState(false); @@ -27,6 +28,8 @@ export default function AppShelfMenu(props: any) { url={service.url} icon={service.icon} apiKey={service.apiKey} + username={service.username} + password={service.password} message="Save service" /> diff --git a/src/components/Config/ConfigChanger.tsx b/src/components/Config/ConfigChanger.tsx index 8d4be4db8..5b8836803 100644 --- a/src/components/Config/ConfigChanger.tsx +++ b/src/components/Config/ConfigChanger.tsx @@ -9,7 +9,7 @@ export default function ConfigChanger() { useEffect(() => { getConfigs().then((configs) => setConfigList(configs)); // setConfig(initialConfig); - }, [config.name]); + }, [config]); // If configlist is empty, return a loading indicator if (configList.length === 0) { return ( diff --git a/src/components/Config/SaveConfig.tsx b/src/components/Config/SaveConfig.tsx index a0b7997e7..4d4835684 100644 --- a/src/components/Config/SaveConfig.tsx +++ b/src/components/Config/SaveConfig.tsx @@ -44,7 +44,6 @@ export default function SaveConfigComponent(props: any) { > (''); - return ( -