mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 03:32:17 +08:00
add tooltip
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
This commit is contained in:
parent
6eab062ff1
commit
3e723297fb
|
@ -8,7 +8,8 @@ import {
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownTrigger,
|
DropdownTrigger,
|
||||||
Progress
|
Progress,
|
||||||
|
Tooltip
|
||||||
} from '@nextui-org/react'
|
} from '@nextui-org/react'
|
||||||
import { calcPercent, calcTraffic } from '@renderer/utils/calc'
|
import { calcPercent, calcTraffic } from '@renderer/utils/calc'
|
||||||
import { IoMdMore, IoMdRefresh } from 'react-icons/io'
|
import { IoMdMore, IoMdRefresh } from 'react-icons/io'
|
||||||
|
@ -192,24 +193,25 @@ const ProfileItem: React.FC<Props> = (props) => {
|
||||||
</h3>
|
</h3>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
{info.type === 'remote' && (
|
{info.type === 'remote' && (
|
||||||
<Button
|
<Tooltip placement="left" content={dayjs(info.updated).fromNow()}>
|
||||||
isIconOnly
|
<Button
|
||||||
size="sm"
|
isIconOnly
|
||||||
variant="light"
|
size="sm"
|
||||||
color="default"
|
variant="light"
|
||||||
title={dayjs(info.updated).fromNow()}
|
|
||||||
disabled={updating}
|
|
||||||
onPress={async () => {
|
|
||||||
setUpdating(true)
|
|
||||||
await addProfileItem(info)
|
|
||||||
setUpdating(false)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IoMdRefresh
|
|
||||||
color="default"
|
color="default"
|
||||||
className={`${isCurrent ? 'text-white' : 'text-foreground'} text-[24px] ${updating ? 'animate-spin' : ''}`}
|
disabled={updating}
|
||||||
/>
|
onPress={async () => {
|
||||||
</Button>
|
setUpdating(true)
|
||||||
|
await addProfileItem(info)
|
||||||
|
setUpdating(false)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IoMdRefresh
|
||||||
|
color="default"
|
||||||
|
className={`${isCurrent ? 'text-white' : 'text-foreground'} text-[24px] ${updating ? 'animate-spin' : ''}`}
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Dropdown>
|
<Dropdown>
|
||||||
|
|
|
@ -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 { useProfileConfig } from '@renderer/hooks/use-profile-config'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { calcTraffic, calcPercent } from '@renderer/utils/calc'
|
import { calcTraffic, calcPercent } from '@renderer/utils/calc'
|
||||||
|
@ -95,23 +95,24 @@ const ProfileCard: React.FC = () => {
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
{info.type === 'remote' && (
|
{info.type === 'remote' && (
|
||||||
<Button
|
<Tooltip placement="left" content={dayjs(info.updated).fromNow()}>
|
||||||
isIconOnly
|
<Button
|
||||||
size="sm"
|
isIconOnly
|
||||||
title={dayjs(info.updated).fromNow()}
|
size="sm"
|
||||||
disabled={updating}
|
disabled={updating}
|
||||||
variant="light"
|
variant="light"
|
||||||
color="default"
|
color="default"
|
||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
setUpdating(true)
|
setUpdating(true)
|
||||||
await addProfileItem(info)
|
await addProfileItem(info)
|
||||||
setUpdating(false)
|
setUpdating(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IoMdRefresh
|
<IoMdRefresh
|
||||||
className={`text-[24px] ${match ? 'text-white' : 'text-foreground'} ${updating ? 'animate-spin' : ''}`}
|
className={`text-[24px] ${match ? 'text-white' : 'text-foreground'} ${updating ? 'animate-spin' : ''}`}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user