Skip to content

Commit 702428d

Browse files
authored
🚀 v0.8.2 🐋 Docker fixes and quality of life changes
v0.8.0...v0.8.2
2 parents ce0f27b + c8b0e70 commit 702428d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1961
-1471
lines changed

.github/ISSUE_TEMPLATE/feature-request.yml

-10
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,3 @@ body:
2222
- High (App breaking feature)
2323
validations:
2424
required: true
25-
- type: checkboxes
26-
id: idiot-check
27-
attributes:
28-
label: Please tick the boxes
29-
description: Before submitting, please ensure that
30-
options:
31-
- label: You've read the [docs](https://github.com/ajnart/homarr#readme)
32-
required: true
33-
- label: You've checked for [duplicate issues](https://github.com/ajnart/homarr/issues)
34-
required: true

.vscode/launch.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Next.js: debug server-side",
6+
"type": "node-terminal",
7+
"request": "launch",
8+
"command": "yarn dev"
9+
},
10+
{
11+
"name": "Next.js: debug client-side",
12+
"type": "chrome",
13+
"request": "launch",
14+
"url": "http://localhost:3000"
15+
},
16+
{
17+
"name": "Next.js: debug full stack",
18+
"type": "node-terminal",
19+
"request": "launch",
20+
"command": "yarn dev",
21+
"serverReadyAction": {
22+
"pattern": "started server on .+, url: (https?://.+)",
23+
"uriFormat": "%s",
24+
"action": "debugWithChrome"
25+
}
26+
}
27+
]
28+
}

data/configs/default.json

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
},
1919
"Date": {
2020
"enabled": false
21+
},
22+
"Docker": {
23+
"enabled": true
2124
}
2225
}
2326
}

data/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const REPO_URL = 'ajnart/homarr';
2-
export const CURRENT_VERSION = 'v0.8.0';
2+
export const CURRENT_VERSION = 'v0.8.2';

next.config.js

-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
66

77
module.exports = withBundleAnalyzer({
88
reactStrictMode: false,
9-
eslint: {
10-
ignoreDuringBuilds: true,
11-
},
129
output: 'standalone',
13-
basePath: env.BASE_URL,
1410
});

package.json

