From 881366175fa1c941ccf14b88a3c38037fdd211c0 Mon Sep 17 00:00:00 2001 From: TheSmallHanCat Date: Sat, 17 Jan 2026 13:01:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AF=E7=94=A8=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/manage.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/manage.html b/static/manage.html index 5981203..05816e5 100644 --- a/static/manage.html +++ b/static/manage.html @@ -270,6 +270,7 @@ Client ID 过期时间 账户类型 + 可用次数 图片 视频 错误 @@ -901,7 +902,7 @@ formatPlanType=type=>{if(!type)return'-';const typeMap={'chatgpt_team':'Team','chatgpt_plus':'Plus','chatgpt_pro':'Pro','chatgpt_free':'Free'};return typeMap[type]||type}, formatPlanTypeWithTooltip=(t)=>{const tooltipText=t.subscription_end?`套餐到期: ${new Date(t.subscription_end).toLocaleDateString('zh-CN',{year:'numeric',month:'2-digit',day:'2-digit'}).replace(/\//g,'-')} ${new Date(t.subscription_end).toLocaleTimeString('zh-CN',{hour:'2-digit',minute:'2-digit',hour12:false})}`:'';return`${formatPlanType(t.plan_type)}`}, formatClientId=(clientId)=>{if(!clientId)return'-';const short=clientId.substring(0,8)+'...';return`${short}`}, - renderTokens=()=>{const start=(currentPage-1)*pageSize,end=start+pageSize,paginatedTokens=allTokens.slice(start,end);const tb=$('tokenTableBody');tb.innerHTML=paginatedTokens.map(t=>{const imageDisplay=t.image_enabled?`${t.image_count||0}`:'-';const videoDisplay=t.video_enabled?`${t.video_count||0}`:'-';const statusText=t.is_expired?'已过期':(t.is_active?'活跃':'禁用');const statusClass=t.is_expired?'bg-gray-100 text-gray-700':(t.is_active?'bg-green-50 text-green-700':'bg-gray-100 text-gray-700');return`${t.email}${statusText}${formatClientId(t.client_id)}${formatExpiry(t.expiry_time)}${formatPlanTypeWithTooltip(t)}${imageDisplay}${videoDisplay}${t.error_count||0}${t.remark||'-'}`}).join('');renderPagination()}, + renderTokens=()=>{const start=(currentPage-1)*pageSize,end=start+pageSize,paginatedTokens=allTokens.slice(start,end);const tb=$('tokenTableBody');tb.innerHTML=paginatedTokens.map(t=>{const imageDisplay=t.image_enabled?`${t.image_count||0}`:'-';const videoDisplay=t.video_enabled?`${t.video_count||0}`:'-';const remainingCount=t.sora2_remaining_count!==undefined&&t.sora2_remaining_count!==null?t.sora2_remaining_count:'-';const statusText=t.is_expired?'已过期':(t.is_active?'活跃':'禁用');const statusClass=t.is_expired?'bg-gray-100 text-gray-700':(t.is_active?'bg-green-50 text-green-700':'bg-gray-100 text-gray-700');return`${t.email}${statusText}${formatClientId(t.client_id)}${formatExpiry(t.expiry_time)}${formatPlanTypeWithTooltip(t)}${remainingCount}${imageDisplay}${videoDisplay}${t.error_count||0}${t.remark||'-'}`}).join('');renderPagination()}, refreshTokens=async()=>{await loadTokens();await loadStats()}, changePage=(page)=>{currentPage=page;renderTokens()}, changePageSize=(size)=>{pageSize=parseInt(size);currentPage=1;renderTokens()},