mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
⬆️ Upgrade to @tabler/icons-react
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Group, Stack, Text, Title, useMantineTheme } from '@mantine/core';
|
||||
import { Dropzone } from '@mantine/dropzone';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconCheck as Check, IconPhoto, IconUpload, IconX, IconX as X } from '@tabler/icons';
|
||||
import { IconCheck as Check, IconPhoto, IconUpload, IconX, IconX as X } from '@tabler/icons-react';
|
||||
import { setCookie } from 'cookies-next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useConfigStore } from '../../config/store';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ActionIcon, createStyles, Space } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconChevronLeft, IconChevronRight } from '@tabler/icons';
|
||||
import { IconChevronLeft, IconChevronRight } from '@tabler/icons-react';
|
||||
import { useConfigContext } from '../../../../config/provider';
|
||||
import { useScreenLargerThan } from '../../../../hooks/useScreenLargerThan';
|
||||
import { MobileRibbonSidebarDrawer } from './MobileRibbonSidebarDrawer';
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
IconVersions,
|
||||
IconVocabulary,
|
||||
IconWorldWww,
|
||||
} from '@tabler/icons';
|
||||
} from '@tabler/icons-react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { InitOptions } from 'i18next';
|
||||
import { i18n, Trans, useTranslation } from 'next-i18next';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
IconBrush,
|
||||
IconClick,
|
||||
IconPlug,
|
||||
} from '@tabler/icons';
|
||||
} from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useState } from 'react';
|
||||
import { useConfigContext } from '../../../../config/provider';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Tabs, TextInput } from '@mantine/core';
|
||||
import { UseFormReturnType } from '@mantine/form';
|
||||
import { IconClick, IconCursorText, IconLink } from '@tabler/icons';
|
||||
import { IconClick, IconCursorText, IconLink } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { AppType } from '../../../../../../types/app';
|
||||
import { EditAppModalTab } from '../type';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Badge,
|
||||
Tooltip,
|
||||
} from '@mantine/core';
|
||||
import { TablerIcon } from '@tabler/icons';
|
||||
import { Icon } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useState } from 'react';
|
||||
import { AppIntegrationPropertyAccessabilityType } from '../../../../../../../../types/app';
|
||||
@@ -20,7 +20,7 @@ import { AppIntegrationPropertyAccessabilityType } from '../../../../../../../..
|
||||
interface GenericSecretInputProps {
|
||||
label: string;
|
||||
value: string;
|
||||
setIcon: TablerIcon;
|
||||
setIcon: Icon;
|
||||
secretIsPresent: boolean;
|
||||
type: AppIntegrationPropertyAccessabilityType;
|
||||
onClickUpdateButton: (value: string | undefined) => void;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Stack } from '@mantine/core';
|
||||
import { UseFormReturnType } from '@mantine/form';
|
||||
import { IconKey } from '@tabler/icons';
|
||||
import { IconKey } from '@tabler/icons-react';
|
||||
import {
|
||||
IntegrationField,
|
||||
integrationFieldDefinitions,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Alert, Divider, Tabs, Text } from '@mantine/core';
|
||||
import { UseFormReturnType } from '@mantine/form';
|
||||
import { IconAlertTriangle } from '@tabler/icons';
|
||||
import { IconAlertTriangle } from '@tabler/icons-react';
|
||||
import { Trans, useTranslation } from 'next-i18next';
|
||||
import { AppType } from '../../../../../../types/app';
|
||||
import { IntegrationSelector } from './Components/InputElements/IntegrationSelector';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Group, Space, Stack, Text, UnstyledButton } from '@mantine/core';
|
||||
import { closeModal } from '@mantine/modals';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconBox, IconBoxAlignTop, IconStack } from '@tabler/icons';
|
||||
import { IconBox, IconBoxAlignTop, IconStack } from '@tabler/icons-react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Button, Card, Center, Grid, Stack, Text } from '@mantine/core';
|
||||
import { TablerIcon } from '@tabler/icons';
|
||||
import { Icon } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import Image from 'next/image';
|
||||
import React from 'react';
|
||||
@@ -9,7 +9,7 @@ interface GenericAvailableElementTypeProps {
|
||||
name: string;
|
||||
handleAddition: () => Promise<void>;
|
||||
description?: string;
|
||||
image: string | TablerIcon;
|
||||
image: string | Icon;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Button, Text } from '@mantine/core';
|
||||
import { IconArrowNarrowLeft } from '@tabler/icons';
|
||||
import { IconArrowNarrowLeft } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
interface SelectorBackArrowProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Grid, Text } from '@mantine/core';
|
||||
import { IconCursorText } from '@tabler/icons';
|
||||
import { IconCursorText } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { GenericAvailableElementType } from '../Shared/GenericElementType';
|
||||
import { SelectorBackArrow } from '../Shared/SelectorBackArrow';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useModals } from '@mantine/modals';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconChecks, TablerIcon } from '@tabler/icons';
|
||||
import { IconChecks, Icon } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { useConfigContext } from '../../../../../../config/provider';
|
||||
@@ -11,7 +11,7 @@ import { GenericAvailableElementType } from '../Shared/GenericElementType';
|
||||
|
||||
interface WidgetElementTypeProps {
|
||||
id: string;
|
||||
image: string | TablerIcon;
|
||||
image: string | Icon;
|
||||
disabled?: boolean;
|
||||
widget: IWidgetDefinition;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionIcon, Menu } from '@mantine/core';
|
||||
import { IconDots, IconLayoutKanban, IconPencil, IconTrash } from '@tabler/icons';
|
||||
import { IconDots, IconLayoutKanban, IconPencil, IconTrash } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useEditModeStore } from '../Views/useEditModeStore';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Collapse, Flex, Stack, Text, createStyles } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconChevronDown, IconGripVertical } from '@tabler/icons';
|
||||
import { IconChevronDown, IconGripVertical } from '@tabler/icons-react';
|
||||
import { Reorder, useDragControls } from 'framer-motion';
|
||||
import { FC, useEffect, useRef } from 'react';
|
||||
import { IDraggableEditableListInputValue } from '../../../../../widgets/widgets';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Collapse, createStyles, Flex, Stack, Text } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconChevronDown, IconGripVertical } from '@tabler/icons';
|
||||
import { IconChevronDown, IconGripVertical } from '@tabler/icons-react';
|
||||
import { Reorder, useDragControls } from 'framer-motion';
|
||||
import { FC, ReactNode, useEffect, useRef } from 'react';
|
||||
import { IDraggableListInputValue } from '../../../../../widgets/widgets';
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
Title,
|
||||
} from '@mantine/core';
|
||||
import { ContextModalProps } from '@mantine/modals';
|
||||
import { IconAlertTriangle, IconPlaylistX, IconPlus } from '@tabler/icons';
|
||||
import { IconAlertTriangle, IconPlaylistX, IconPlus } from '@tabler/icons-react';
|
||||
import { Trans, useTranslation } from 'next-i18next';
|
||||
import { FC, useState } from 'react';
|
||||
import { useConfigContext } from '../../../../config/provider';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionIcon, Button, Text, Tooltip } from '@mantine/core';
|
||||
import { IconEdit, IconEditOff } from '@tabler/icons';
|
||||
import { IconEdit, IconEditOff } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useScreenLargerThan } from '../../../hooks/useScreenLargerThan';
|
||||
import { useEditModeStore } from './useEditModeStore';
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
IconRowInsertBottom,
|
||||
IconEdit,
|
||||
IconTrash,
|
||||
} from '@tabler/icons';
|
||||
} from '@tabler/icons-react';
|
||||
import { useConfigContext } from '../../../../config/provider';
|
||||
import { CategoryType } from '../../../../types/category';
|
||||
import { useCategoryActions } from './useCategoryActions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Image, Loader, createStyles } from '@mantine/core';
|
||||
import { useDebouncedValue } from '@mantine/hooks';
|
||||
import { IconPhotoOff } from '@tabler/icons';
|
||||
import { IconPhotoOff } from '@tabler/icons-react';
|
||||
|
||||
interface DebouncedImageProps {
|
||||
width: number;
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
SelectItemProps,
|
||||
ScrollArea,
|
||||
} from '@mantine/core';
|
||||
import { IconSearch } from '@tabler/icons';
|
||||
import { IconSearch } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useGetDashboardIcons } from '../../hooks/icons/useGetDashboardIcons';
|
||||
import { humanFileSize } from '../../tools/humanFileSize';
|
||||
|
||||
62
src/components/Settings/Common/CacheButtons.tsx
Normal file
62
src/components/Settings/Common/CacheButtons.tsx
Normal file
@@ -0,0 +1,62 @@
|
||||
import { Button, Group, MultiSelect, Stack, Title } from '@mantine/core';
|
||||
import { useState } from 'react';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import { IconTrash } from '@tabler/icons-react';
|
||||
import { queryClient } from '../../../tools/server/configurations/tanstack/queryClient.tool';
|
||||
|
||||
const data = [
|
||||
{ value: 'ping', label: 'Ping queries' },
|
||||
{ value: 'repository-icons', label: 'Remote/Local icons' },
|
||||
{ value: 'calendar/medias', label: 'Medais from the Calendar' },
|
||||
{ value: 'weather', label: 'Weather data' },
|
||||
];
|
||||
|
||||
export function CacheButtons() {
|
||||
const [value, setValue] = useState<string[]>([]);
|
||||
return (
|
||||
<Stack spacing="xs">
|
||||
<Title order={4}>Cache cleaning</Title>
|
||||
<MultiSelect
|
||||
value={value}
|
||||
searchable
|
||||
onChange={setValue}
|
||||
data={data}
|
||||
label="Select the cache(s) to clear"
|
||||
/>
|
||||
<Group>
|
||||
<Button
|
||||
color="red"
|
||||
variant="light"
|
||||
onClick={() =>
|
||||
queryClient.invalidateQueries(value).then(() =>
|
||||
notifications.show({
|
||||
title: 'Cache cleared',
|
||||
message: `Cache for ${value.join(', ')} has been cleared`,
|
||||
color: 'teal',
|
||||
icon: <IconTrash />,
|
||||
autoClose: 5000,
|
||||
})
|
||||
)
|
||||
}
|
||||
>
|
||||
Clear selected queries
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() =>
|
||||
queryClient.invalidateQueries().then(() =>
|
||||
notifications.show({
|
||||
title: 'Cache cleared',
|
||||
message: 'All cache has been cleared',
|
||||
color: 'teal',
|
||||
icon: <IconTrash />,
|
||||
autoClose: 5000,
|
||||
})
|
||||
)
|
||||
}
|
||||
>
|
||||
Clear all cache
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { openConfirmModal } from '@mantine/modals';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconAlertTriangle, IconCheck, IconCopy, IconDownload, IconTrash } from '@tabler/icons';
|
||||
import { IconAlertTriangle, IconCheck, IconCopy, IconDownload, IconTrash } from '@tabler/icons-react';
|
||||
import fileDownload from 'js-file-download';
|
||||
import { Trans, useTranslation } from 'next-i18next';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Alert, Paper, SegmentedControl, Space, Stack, TextInput, Title } from '@mantine/core';
|
||||
import { IconInfoCircle } from '@tabler/icons';
|
||||
import { IconInfoCircle } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { ChangeEventHandler, useState } from 'react';
|
||||
import { useConfigContext } from '../../../../config/provider';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Accordion, Checkbox, Grid, Group, Stack, Text } from '@mantine/core';
|
||||
import { IconBrush, IconChartCandle, IconCode, IconDragDrop, IconLayout } from '@tabler/icons';
|
||||
import { IconBrush, IconChartCandle, IconCode, IconDragDrop, IconLayout } from '@tabler/icons-react';
|
||||
import { i18n, useTranslation } from 'next-i18next';
|
||||
import { ReactNode } from 'react';
|
||||
import { GridstackConfiguration } from './Layout/GridstackConfiguration';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Alert, Button, Grid, Input, LoadingOverlay, Slider } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { IconCheck, IconReload } from '@tabler/icons';
|
||||
import { IconCheck, IconReload } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useState } from 'react';
|
||||
import { useConfigContext } from '../../../../config/provider';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ActionIcon, Button, Tooltip } from '@mantine/core';
|
||||
import { openContextModal } from '@mantine/modals';
|
||||
import { IconApps } from '@tabler/icons';
|
||||
import { IconApps } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useCardStyles } from '../../../useCardStyles';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActionIcon, Button, Group, Text, Title, Tooltip } from '@mantine/core';
|
||||
import { useHotkeys, useWindowEvent } from '@mantine/hooks';
|
||||
import { hideNotification, showNotification } from '@mantine/notifications';
|
||||
import { IconEditCircle, IconEditCircleOff } from '@tabler/icons';
|
||||
import { IconEditCircle, IconEditCircleOff } from '@tabler/icons-react';
|
||||
import axios from 'axios';
|
||||
import Consola from 'consola';
|
||||
import { getCookie } from 'cookies-next';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from '@mantine/core';
|
||||
import { useDebouncedValue, useHotkeys } from '@mantine/hooks';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconBrandYoutube, IconDownload, IconMovie, IconSearch } from '@tabler/icons';
|
||||
import { IconBrandYoutube, IconDownload, IconMovie, IconSearch } from '@tabler/icons-react';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import axios from 'axios';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Badge, Button, Menu } from '@mantine/core';
|
||||
import { useDisclosure } from '@mantine/hooks';
|
||||
import { IconInfoCircle, IconMenu2, IconSettings } from '@tabler/icons';
|
||||
import { IconInfoCircle, IconMenu2, IconSettings } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useEditModeInformationStore } from '../../../hooks/useEditModeInformation';
|
||||
import { AboutModal } from '../../Dashboard/Modals/AboutModal/AboutModal';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Menu, useMantineColorScheme } from '@mantine/core';
|
||||
import { IconMoonStars, IconSun } from '@tabler/icons';
|
||||
import { IconMoonStars, IconSun } from '@tabler/icons-react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
export const ColorSchemeSwitch = () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Button, Code, Menu, PasswordInput, Stack, Text } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { openModal } from '@mantine/modals';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconEdit, IconEditOff } from '@tabler/icons';
|
||||
import { IconEdit, IconEditOff } from '@tabler/icons-react';
|
||||
import axios from 'axios';
|
||||
import { useEditModeInformationStore } from '../../../../hooks/useEditModeInformation';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user