mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
adjust the switching area
This commit is contained in:
parent
558b9e7c30
commit
c4047ff57a
@ -243,21 +243,27 @@ const ProfileItem: React.FC<Props> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
{info.type === 'remote' && extra && (
|
{info.type === 'remote' && extra && (
|
||||||
<div
|
<div
|
||||||
onClick={(e) => {
|
|
||||||
e.stopPropagation()
|
|
||||||
patchAppConfig({
|
|
||||||
profileDisplayDate: profileDisplayDate === 'expire' ? 'update' : 'expire'
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
className={`mt-2 flex justify-between ${isCurrent ? 'text-primary-foreground' : 'text-foreground'}`}
|
className={`mt-2 flex justify-between ${isCurrent ? 'text-primary-foreground' : 'text-foreground'}`}
|
||||||
>
|
>
|
||||||
<small>{`${calcTraffic(usage)}/${calcTraffic(total)}`}</small>
|
<small>{`${calcTraffic(usage)}/${calcTraffic(total)}`}</small>
|
||||||
{profileDisplayDate === 'expire' ? (
|
{profileDisplayDate === 'expire' ? (
|
||||||
<small>
|
<small
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
patchAppConfig({ profileDisplayDate: 'update' })
|
||||||
|
}}
|
||||||
|
>
|
||||||
{extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : '长期有效'}
|
{extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : '长期有效'}
|
||||||
</small>
|
</small>
|
||||||
) : (
|
) : (
|
||||||
<small>{dayjs(info.updated).fromNow()}</small>
|
<small
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
patchAppConfig({ profileDisplayDate: 'expire' })
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{dayjs(info.updated).fromNow()}
|
||||||
|
</small>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user