mirror of
https://github.com/ajnart/homarr.git
synced 2025-10-31 18:46:23 +01:00
Remove all unused dependencies and items
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
useMantineTheme,
|
useMantineTheme,
|
||||||
Modal,
|
Modal,
|
||||||
Paper,
|
|
||||||
Center,
|
Center,
|
||||||
Group,
|
Group,
|
||||||
TextInput,
|
TextInput,
|
||||||
@@ -9,9 +8,7 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Select,
|
Select,
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
Box,
|
|
||||||
Text,
|
Text,
|
||||||
Grid,
|
|
||||||
Card,
|
Card,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { useForm } from '@mantine/hooks';
|
import { useForm } from '@mantine/hooks';
|
||||||
@@ -19,10 +16,10 @@ import { motion } from 'framer-motion';
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Apps } from 'tabler-icons-react';
|
import { Apps } from 'tabler-icons-react';
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
import { ServiceType, ServiceTypeList } from '../../tools/types';
|
import { ServiceTypeList } from '../../tools/types';
|
||||||
|
|
||||||
export default function AddItemShelfItem(props: any) {
|
export default function AddItemShelfItem(props: any) {
|
||||||
const { config, addService } = useConfig();
|
const { addService } = useConfig();
|
||||||
const [opened, setOpened] = useState(false);
|
const [opened, setOpened] = useState(false);
|
||||||
const theme = useMantineTheme();
|
const theme = useMantineTheme();
|
||||||
const form = useForm({
|
const form = useForm({
|
||||||
@@ -123,7 +120,6 @@ export default function AddItemShelfItem(props: any) {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
style={{
|
style={{
|
||||||
|
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[1],
|
theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[1],
|
||||||
width: 200,
|
width: 200,
|
||||||
|
|||||||
@@ -1,30 +1,20 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import {
|
import {
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Text,
|
Text,
|
||||||
Anchor,
|
|
||||||
Box,
|
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
createStyles,
|
createStyles,
|
||||||
Center,
|
Center,
|
||||||
Container,
|
|
||||||
SimpleGrid,
|
SimpleGrid,
|
||||||
Space,
|
|
||||||
Card,
|
Card,
|
||||||
useMantineTheme,
|
useMantineTheme,
|
||||||
Image,
|
Image,
|
||||||
Badge,
|
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { showNotification } from '@mantine/notifications';
|
|
||||||
import { AlertCircle, Cross, X } from 'tabler-icons-react';
|
|
||||||
import AppShelfMenu from './AppShelfMenu';
|
import AppShelfMenu from './AppShelfMenu';
|
||||||
import AddItemShelfItem from './AddAppShelfItem';
|
import AddItemShelfItem from './AddAppShelfItem';
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
import { pingQbittorrent } from '../../tools/api';
|
import { pingQbittorrent } from '../../tools/api';
|
||||||
import { Config, serviceItem } from '../../tools/types';
|
import { serviceItem } from '../../tools/types';
|
||||||
import { SettingsMenuButton } from '../Settings/SettingsMenu';
|
|
||||||
|
|
||||||
const useStyles = createStyles((theme) => ({
|
const useStyles = createStyles((theme) => ({
|
||||||
main: {
|
main: {
|
||||||
@@ -82,7 +72,7 @@ export function AppShelfItem(props: any) {
|
|||||||
style={{
|
style={{
|
||||||
boxShadow: hovering ? '0px 0px 3px rgba(0, 0, 0, 0.5)' : '0px 0px 1px rgba(0, 0, 0, 0.5)',
|
boxShadow: hovering ? '0px 0px 3px rgba(0, 0, 0, 0.5)' : '0px 0px 1px rgba(0, 0, 0, 0.5)',
|
||||||
}}
|
}}
|
||||||
radius={'md'}
|
radius="md"
|
||||||
>
|
>
|
||||||
<motion.div
|
<motion.div
|
||||||
animate={{
|
animate={{
|
||||||
@@ -93,7 +83,7 @@ export function AppShelfItem(props: any) {
|
|||||||
</motion.div>
|
</motion.div>
|
||||||
<Card.Section>
|
<Card.Section>
|
||||||
<Center>
|
<Center>
|
||||||
<Text mt={'sm'} weight={500}>
|
<Text mt="sm" weight={500}>
|
||||||
{service.name}
|
{service.name}
|
||||||
</Text>
|
</Text>
|
||||||
</Center>
|
</Center>
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import { Check, Edit, Trash } from 'tabler-icons-react';
|
|||||||
export default function AppShelfMenu(props: any) {
|
export default function AppShelfMenu(props: any) {
|
||||||
const { name, removeitem: removeItem } = props;
|
const { name, removeitem: removeItem } = props;
|
||||||
return (
|
return (
|
||||||
<Menu style={{
|
<Menu
|
||||||
position: 'absolute',
|
style={{
|
||||||
top: 10,
|
position: 'absolute',
|
||||||
right: 10,
|
top: 10,
|
||||||
}}>
|
right: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Menu.Label>Settings</Menu.Label>
|
<Menu.Label>Settings</Menu.Label>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ActionIcon, Box, useMantineColorScheme } from '@mantine/core';
|
import { Box, useMantineColorScheme } from '@mantine/core';
|
||||||
import { Sun, MoonStars } from 'tabler-icons-react';
|
import { Sun, MoonStars } from 'tabler-icons-react';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Group, Text, useMantineTheme, MantineTheme, Notification } from '@mantine/core';
|
import { Group, Text, useMantineTheme, MantineTheme } from '@mantine/core';
|
||||||
import { Upload, Photo, X, Icon as TablerIcon, Check } from 'tabler-icons-react';
|
import { Upload, Photo, X, Icon as TablerIcon, Check } from 'tabler-icons-react';
|
||||||
import { Dropzone, DropzoneStatus, FullScreenDropzone, IMAGE_MIME_TYPE } from '@mantine/dropzone';
|
import { DropzoneStatus, FullScreenDropzone } from '@mantine/dropzone';
|
||||||
import { showNotification } from '@mantine/notifications';
|
import { showNotification } from '@mantine/notifications';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
import { Config, serviceItem } from '../../tools/types';
|
import { Config } from '../../tools/types';
|
||||||
|
|
||||||
function getIconColor(status: DropzoneStatus, theme: MantineTheme) {
|
function getIconColor(status: DropzoneStatus, theme: MantineTheme) {
|
||||||
return status.accepted
|
return status.accepted
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Anchor, Button, ThemeIcon, Tooltip } from '@mantine/core';
|
import { Button } from '@mantine/core';
|
||||||
import fileDownload from 'js-file-download';
|
import fileDownload from 'js-file-download';
|
||||||
import { Dropzone, DropzoneStatus, IMAGE_MIME_TYPE } from '@mantine/dropzone';
|
|
||||||
import { Download } from 'tabler-icons-react';
|
import { Download } from 'tabler-icons-react';
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,8 @@
|
|||||||
import {
|
import { TextInput, Text, Popover, Box } from '@mantine/core';
|
||||||
Input,
|
|
||||||
TextInput,
|
|
||||||
Text,
|
|
||||||
ActionIcon,
|
|
||||||
useMantineTheme,
|
|
||||||
Center,
|
|
||||||
Popover,
|
|
||||||
Box,
|
|
||||||
} from '@mantine/core';
|
|
||||||
import { useForm } from '@mantine/hooks';
|
import { useForm } from '@mantine/hooks';
|
||||||
import { showNotification } from '@mantine/notifications';
|
import { useState } from 'react';
|
||||||
import { useState, useEffect } from 'react';
|
import { Search, BrandYoutube, Download } from 'tabler-icons-react';
|
||||||
import {
|
|
||||||
Search,
|
|
||||||
ArrowRight,
|
|
||||||
ArrowLeft,
|
|
||||||
BrandYoutube,
|
|
||||||
Download,
|
|
||||||
InfoCircle,
|
|
||||||
FileX,
|
|
||||||
} from 'tabler-icons-react';
|
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
import { Settings } from '../../tools/types';
|
|
||||||
|
|
||||||
export default function SearchBar(props: any) {
|
export default function SearchBar(props: any) {
|
||||||
const { config, setConfig } = useConfig();
|
const { config, setConfig } = useConfig();
|
||||||
@@ -35,7 +16,7 @@ export default function SearchBar(props: any) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (config.settings.searchBar == false) {
|
if (config.settings.searchBar === false) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { ActionIcon, Group, Modal, Switch, Title, Text, Tooltip, TextInput } from '@mantine/core';
|
import { ActionIcon, Group, Modal, Switch, Title, Text, Tooltip, TextInput } from '@mantine/core';
|
||||||
import { showNotification } from '@mantine/notifications';
|
import { useState } from 'react';
|
||||||
import { motion } from 'framer-motion';
|
import { Settings as SettingsIcon } from 'tabler-icons-react';
|
||||||
import { CSSProperties, useEffect, useState } from 'react';
|
|
||||||
import { Mail, Settings as SettingsIcon, X } from 'tabler-icons-react';
|
|
||||||
import { useConfig } from '../../tools/state';
|
import { useConfig } from '../../tools/state';
|
||||||
import SaveConfigComponent from '../Config/SaveConfig';
|
import SaveConfigComponent from '../Config/SaveConfig';
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
import {
|
import { Indicator, Popover, Box, Center } from '@mantine/core';
|
||||||
Group,
|
import { useState } from 'react';
|
||||||
Indicator,
|
|
||||||
Popover,
|
|
||||||
Box,
|
|
||||||
Container,
|
|
||||||
Text,
|
|
||||||
Avatar,
|
|
||||||
ActionIcon,
|
|
||||||
Center,
|
|
||||||
} from '@mantine/core';
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { Calendar } from '@mantine/dates';
|
import { Calendar } from '@mantine/dates';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import MediaDisplay from './MediaDisplay';
|
import MediaDisplay from './MediaDisplay';
|
||||||
@@ -100,8 +90,9 @@ function DayComponent(props: any) {
|
|||||||
onClose={() => setOpened(false)}
|
onClose={() => setOpened(false)}
|
||||||
opened={opened}
|
opened={opened}
|
||||||
target={day}
|
target={day}
|
||||||
children={<MediaDisplay media={medias[match]} />}
|
>
|
||||||
/>
|
<MediaDisplay media={medias[match]} />
|
||||||
|
</Popover>
|
||||||
</Indicator>
|
</Indicator>
|
||||||
</Center>
|
</Center>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Stack, Paper, Image, Group, Title, Badge, Text } from '@mantine/core';
|
import { Stack, Image, Group, Title, Badge, Text } from '@mantine/core';
|
||||||
|
|
||||||
export interface IMedia {
|
export interface IMedia {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { createStyles, Anchor, Text, Group, ActionIcon } from '@mantine/core';
|
import { createStyles, Anchor, Text, Group, ActionIcon } from '@mantine/core';
|
||||||
import { BrandGithub, Phone, BrandGmail } from 'tabler-icons-react';
|
import { BrandGithub } from 'tabler-icons-react';
|
||||||
import { posix } from 'path';
|
|
||||||
|
|
||||||
const useStyles = createStyles((theme) => ({
|
const useStyles = createStyles((theme) => ({
|
||||||
footer: {
|
footer: {
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ import {
|
|||||||
Container,
|
Container,
|
||||||
Group,
|
Group,
|
||||||
Burger,
|
Burger,
|
||||||
Paper,
|
|
||||||
Transition,
|
|
||||||
Aside,
|
|
||||||
Drawer,
|
Drawer,
|
||||||
Center,
|
Center,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
@@ -15,7 +12,6 @@ import { useBooleanToggle } from '@mantine/hooks';
|
|||||||
import { NextLink } from '@mantine/next';
|
import { NextLink } from '@mantine/next';
|
||||||
import { Logo } from './Logo';
|
import { Logo } from './Logo';
|
||||||
import { ColorSchemeToggle } from '../ColorSchemeToggle/ColorSchemeToggle';
|
import { ColorSchemeToggle } from '../ColorSchemeToggle/ColorSchemeToggle';
|
||||||
import SaveConfigComponent from '../Config/SaveConfig';
|
|
||||||
import { SettingsMenuButton } from '../Settings/SettingsMenu';
|
import { SettingsMenuButton } from '../Settings/SettingsMenu';
|
||||||
import CalendarComponent from '../calendar/CalendarComponent';
|
import CalendarComponent from '../calendar/CalendarComponent';
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function Layout({ children, style }: any) {
|
|||||||
<AppShell
|
<AppShell
|
||||||
aside={
|
aside={
|
||||||
<Aside
|
<Aside
|
||||||
height={'auto'}
|
height="auto"
|
||||||
hiddenBreakpoint="md"
|
hiddenBreakpoint="md"
|
||||||
hidden
|
hidden
|
||||||
width={{
|
width={{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Group, Notification } from '@mantine/core';
|
import { Group } from '@mantine/core';
|
||||||
import AppShelf from '../components/AppShelf/AppShelf';
|
import AppShelf from '../components/AppShelf/AppShelf';
|
||||||
import CalendarComponent from '../components/calendar/CalendarComponent';
|
|
||||||
import LoadConfigComponent from '../components/Config/LoadConfig';
|
import LoadConfigComponent from '../components/Config/LoadConfig';
|
||||||
import SearchBar from '../components/SearchBar/SearchBar';
|
import SearchBar from '../components/SearchBar/SearchBar';
|
||||||
|
|
||||||
@@ -8,7 +7,7 @@ export default function HomePage() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SearchBar />
|
<SearchBar />
|
||||||
<Group align={'start'} position="apart" noWrap>
|
<Group align="start" position="apart" noWrap>
|
||||||
<AppShelf />
|
<AppShelf />
|
||||||
</Group>
|
</Group>
|
||||||
<LoadConfigComponent />
|
<LoadConfigComponent />
|
||||||
|
|||||||
Reference in New Issue
Block a user