mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-11 03:36:37 +08:00
增加流量不重置功能,ping改为tcpping
This commit is contained in:
@@ -341,7 +341,8 @@ export default function DashboardPage() {
|
||||
};
|
||||
|
||||
const formatResetTime = (resetDay?: number): string => {
|
||||
if (!resetDay) return '';
|
||||
if (resetDay === undefined || resetDay === null) return '';
|
||||
if (resetDay === 0) return '不重置';
|
||||
|
||||
const now = new Date();
|
||||
const currentDay = now.getDate();
|
||||
@@ -592,7 +593,7 @@ export default function DashboardPage() {
|
||||
<p className="text-xs text-default-500 truncate">
|
||||
{userInfo.flow === 99999 ? '无限制' : `${calculateUsagePercentage('flow').toFixed(1)}%`}
|
||||
</p>
|
||||
{userInfo.flowResetTime && (
|
||||
{(userInfo.flowResetTime !== undefined && userInfo.flowResetTime !== null) && (
|
||||
<div className="text-xs text-default-500 flex items-center gap-1">
|
||||
<svg className="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clipRule="evenodd" />
|
||||
@@ -682,7 +683,7 @@ export default function DashboardPage() {
|
||||
<span className={`px-2 py-1 rounded-md text-xs font-medium border ${tunnelExpStatus.bg} ${tunnelExpStatus.color}`}>
|
||||
{tunnelExpStatus.text}
|
||||
</span>
|
||||
{tunnel.flowResetTime && (
|
||||
{(tunnel.flowResetTime !== undefined && tunnel.flowResetTime !== null) && (
|
||||
<span className="text-xs text-default-500">
|
||||
{formatResetTime(tunnel.flowResetTime)}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user