mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
💄 Lint + Prettier
This commit is contained in:
@@ -36,7 +36,9 @@ export const LoadConfigComponent = () => {
|
|||||||
let newConfig: ConfigType = JSON.parse(fileText);
|
let newConfig: ConfigType = JSON.parse(fileText);
|
||||||
|
|
||||||
if (!newConfig.schemaVersion) {
|
if (!newConfig.schemaVersion) {
|
||||||
console.warn('a legacy configuration schema was deteced and migrated to the current schema');
|
console.warn(
|
||||||
|
'a legacy configuration schema was deteced and migrated to the current schema'
|
||||||
|
);
|
||||||
const oldConfig = JSON.parse(fileText) as Config;
|
const oldConfig = JSON.parse(fileText) as Config;
|
||||||
newConfig = migrateConfig(oldConfig);
|
newConfig = migrateConfig(oldConfig);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
Badge,
|
Badge,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { IconLock, TablerIcon } from '@tabler/icons';
|
import { TablerIcon } from '@tabler/icons';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { AppIntegrationPropertyAccessabilityType } from '../../../../../../../../types/app';
|
import { AppIntegrationPropertyAccessabilityType } from '../../../../../../../../types/app';
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ export const initializeGridstack = (
|
|||||||
) => {
|
) => {
|
||||||
if (!wrapperRef.current) return;
|
if (!wrapperRef.current) return;
|
||||||
// calculates the currently available count of columns
|
// calculates the currently available count of columns
|
||||||
const columnCount = areaType === 'sidebar' ? 1 : isLargerThanSm || typeof isLargerThanSm === 'undefined' ? 12 : 6;
|
const columnCount =
|
||||||
|
areaType === 'sidebar' ? 1 : isLargerThanSm || typeof isLargerThanSm === 'undefined' ? 12 : 6;
|
||||||
const minRow = areaType !== 'sidebar' ? 1 : Math.floor(wrapperRef.current.offsetHeight / 64);
|
const minRow = areaType !== 'sidebar' ? 1 : Math.floor(wrapperRef.current.offsetHeight / 64);
|
||||||
// initialize gridstack
|
// initialize gridstack
|
||||||
const newGrid = gridRef;
|
const newGrid = gridRef;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ScrollArea, Space, Stack, Text } from '@mantine/core';
|
import { ScrollArea, Space, Stack, Text } from '@mantine/core';
|
||||||
import { useElementSize, useViewportSize } from '@mantine/hooks';
|
import { useViewportSize } from '@mantine/hooks';
|
||||||
import { useConfigContext } from '../../../config/provider';
|
import { useConfigContext } from '../../../config/provider';
|
||||||
import ConfigChanger from '../../Config/ConfigChanger';
|
import ConfigChanger from '../../Config/ConfigChanger';
|
||||||
import ConfigActions from './Config/ConfigActions';
|
import ConfigActions from './Config/ConfigActions';
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
import { Group, ActionIcon, Anchor, Text } from '@mantine/core';
|
import { Group, Anchor, Text } from '@mantine/core';
|
||||||
import { IconBrandDiscord, IconBrandGithub } from '@tabler/icons';
|
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
|
|
||||||
import { CURRENT_VERSION } from '../../../../data/constants';
|
|
||||||
|
|
||||||
export default function Credits() {
|
export default function Credits() {
|
||||||
const { t } = useTranslation('settings/common');
|
const { t } = useTranslation('settings/common');
|
||||||
|
|
||||||
@@ -22,8 +19,8 @@ export default function Credits() {
|
|||||||
style={{ color: 'inherit', fontStyle: 'inherit', fontSize: 'inherit' }}
|
style={{ color: 'inherit', fontStyle: 'inherit', fontSize: 'inherit' }}
|
||||||
>
|
>
|
||||||
ajnart
|
ajnart
|
||||||
</Anchor>
|
</Anchor>{' '}
|
||||||
{' '}and you !
|
and you !
|
||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, ScrollArea, Stack } from '@mantine/core';
|
import { ScrollArea, Stack } from '@mantine/core';
|
||||||
import { useViewportSize } from '@mantine/hooks';
|
import { useViewportSize } from '@mantine/hooks';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { useConfigContext } from '../../../config/provider';
|
import { useConfigContext } from '../../../config/provider';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Drawer, ScrollArea, Tabs, Title } from '@mantine/core';
|
import { Drawer, Tabs, Title } from '@mantine/core';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { useConfigContext } from '../../config/provider';
|
import { useConfigContext } from '../../config/provider';
|
||||||
import { useConfigStore } from '../../config/store';
|
import { useConfigStore } from '../../config/store';
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ interface UseConfigStoreType {
|
|||||||
addConfig: (
|
addConfig: (
|
||||||
name: string,
|
name: string,
|
||||||
config: ConfigType,
|
config: ConfigType,
|
||||||
shouldSaveConfigToFileSystem: boolean,
|
shouldSaveConfigToFileSystem: boolean
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
updateConfig: (
|
updateConfig: (
|
||||||
name: string,
|
name: string,
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { useMutation, useQuery } from '@tanstack/react-query';
|
import { useMutation, useQuery } from '@tanstack/react-query';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Results } from 'sabnzbd-api';
|
import { Results } from 'sabnzbd-api';
|
||||||
import { UsenetQueueRequestParams, UsenetQueueResponse } from '../../../pages/api/modules/usenet/queue';
|
import {
|
||||||
|
UsenetQueueRequestParams,
|
||||||
|
UsenetQueueResponse,
|
||||||
|
} from '../../../pages/api/modules/usenet/queue';
|
||||||
import {
|
import {
|
||||||
UsenetHistoryRequestParams,
|
UsenetHistoryRequestParams,
|
||||||
UsenetHistoryResponse,
|
UsenetHistoryResponse,
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
);
|
);
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
delugeApp.map((app) => {
|
delugeApp.map((app) => {
|
||||||
const password = app.integration?.properties.find((x) => x.field === 'password')?.value ?? undefined;
|
const password =
|
||||||
|
app.integration?.properties.find((x) => x.field === 'password')?.value ?? undefined;
|
||||||
const test = new Deluge({
|
const test = new Deluge({
|
||||||
baseUrl: app.url,
|
baseUrl: app.url,
|
||||||
password,
|
password,
|
||||||
|
|||||||
@@ -5,6 +5,4 @@ import { IWidgetDefinition } from './widgets';
|
|||||||
// The options of IWidgetDefinition are so heavily typed that it even used 'true' as type
|
// The options of IWidgetDefinition are so heavily typed that it even used 'true' as type
|
||||||
export const defineWidget = <TKey extends string, TOptions extends IWidgetDefinition<TKey>>(
|
export const defineWidget = <TKey extends string, TOptions extends IWidgetDefinition<TKey>>(
|
||||||
options: TOptions
|
options: TOptions
|
||||||
) => {
|
) => options;
|
||||||
return options;
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user