mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
💄 Lint + Prettier
This commit is contained in:
@@ -36,7 +36,9 @@ export const LoadConfigComponent = () => {
|
||||
let newConfig: ConfigType = JSON.parse(fileText);
|
||||
|
||||
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;
|
||||
newConfig = migrateConfig(oldConfig);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Badge,
|
||||
Tooltip,
|
||||
} from '@mantine/core';
|
||||
import { IconLock, TablerIcon } from '@tabler/icons';
|
||||
import { TablerIcon } from '@tabler/icons';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useState } from 'react';
|
||||
import { AppIntegrationPropertyAccessabilityType } from '../../../../../../../../types/app';
|
||||
|
||||
@@ -20,7 +20,8 @@ export const initializeGridstack = (
|
||||
) => {
|
||||
if (!wrapperRef.current) return;
|
||||
// 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);
|
||||
// initialize gridstack
|
||||
const newGrid = gridRef;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 ConfigChanger from '../../Config/ConfigChanger';
|
||||
import ConfigActions from './Config/ConfigActions';
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { Group, ActionIcon, Anchor, Text } from '@mantine/core';
|
||||
import { IconBrandDiscord, IconBrandGithub } from '@tabler/icons';
|
||||
import { Group, Anchor, Text } from '@mantine/core';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
import { CURRENT_VERSION } from '../../../../data/constants';
|
||||
|
||||
export default function Credits() {
|
||||
const { t } = useTranslation('settings/common');
|
||||
|
||||
@@ -22,8 +19,8 @@ export default function Credits() {
|
||||
style={{ color: 'inherit', fontStyle: 'inherit', fontSize: 'inherit' }}
|
||||
>
|
||||
ajnart
|
||||
</Anchor>
|
||||
{' '}and you !
|
||||
</Anchor>{' '}
|
||||
and you !
|
||||
</Text>
|
||||
</Group>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, ScrollArea, Stack } from '@mantine/core';
|
||||
import { ScrollArea, Stack } from '@mantine/core';
|
||||
import { useViewportSize } from '@mantine/hooks';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
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 { useConfigContext } from '../../config/provider';
|
||||
import { useConfigStore } from '../../config/store';
|
||||
|
||||
@@ -70,7 +70,7 @@ interface UseConfigStoreType {
|
||||
addConfig: (
|
||||
name: string,
|
||||
config: ConfigType,
|
||||
shouldSaveConfigToFileSystem: boolean,
|
||||
shouldSaveConfigToFileSystem: boolean
|
||||
) => Promise<void>;
|
||||
updateConfig: (
|
||||
name: string,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { useMutation, useQuery } from '@tanstack/react-query';
|
||||
import axios from 'axios';
|
||||
import { Results } from 'sabnzbd-api';
|
||||
import { UsenetQueueRequestParams, UsenetQueueResponse } from '../../../pages/api/modules/usenet/queue';
|
||||
import {
|
||||
UsenetQueueRequestParams,
|
||||
UsenetQueueResponse,
|
||||
} from '../../../pages/api/modules/usenet/queue';
|
||||
import {
|
||||
UsenetHistoryRequestParams,
|
||||
UsenetHistoryResponse,
|
||||
|
||||
@@ -40,7 +40,8 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
);
|
||||
await Promise.all(
|
||||
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({
|
||||
baseUrl: app.url,
|
||||
password,
|
||||
|
||||
@@ -5,6 +5,4 @@ import { IWidgetDefinition } from './widgets';
|
||||
// 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>>(
|
||||
options: TOptions
|
||||
) => {
|
||||
return options;
|
||||
};
|
||||
) => options;
|
||||
|
||||
Reference in New Issue
Block a user