diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a84bac79d22..ad88029a180 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,10 +14,3 @@ ### Screenshot _(if applicable)_ > If you've introduced any significant UI changes, please include a screenshot. - -### Code Quality Checklist _(Please complete)_ -- [ ] All changes are backwards compatible -- [ ] There are no (new) build warnings or errors -- [ ] _(If a new config option is added)_ Attribute is outlined in the schema and documented -- [ ] _(If a new dependency is added)_ Package is essential, and has been checked out for security or performance -- [ ] Bumps version, if new feature added diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml index 46c00e799b7..3a43a5ab6cd 100644 --- a/.github/workflows/docker_dev.yml +++ b/.github/workflows/docker_dev.yml @@ -16,7 +16,7 @@ on: workflow_dispatch: inputs: tags: - requierd: true + required: true description: 'Tags to deploy to' env: diff --git a/Dockerfile b/Dockerfile index 98fe3bdbea6..39faff15669 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ COPY /.next/standalone ./ COPY /.next/static ./.next/static EXPOSE 7575 ENV PORT 7575 +RUN apk add tzdata VOLUME /app/data/configs CMD ["node", "server.js"] diff --git a/README.md b/README.md index 7b5045425bb..72aa27cd17d 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,4 @@ SOFTWARE. Thank you for visiting! For more information read the wiki!

- - trackgit-views -

diff --git a/data/constants.ts b/data/constants.ts index 9151e0e49da..17a217ada4a 100644 --- a/data/constants.ts +++ b/data/constants.ts @@ -1,2 +1,2 @@ export const REPO_URL = 'ajnart/homarr'; -export const CURRENT_VERSION = 'v0.6.0'; +export const CURRENT_VERSION = 'v0.7.0'; diff --git a/package.json b/package.json index 94be675e0a8..622116f36bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homarr", - "version": "0.6.0", + "version": "0.7.0", "description": "Homarr - A homepage for your server.", "repository": { "type": "git", @@ -24,26 +24,27 @@ "ci": "yarn test && yarn lint --fix && yarn typecheck && yarn prettier:write" }, "dependencies": { - "@ctrl/deluge": "^4.0.0", + "@ctrl/deluge": "^4.1.0", "@ctrl/qbittorrent": "^4.0.0", "@ctrl/shared-torrent": "^4.1.0", + "@ctrl/transmission": "^4.1.1", "@dnd-kit/core": "^6.0.1", "@dnd-kit/sortable": "^7.0.0", "@dnd-kit/utilities": "^3.2.0", - "@mantine/core": "^4.2.6", - "@mantine/dates": "^4.2.6", - "@mantine/dropzone": "^4.2.6", - "@mantine/form": "^4.2.6", - "@mantine/hooks": "^4.2.6", - "@mantine/next": "^4.2.6", - "@mantine/notifications": "^4.2.6", - "@mantine/prism": "^4.2.6", + "@mantine/core": "^4.2.8", + "@mantine/dates": "^4.2.8", + "@mantine/dropzone": "^4.2.8", + "@mantine/form": "^4.2.8", + "@mantine/hooks": "^4.2.8", + "@mantine/next": "^4.2.8", + "@mantine/notifications": "^4.2.8", + "@mantine/prism": "^4.2.8", "@nivo/core": "^0.79.0", "@nivo/line": "^0.79.1", "@tabler/icons": "^1.68.0", "axios": "^0.27.2", "cookies-next": "^2.0.4", - "dayjs": "^1.11.2", + "dayjs": "^1.11.3", "framer-motion": "^6.3.1", "js-file-download": "^0.4.12", "next": "12.1.6", diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index c05d30e6894..be6034f6bf7 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -14,9 +14,10 @@ import { Text, } from '@mantine/core'; import { useForm } from '@mantine/form'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { IconApps as Apps } from '@tabler/icons'; import { v4 as uuidv4 } from 'uuid'; +import { useDebouncedValue } from '@mantine/hooks'; import { useConfig } from '../../tools/state'; import { ServiceTypeList } from '../../tools/types'; @@ -64,7 +65,7 @@ function MatchIcon(name: string, form: any) { } function MatchService(name: string, form: any) { - const service = ServiceTypeList.find((s) => s === name); + const service = ServiceTypeList.find((s) => s.toLowerCase() === name.toLowerCase()); if (service) { form.setFieldValue('type', service); } @@ -72,16 +73,16 @@ function MatchService(name: string, form: any) { function MatchPort(name: string, form: any) { const portmap = [ - { name: 'qBittorrent', value: '8080' }, - { name: 'Sonarr', value: '8989' }, - { name: 'Radarr', value: '7878' }, - { name: 'Lidarr', value: '8686' }, - { name: 'Readarr', value: '8686' }, - { name: 'Deluge', value: '8112' }, - { name: 'Transmission', value: '9091' }, + { name: 'qbittorrent', value: '8080' }, + { name: 'sonarr', value: '8989' }, + { name: 'radarr', value: '7878' }, + { name: 'lidarr', value: '8686' }, + { name: 'readarr', value: '8686' }, + { name: 'deluge', value: '8112' }, + { name: 'transmission', value: '9091' }, ]; // Match name with portmap key - const port = portmap.find((p) => p.name === name); + const port = portmap.find((p) => p.name === name.toLowerCase()); if (port) { form.setFieldValue('url', `http://localhost:${port.value}`); } @@ -111,6 +112,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & apiKey: props.apiKey ?? (undefined as unknown as string), username: props.username ?? (undefined as unknown as string), password: props.password ?? (undefined as unknown as string), + openedUrl: props.openedUrl ?? (undefined as unknown as string), }, validate: { apiKey: () => null, @@ -134,6 +136,14 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & }, }); + const [debounced, cancel] = useDebouncedValue(form.values.name, 250); + useEffect(() => { + if (form.values.name !== debounced || props.name || props.type) return; + MatchIcon(form.values.name, form); + MatchService(form.values.name, form); + MatchPort(form.values.name, form); + }, [debounced]); + // Try to set const hostname to new URL(form.values.url).hostname) // If it fails, set it to the form.values.url let hostname = form.values.url; @@ -186,28 +196,26 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & required label="Service name" placeholder="Plex" - value={form.values.name} - onChange={(event) => { - form.setFieldValue('name', event.currentTarget.value); - MatchIcon(event.currentTarget.value, form); - MatchService(event.currentTarget.value, form); - MatchPort(event.currentTarget.value, form); - }} - error={form.errors.name && 'Invalid icon url'} + {...form.getInputProps('name')} /> +