mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 01:15:47 +01:00
🔧 fix lint errors and bumb version
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
export const REPO_URL = 'ajnart/homarr';
|
||||
export const CURRENT_VERSION = 'v0.10.3';
|
||||
export const CURRENT_VERSION = 'v0.10.4';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homarr",
|
||||
"version": "0.10.3",
|
||||
"version": "0.10.4",
|
||||
"description": "Homarr - A homepage for your server.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -308,7 +308,9 @@ export function AddAppShelfItemForm(props: AddAppShelfItemFormProps) {
|
||||
target="_blank"
|
||||
weight="bold"
|
||||
style={{ fontStyle: 'inherit', fontSize: 'inherit' }}
|
||||
href={`${hostname}/${apiKeyPaths[form.values.type as keyof typeof apiKeyPaths]}`}
|
||||
href={`${hostname}/${
|
||||
apiKeyPaths[form.values.type as keyof typeof apiKeyPaths]
|
||||
}`}
|
||||
>
|
||||
{t('modal.tabs.options.form.integrations.apiKey.tip.link')}
|
||||
</Anchor>
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Accordion,
|
||||
Divider,
|
||||
Grid,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
useMantineColorScheme,
|
||||
} from '@mantine/core';
|
||||
import { Accordion, Grid, Paper, Stack, Text, useMantineColorScheme } from '@mantine/core';
|
||||
import {
|
||||
closestCenter,
|
||||
DndContext,
|
||||
|
||||
@@ -49,11 +49,7 @@ export function SearchNewTabSwitch() {
|
||||
return (
|
||||
<Group>
|
||||
<div className={classes.root}>
|
||||
<Switch
|
||||
checked={openInNewTab}
|
||||
onChange={() => toggleOpenInNewTab()}
|
||||
size="md"
|
||||
/>
|
||||
<Switch checked={openInNewTab} onChange={() => toggleOpenInNewTab()} size="md" />
|
||||
</div>
|
||||
{t('searchNewTab.label')}
|
||||
</Group>
|
||||
|
||||
@@ -47,22 +47,22 @@ export default function TitleChanger() {
|
||||
<Stack>
|
||||
<TextInput
|
||||
label={t('pageTitle.label')}
|
||||
placeholder={'Homarr 🦞'}
|
||||
placeholder="Homarr 🦞"
|
||||
{...form.getInputProps('title')}
|
||||
/>
|
||||
<TextInput
|
||||
label={t('logo.label')}
|
||||
placeholder={'/imgs/logo.png}
|
||||
placeholder="/imgs/logo.png"
|
||||
{...form.getInputProps('logo')}
|
||||
/>
|
||||
<TextInput
|
||||
label={t('favicon.label')}
|
||||
placeholder={'/imgs/favicon/favicon.png'}
|
||||
placeholder="/imgs/favicon/favicon.png"
|
||||
{...form.getInputProps('favicon')}
|
||||
/>
|
||||
<TextInput
|
||||
label={t('background.label')}
|
||||
placeholder={'/img/background.png'}
|
||||
placeholder="/img/background.png"
|
||||
{...form.getInputProps('background')}
|
||||
/>
|
||||
<Textarea
|
||||
|
||||
@@ -42,9 +42,7 @@ export default function Layout({ children, style }: any) {
|
||||
>
|
||||
{children}
|
||||
</main>
|
||||
<style>
|
||||
{cx(config.settings.customCSS)}
|
||||
</style>
|
||||
<style>{cx(config.settings.customCSS)}</style>
|
||||
</AppShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,19 +4,15 @@ import { NextFetchEvent, NextRequest, NextResponse } from 'next/server';
|
||||
export function middleware(req: NextRequest, ev: NextFetchEvent) {
|
||||
const isCorrectPassword = req.cookies.get('password') === process.env.PASSWORD;
|
||||
const url = req.nextUrl.clone();
|
||||
const skipURL = url.pathname && (
|
||||
url.pathname.includes('login') || url.pathname === ('/api/configs/tryPassword') || (
|
||||
url.pathname.includes('/_next/') && !url.pathname.includes('/pages/')
|
||||
) ||
|
||||
const skipURL =
|
||||
url.pathname &&
|
||||
(url.pathname.includes('login') ||
|
||||
url.pathname === '/api/configs/tryPassword' ||
|
||||
(url.pathname.includes('/_next/') && !url.pathname.includes('/pages/')) ||
|
||||
url.pathname === '/favicon.ico' ||
|
||||
url.pathname === '/404' ||
|
||||
url.pathname.includes('pages/_app')
|
||||
);
|
||||
if (
|
||||
!skipURL &&
|
||||
!isCorrectPassword &&
|
||||
process.env.PASSWORD
|
||||
) {
|
||||
url.pathname.includes('pages/_app'));
|
||||
if (!skipURL && !isCorrectPassword && process.env.PASSWORD) {
|
||||
url.pathname = '/login';
|
||||
return NextResponse.rewrite(url);
|
||||
}
|
||||
|
||||
2
src/modules/ModuleTypes.d.ts
vendored
2
src/modules/ModuleTypes.d.ts
vendored
@@ -14,7 +14,7 @@ export interface IModule {
|
||||
padding?: PaddingOptions = {
|
||||
right: 15,
|
||||
top: 15,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
interface PaddingOptions {
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
import {
|
||||
Table,
|
||||
Checkbox,
|
||||
Group,
|
||||
Badge,
|
||||
createStyles,
|
||||
ScrollArea,
|
||||
TextInput,
|
||||
} from '@mantine/core';
|
||||
import { Table, Checkbox, Group, Badge, createStyles, ScrollArea, TextInput } from '@mantine/core';
|
||||
import { IconSearch } from '@tabler/icons';
|
||||
import Dockerode from 'dockerode';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
@@ -158,16 +158,24 @@ export default function SearchBar(props: any) {
|
||||
form.setValues({ query: '' });
|
||||
switch (query.substring(0, 3)) {
|
||||
case '!yt':
|
||||
window.open(`https://www.youtube.com/results?search_query=${query.substring(3)}`, open_in);
|
||||
window.open(
|
||||
`https://www.youtube.com/results?search_query=${query.substring(3)}`,
|
||||
open_in
|
||||
);
|
||||
break;
|
||||
case '!t ':
|
||||
window.open(`https://www.torrentdownloads.me/search/?search=${query.substring(3)}`, open_in);
|
||||
window.open(
|
||||
`https://www.torrentdownloads.me/search/?search=${query.substring(3)}`,
|
||||
open_in
|
||||
);
|
||||
break;
|
||||
case '!os':
|
||||
break;
|
||||
default:
|
||||
window.open(
|
||||
`${queryUrl.includes('%s') ? queryUrl.replace('%s', query) : `${queryUrl}${query}`}`,
|
||||
`${
|
||||
queryUrl.includes('%s') ? queryUrl.replace('%s', query) : `${queryUrl}${query}`
|
||||
}`,
|
||||
open_in
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface NzbgetHistoryItem {
|
||||
DownloadTimeSec: number;
|
||||
PostTotalTimeSec: number;
|
||||
ParTimeSec: number;
|
||||
RepairTimeSec: number
|
||||
RepairTimeSec: number;
|
||||
UnpackTimeSec: number;
|
||||
MessageCount: number;
|
||||
DupeKey: string;
|
||||
@@ -71,7 +71,21 @@ export interface NzbgetQueueItem {
|
||||
MaxPostTime: number;
|
||||
MaxPriority: number;
|
||||
ActiveDownloads: number;
|
||||
Status: 'QUEUED' | 'PAUSED' | 'DOWNLOADING' | 'FETCHING' | 'PP_QUEUED' | 'LOADING_PARS' | 'VERIFYING_SOURCES' | 'REPAIRING' | 'VERIFYING_REPAIRED' | 'RENAMING' | 'UNPACKING' | 'MOVING' | 'EXECUTING_SCRIPT' | 'PP_FINISHED';
|
||||
Status:
|
||||
| 'QUEUED'
|
||||
| 'PAUSED'
|
||||
| 'DOWNLOADING'
|
||||
| 'FETCHING'
|
||||
| 'PP_QUEUED'
|
||||
| 'LOADING_PARS'
|
||||
| 'VERIFYING_SOURCES'
|
||||
| 'REPAIRING'
|
||||
| 'VERIFYING_REPAIRED'
|
||||
| 'RENAMING'
|
||||
| 'UNPACKING'
|
||||
| 'MOVING'
|
||||
| 'EXECUTING_SCRIPT'
|
||||
| 'PP_FINISHED';
|
||||
TotalArticles: number;
|
||||
SuccessArticles: number;
|
||||
FailedArticles: number;
|
||||
@@ -128,8 +142,8 @@ export interface NzbgetStatus {
|
||||
}
|
||||
|
||||
export interface NzbgetClientOptions {
|
||||
host: string,
|
||||
port: string,
|
||||
login: string | undefined,
|
||||
hash: string | undefined,
|
||||
host: string;
|
||||
port: string;
|
||||
login: string | undefined;
|
||||
hash: string | undefined;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { PasswordInput, Anchor, Paper, Title, Text, Container, Group, Button } from '@mantine/core';
|
||||
import { PasswordInput, Paper, Title, Text, Container, Group, Button } from '@mantine/core';
|
||||
import { setCookie } from 'cookies-next';
|
||||
import { showNotification, updateNotification } from '@mantine/notifications';
|
||||
import axios from 'axios';
|
||||
import { IconCheck, IconX } from '@tabler/icons';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Trans, useTranslation } from 'next-i18next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||
import { loginNamespaces } from '../tools/translation-namespaces';
|
||||
|
||||
@@ -30,6 +30,4 @@ export const dashboardNamespaces = [
|
||||
'modules/common-media-cards',
|
||||
];
|
||||
|
||||
export const loginNamespaces = [
|
||||
'authentication/login',
|
||||
];
|
||||
export const loginNamespaces = ['authentication/login'];
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface Settings {
|
||||
secondaryColor?: MantineTheme['primaryColor'];
|
||||
primaryShade?: MantineTheme['primaryShade'];
|
||||
background?: string;
|
||||
customCSS?: string,
|
||||
customCSS?: string;
|
||||
appOpacity?: number;
|
||||
widgetPosition?: string;
|
||||
appCardWidth?: number;
|
||||
@@ -76,7 +76,7 @@ export const ServiceTypeList = [
|
||||
'Overseerr',
|
||||
'Jellyseerr',
|
||||
'Sabnzbd',
|
||||
'NZBGet'
|
||||
'NZBGet',
|
||||
];
|
||||
export type ServiceType =
|
||||
| 'Other'
|
||||
@@ -120,7 +120,7 @@ export const portmap = [
|
||||
{ name: 'overseerr', value: '5055' },
|
||||
{ name: 'dash.', value: '3001' },
|
||||
{ name: 'sabnzbd', value: '8080' },
|
||||
{ name: 'nzbget', value: '6789' }
|
||||
{ name: 'nzbget', value: '6789' },
|
||||
];
|
||||
|
||||
export const MatchingImages: {
|
||||
|
||||
Reference in New Issue
Block a user