+46-46
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "homarr",
3-
"version": "0.8.0",
3+
"version": "0.8.2",
44
"description": "Homarr - A homepage for your server.",
55
"repository": {
66
"type": "git",
@@ -25,66 +25,66 @@
2525
},
2626
"dependencies": {
2727
"@ctrl/deluge": "^4.1.0",
28-
"@ctrl/qbittorrent": "^4.0.0",
29-
"@ctrl/shared-torrent": "^4.1.0",
28+
"@ctrl/qbittorrent": "^4.1.0",
29+
"@ctrl/shared-torrent": "^4.1.1",
3030
"@ctrl/transmission": "^4.1.1",
31-
"@dnd-kit/core": "^6.0.1",
32-
"@dnd-kit/sortable": "^7.0.0",
31+
"@dnd-kit/core": "^6.0.5",
32+
"@dnd-kit/sortable": "^7.0.1",
3333
"@dnd-kit/utilities": "^3.2.0",
34-
"@mantine/core": "^4.2.8",
35-
"@mantine/dates": "^4.2.8",
36-
"@mantine/dropzone": "^4.2.8",
37-
"@mantine/form": "^4.2.8",
38-
"@mantine/hooks": "^4.2.8",
39-
"@mantine/next": "^4.2.8",
40-
"@mantine/notifications": "^4.2.8",
41-
"@mantine/prism": "^4.2.8",
34+
"@mantine/core": "^4.2.12",
35+
"@mantine/dates": "^4.2.12",
36+
"@mantine/dropzone": "^4.2.12",
37+
"@mantine/form": "^4.2.12",
38+
"@mantine/hooks": "^4.2.12",
39+
"@mantine/next": "^4.2.12",
40+
"@mantine/notifications": "^4.2.12",
41+
"@mantine/prism": "^4.2.12",
4242
"@nivo/core": "^0.79.0",
4343
"@nivo/line": "^0.79.1",
44-
"@tabler/icons": "^1.68.0",
44+
"@tabler/icons": "^1.76.0",
45+
"add": "^2.0.6",
4546
"axios": "^0.27.2",
4647
"cookies-next": "^2.1.1",
47-
"dayjs": "^1.11.3",
48+
"dayjs": "^1.11.4",
4849
"dockerode": "^3.3.2",
49-
"framer-motion": "^6.3.1",
50+
"framer-motion": "^6.5.1",
5051
"js-file-download": "^0.4.12",
51-
"next": "^12.2.0",
52-
"prism-react-renderer": "^1.3.1",
53-
"react": "^17.0.1",
54-
"react-dom": "^17.0.1",
55-
"systeminformation": "^5.11.16",
56-
"uuid": "^8.3.2"
52+
"next": "^12.2.3",
53+
"prism-react-renderer": "^1.3.5",
54+
"react": "^18.2.0",
55+
"react-dom": "^18.2.0",
56+
"systeminformation": "^5.12.1",
57+
"uuid": "^8.3.2",
58+
"yarn": "^1.22.19"
5759
},
5860
"devDependencies": {
59-
"@babel/core": "^7.17.8",
60-
"@next/bundle-analyzer": "^12.2.0",
61-
"@next/eslint-plugin-next": "^12.2.0",
62-
"@storybook/react": "^6.5.4",
61+
"@babel/core": "^7.18.9",
62+
"@next/bundle-analyzer": "^12.2.3",
63+
"@next/eslint-plugin-next": "^12.2.3",
64+
"@storybook/react": "^6.5.9",
6365
"@types/dockerode": "^3.3.9",
64-
"@types/node": "^17.0.23",
65-
"@types/react": "17.0.43",
66+
"@types/node": "^18.0.6",
67+
"@types/react": "^18.0.15",
6668
"@types/uuid": "^8.3.4",
67-
"@typescript-eslint/eslint-plugin": "^5.16.0",
68-
"@typescript-eslint/parser": "^5.16.0",
69-
"eslint": "^8.11.0",
69+
"@typescript-eslint/eslint-plugin": "^5.30.7",
70+
"@typescript-eslint/parser": "^5.30.7",
71+
"eslint": "^8.20.0",
7072
"eslint-config-airbnb": "^19.0.4",
71-
"eslint-config-airbnb-typescript": "^16.1.0",
72-
"eslint-config-mantine": "1.1.0",
73-
"eslint-plugin-import": "^2.25.4",
74-
"eslint-plugin-jest": "^26.1.3",
75-
"eslint-plugin-jsx-a11y": "^6.5.1",
76-
"eslint-plugin-react": "^7.29.4",
77-
"eslint-plugin-react-hooks": "^4.3.0",
78-
"eslint-plugin-storybook": "^0.5.11",
79-
"eslint-plugin-testing-library": "^5.2.0",
73+
"eslint-config-airbnb-typescript": "^17.0.0",
74+
"eslint-config-mantine": "^2.0.0",
75+
"eslint-plugin-import": "^2.26.0",
76+
"eslint-plugin-jest": "^26.6.0",
77+
"eslint-plugin-jsx-a11y": "^6.6.1",
78+
"eslint-plugin-react": "^7.30.1",
79+
"eslint-plugin-react-hooks": "^4.6.0",
80+
"eslint-plugin-storybook": "^0.6.1",
81+
"eslint-plugin-testing-library": "^5.5.1",
8082
"eslint-plugin-unused-imports": "^2.0.0",
81-
"jest": "^28.1.0",
82-
"prettier": "^2.6.2",
83+
"jest": "^28.1.3",
84+
"prettier": "^2.7.1",
8385
"require-from-string": "^2.0.2",
84-
"typescript": "4.6.4"
85-
},
86-
"resolutions": {
87-
"@types/react": "17.0.30"
86+
"typescript": "^4.7.4",
87+
"yarn-upgrade-all": "^0.7.1"
8888
},
8989
"packageManager": "[email protected]"
9090
}

src/components/AppShelf/AddAppShelfItem.tsx

+4-22
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
Select,
1313
Switch,
1414
Tabs,
15-
Text,
1615
TextInput,
1716
Title,
1817
Tooltip,
@@ -23,7 +22,7 @@ import { IconApps as Apps } from '@tabler/icons';
2322
import { useEffect, useState } from 'react';
2423
import { v4 as uuidv4 } from 'uuid';
2524
import { useConfig } from '../../tools/state';
26-
import { ServiceTypeList, StatusCodes } from '../../tools/types';
25+
import { tryMatchPort, ServiceTypeList, StatusCodes } from '../../tools/types';
2726
import Tip from '../layout/Tip';
2827

2928
export function AddItemShelfButton(props: any) {
@@ -55,7 +54,8 @@ export function AddItemShelfButton(props: any) {
5554
);
5655
}
5756

