add tooltip

This commit is contained in:
pompurin404 2024-08-31 22:41:06 +08:00
parent d660c5d0dc
commit ba4de39f1e
No known key found for this signature in database
6 changed files with 21 additions and 5 deletions

View File

@ -169,6 +169,7 @@ const OverrideItem: React.FC<Props> = (props) => {
ref={setNodeRef}
{...attributes}
{...listeners}
title={info?.name}
className={`text-ellipsis whitespace-nowrap overflow-hidden text-md font-bold leading-[32px] text-foreground`}
>
{info?.name}

View File

@ -185,6 +185,7 @@ const ProfileItem: React.FC<Props> = (props) => {
ref={setNodeRef}
{...attributes}
{...listeners}
title={info?.name}
className={`text-ellipsis whitespace-nowrap overflow-hidden text-md font-bold leading-[32px] ${isCurrent ? 'text-white' : 'text-foreground'}`}
>
{info?.name}

View File

@ -65,12 +65,17 @@ const ProxyItem: React.FC<Props> = (props) => {
<CardBody className="p-2">
<div className="flex justify-between items-center">
<div className="text-ellipsis overflow-hidden whitespace-nowrap">
<div className="flag-emoji inline">{proxy.name}</div>
<div className="flag-emoji inline" title={proxy.name}>
{proxy.name}
</div>
{proxyDisplayMode === 'full' && (
<div className="inline ml-2 text-default-500">{proxy.type}</div>
<div className="inline ml-2 text-default-500" title={proxy.type}>
{proxy.type}
</div>
)}
</div>
<Button
title={proxy.type}
isLoading={loading}
color={delayColor(delay)}
onPress={onDelay}

View File

@ -7,7 +7,9 @@ const RuleItem: React.FC<IMihomoRulesDetail & { index: number }> = (props) => {
<div className={`w-full px-2 pb-2 ${index === 0 ? 'pt-2' : ''}`}>
<Card>
<CardBody className="w-full">
<div className="text-ellipsis whitespace-nowrap overflow-hidden">{payload}</div>
<div title={payload} className="text-ellipsis whitespace-nowrap overflow-hidden">
{payload}
</div>
<div className="flex justify-start text-default-500">
<div>{type}</div>
<div className="ml-2">{proxy}</div>

View File

@ -69,6 +69,7 @@ const ProfileCard: React.FC = () => {
className="flex justify-between h-[32px]"
>
<h3
title={info?.name}
className={`text-ellipsis whitespace-nowrap overflow-hidden text-md font-bold leading-[32px] ${match ? 'text-white' : 'text-foreground'} `}
>
{info?.name}

View File

@ -200,11 +200,17 @@ const Proxies: React.FC = () => {
/>
) : null}
<div className="text-ellipsis overflow-hidden whitespace-nowrap">
<div className="inline flag-emoji h-[32px] text-md leading-[32px]">
<div
title={groups[index].name}
className="inline flag-emoji h-[32px] text-md leading-[32px]"
>
{groups[index].name}
</div>
{proxyDisplayMode === 'full' && (
<div className="inline ml-2 text-sm text-default-500">
<div
title={groups[index].type}
className="inline ml-2 text-sm text-default-500"
>
{groups[index].type}
</div>
)}