From 9c297b3fe1ec90890f3227646732f9a60fe35f77 Mon Sep 17 00:00:00 2001 From: kunish <17328586+kunish@users.noreply.github.com> Date: Mon, 10 Jul 2023 21:11:59 +0800 Subject: [PATCH] feat: change icons (#147) --- src/components/Section.tsx | 6 +++--- src/components/SimpleCard.tsx | 4 ++-- src/components/UpdateSubscriptionAction.tsx | 4 ++-- src/pages/Orchestrate/Node.tsx | 9 +++++---- src/pages/Orchestrate/Subscription.tsx | 5 +++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/components/Section.tsx b/src/components/Section.tsx index 78d78aa5..6b799b91 100644 --- a/src/components/Section.tsx +++ b/src/components/Section.tsx @@ -15,6 +15,7 @@ export const Section = ({ title, icon, bordered, + iconPlus, onCreate, actions, highlight, @@ -23,6 +24,7 @@ export const Section = ({ title: string icon?: React.ReactNode bordered?: boolean + iconPlus?: React.ReactNode onCreate: () => void actions?: React.ReactNode highlight?: boolean @@ -47,9 +49,7 @@ export const Section = ({ {actions} - - - + {iconPlus || } diff --git a/src/components/SimpleCard.tsx b/src/components/SimpleCard.tsx index 30621562..6ae49aa7 100644 --- a/src/components/SimpleCard.tsx +++ b/src/components/SimpleCard.tsx @@ -1,7 +1,7 @@ import { ActionIcon, Card, Group, Indicator, Modal, Title, UnstyledButton } from '@mantine/core' import { useDisclosure } from '@mantine/hooks' import { modals } from '@mantine/modals' -import { IconDetails, IconTrash } from '@tabler/icons-react' +import { IconEye, IconTrash } from '@tabler/icons-react' import { Fragment } from 'react' import { useTranslation } from 'react-i18next' @@ -38,7 +38,7 @@ export const SimpleCard = ({ {actions} - + {!selected && onRemove && ( diff --git a/src/components/UpdateSubscriptionAction.tsx b/src/components/UpdateSubscriptionAction.tsx index e9e453d1..e9be893c 100644 --- a/src/components/UpdateSubscriptionAction.tsx +++ b/src/components/UpdateSubscriptionAction.tsx @@ -1,5 +1,5 @@ import { ActionIcon } from '@mantine/core' -import { IconDownload } from '@tabler/icons-react' +import { IconRefresh } from '@tabler/icons-react' import { useUpdateSubscriptionsMutation } from '~/apis' @@ -12,7 +12,7 @@ export const UpdateSubscriptionAction = ({ id, loading }: { id: string; loading? size="xs" onClick={() => updateSubscriptionsMutation.mutate([id])} > - + ) } diff --git a/src/pages/Orchestrate/Node.tsx b/src/pages/Orchestrate/Node.tsx index 512f3c68..66533892 100644 --- a/src/pages/Orchestrate/Node.tsx +++ b/src/pages/Orchestrate/Node.tsx @@ -1,6 +1,6 @@ import { ActionIcon, Spoiler, Text, useMantineTheme } from '@mantine/core' import { useDisclosure } from '@mantine/hooks' -import { IconCloud, IconDetails, IconFileImport } from '@tabler/icons-react' +import { IconCloud, IconCloudPlus, IconEye, IconFileImport } from '@tabler/icons-react' import { useRef } from 'react' import { useTranslation } from 'react-i18next' @@ -30,9 +30,10 @@ export const NodeResource = () => {
} - onCreate={openConfigureNodeFormModal} + iconPlus={} + onCreate={openImportNodeFormModal} actions={ - + } @@ -61,7 +62,7 @@ export const NodeResource = () => { openQRCodeModal() }} > - + } onRemove={() => removeNodesMutation.mutate([id])} diff --git a/src/pages/Orchestrate/Subscription.tsx b/src/pages/Orchestrate/Subscription.tsx index 5de8a08f..996e2e1e 100644 --- a/src/pages/Orchestrate/Subscription.tsx +++ b/src/pages/Orchestrate/Subscription.tsx @@ -1,6 +1,6 @@ import { Accordion, ActionIcon, Group, Spoiler, Text } from '@mantine/core' import { useDisclosure } from '@mantine/hooks' -import { IconCloudComputing, IconDetails, IconDownload } from '@tabler/icons-react' +import { IconCloudComputing, IconCloudPlus, IconDownload, IconEye } from '@tabler/icons-react' import dayjs from 'dayjs' import { Fragment, useRef } from 'react' import { useTranslation } from 'react-i18next' @@ -37,6 +37,7 @@ export const SubscriptionResource = () => {
} + iconPlus={} onCreate={openImportSubscriptionFormModal} bordered actions={ @@ -72,7 +73,7 @@ export const SubscriptionResource = () => { openQRCodeModal() }} > - +