diff --git a/src/renderer/src/components/profiles/profile-item.tsx b/src/renderer/src/components/profiles/profile-item.tsx index 038b8c4..b536ab4 100644 --- a/src/renderer/src/components/profiles/profile-item.tsx +++ b/src/renderer/src/components/profiles/profile-item.tsx @@ -8,7 +8,8 @@ import { DropdownItem, DropdownMenu, DropdownTrigger, - Progress + Progress, + Tooltip } from '@nextui-org/react' import { calcPercent, calcTraffic } from '@renderer/utils/calc' import { IoMdMore, IoMdRefresh } from 'react-icons/io' @@ -192,24 +193,25 @@ const ProfileItem: React.FC = (props) => {
{info.type === 'remote' && ( - + disabled={updating} + onPress={async () => { + setUpdating(true) + await addProfileItem(info) + setUpdating(false) + }} + > + + + )} diff --git a/src/renderer/src/components/sider/profile-card.tsx b/src/renderer/src/components/sider/profile-card.tsx index b76a6a7..dbfd653 100644 --- a/src/renderer/src/components/sider/profile-card.tsx +++ b/src/renderer/src/components/sider/profile-card.tsx @@ -1,4 +1,4 @@ -import { Button, Card, CardBody, CardFooter, Chip, Progress } from '@nextui-org/react' +import { Button, Card, CardBody, CardFooter, Chip, Progress, Tooltip } from '@nextui-org/react' import { useProfileConfig } from '@renderer/hooks/use-profile-config' import { useLocation } from 'react-router-dom' import { calcTraffic, calcPercent } from '@renderer/utils/calc' @@ -95,23 +95,24 @@ const ProfileCard: React.FC = () => { /> {info.type === 'remote' && ( - + + + )}