diff --git a/src/renderer/src/components/profiles/profile-item.tsx b/src/renderer/src/components/profiles/profile-item.tsx index 92055bf..36c66a7 100644 --- a/src/renderer/src/components/profiles/profile-item.tsx +++ b/src/renderer/src/components/profiles/profile-item.tsx @@ -243,21 +243,27 @@ const ProfileItem: React.FC = (props) => { {info.type === 'remote' && extra && (
{ - e.stopPropagation() - patchAppConfig({ - profileDisplayDate: profileDisplayDate === 'expire' ? 'update' : 'expire' - }) - }} className={`mt-2 flex justify-between ${isCurrent ? 'text-primary-foreground' : 'text-foreground'}`} > {`${calcTraffic(usage)}/${calcTraffic(total)}`} {profileDisplayDate === 'expire' ? ( - + { + e.stopPropagation() + patchAppConfig({ profileDisplayDate: 'update' }) + }} + > {extra.expire ? dayjs.unix(extra.expire).format('YYYY-MM-DD') : '长期有效'} ) : ( - {dayjs(info.updated).fromNow()} + { + e.stopPropagation() + patchAppConfig({ profileDisplayDate: 'expire' }) + }} + > + {dayjs(info.updated).fromNow()} + )}
)}