58-
function MatchIcon(name: string, form: any) {
57+
function MatchIcon(name: string | undefined, form: any) {
58+
if (name === undefined || name === '') return null;
5959
fetch(
6060
`https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name
6161
.replace(/\s+/g, '-')
@@ -77,24 +77,6 @@ function MatchService(name: string, form: any) {
7777
}
7878
}
7979

80-
function MatchPort(name: string, form: any) {
81-
const portmap = [
82-
{ name: 'qbittorrent', value: '8080' },
83-
{ name: 'sonarr', value: '8989' },
84-
{ name: 'radarr', value: '7878' },
85-
{ name: 'lidarr', value: '8686' },
86-
{ name: 'readarr', value: '8787' },
87-
{ name: 'deluge', value: '8112' },
88-
{ name: 'transmission', value: '9091' },
89-
{ name: 'dash.', value: '3001' },
90-
];
91-
// Match name with portmap key
92-
const port = portmap.find((p) => p.name === name.toLowerCase());
93-
if (port) {
94-
form.setFieldValue('url', `http://localhost:${port.value}`);
95-
}
96-
}
97-
9880
const DEFAULT_ICON = '/favicon.svg';
9981

10082
export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & any) {
@@ -154,7 +136,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
154136
if (form.values.name !== debounced || form.values.icon !== DEFAULT_ICON) return;
155137
MatchIcon(form.values.name, form);
156138
MatchService(form.values.name, form);
157-
MatchPort(form.values.name, form);
139+
tryMatchPort(form.values.name, form);
158140
}, [debounced]);
159141

160142
// Try to set const hostname to new URL(form.values.url).hostname)

src/components/AppShelf/AppShelf.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,21 @@ const AppShelf = (props: any) => {
178178
</Accordion.Item>
179179
) : null}
180180
{downloadEnabled ? (
181-
<Accordion.Item key="Downloads" label="Your downloads">
182-
<Paper
183-
p="lg"
184-
radius="lg"
185-
style={{
186-
background: `rgba(${colorScheme === 'dark' ? '37, 38, 43,' : '255, 255, 255,'} \
181+
<Accordion.Item key="Downloads" label="Your downloads">
182+
<Paper
183+
p="lg"
184+
radius="lg"
185+
style={{
186+
background: `rgba(${colorScheme === 'dark' ? '37, 38, 43,' : '255, 255, 255,'} \
187187
${(config.settings.appOpacity || 100) / 100}`,
188-
borderColor: `rgba(${colorScheme === 'dark' ? '37, 38, 43,' : '233, 236, 239,'} \
188+
borderColor: `rgba(${colorScheme === 'dark' ? '37, 38, 43,' : '233, 236, 239,'} \
189189
${(config.settings.appOpacity || 100) / 100}`,
190-
}}
191-
>
192-
<ModuleMenu module={DownloadsModule} />
193-
<DownloadComponent />
194-
</Paper>
195-
</Accordion.Item>
190+
}}
191+
>
192+
<ModuleMenu module={DownloadsModule} />
193+
<DownloadComponent />
194+
</Paper>
195+
</Accordion.Item>
196196
) : null}
197197
</Accordion>
198198
</Group>

src/components/Config/ConfigChanger.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Center, Loader, Select, Tooltip } from '@mantine/core';
2-
import { setCookies } from 'cookies-next';
2+
import { setCookie } from 'cookies-next';
33
import { useEffect, useState } from 'react';
44
import { useConfig } from '../../tools/state';
55

@@ -26,7 +26,7 @@ export default function ConfigChanger() {
2626
label="Config loader"
2727
onChange={(e) => {
2828
loadConfig(e ?? 'default');
29-
setCookies('config-name', e ?? 'default', {
29+
setCookie('config-name', e ?? 'default', {
3030
maxAge: 60 * 60 * 24 * 30,
3131
sameSite: 'strict',
3232
});

src/components/Config/LoadConfig.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { DropzoneStatus, FullScreenDropzone } from '@mantine/dropzone';
1010
import { showNotification } from '@mantine/notifications';
1111
import { useRef } from 'react';
1212
import { useRouter } from 'next/router';
13-
import { setCookies } from 'cookies-next';
13+
import { setCookie } from 'cookies-next';
1414
import { useConfig } from '../../tools/state';
1515
import { Config } from '../../tools/types';
1616
import { migrateToIdConfig } from '../../tools/migrate';
@@ -90,7 +90,7 @@ export default function LoadConfigComponent(props: any) {
9090
icon: <Check />,
9191
message: undefined,
9292
});
93-
setCookies('config-name', newConfig.name, {
93+
setCookie('config-name', newConfig.name, {
9494
maxAge: 60 * 60 * 24 * 30,
9595
sameSite: 'strict',
9696
});

0 commit comments

Comments
 (0)