mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 20:15:22 +00:00
chore: update frontend build for v1.1.107 [skip ci]
This commit is contained in:
1
web/admin-spa/dist/assets/WindowCountdown-RaAYa1A3.js
vendored
Normal file
1
web/admin-spa/dist/assets/WindowCountdown-RaAYa1A3.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{r as N,c as y,o as x,q as R,V as C,x as i,y as o,z as n,L as f,P as l,O as w,B as k,C as b}from"./vue-vendor-DfnFpxGJ.js";const $={class:"space-y-1"},P={class:"flex items-center justify-between text-xs"},B={class:"text-gray-500"},E={key:0,class:"font-medium text-gray-700"},I={key:1,class:"font-medium text-orange-600"},V={key:2,class:"font-medium text-gray-500"},j={key:3,class:"font-medium text-gray-400"},z={key:0,class:"space-y-0.5"},D={key:0,class:"space-y-0.5"},W={class:"flex items-center justify-between text-xs"},F={class:"text-gray-600"},K={class:"h-1 w-full rounded-full bg-gray-200"},O={key:1,class:"space-y-0.5"},U={class:"flex items-center justify-between text-xs"},A={class:"text-gray-600"},G={class:"h-1 w-full rounded-full bg-gray-200"},H={key:1,class:"text-xs text-gray-500"},J={key:0},Q={key:1},X={key:2},Z={__name:"WindowCountdown",props:{label:{type:String,default:"窗口限制"},rateLimitWindow:{type:Number,required:!0},windowStartTime:{type:Number,default:null},windowEndTime:{type:Number,default:null},windowRemainingSeconds:{type:Number,default:null},currentRequests:{type:Number,default:0},requestLimit:{type:Number,default:0},currentTokens:{type:Number,default:0},tokenLimit:{type:Number,default:0},showProgress:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!1}},setup(a){const s=a,r=N(s.windowRemainingSeconds);let u=null;const c=y(()=>s.windowStartTime===null?"notStarted":r.value===0?"expired":r.value>0?"active":"unknown"),T=y(()=>s.requestLimit>0),_=y(()=>s.tokenLimit>0),L=e=>{if(e==null)return"--:--";const t=Math.floor(e/3600),d=Math.floor(e%3600/60),p=e%60;return t>0?`${t}h ${d}m`:d>0?`${d}m ${p}s`:`${p}s`},q=e=>{const t=Math.floor(e/3600),d=Math.floor(e%3600/60);return t>0?`${t}小时${d}分钟`:`${d}分钟`},g=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toString(),v=()=>{if(!s.requestLimit||s.requestLimit===0)return 0;const e=(s.currentRequests||0)/s.requestLimit*100;return Math.min(e,100)},S=()=>{const e=v();return e>=100?"bg-red-500":e>=80?"bg-yellow-500":"bg-blue-500"},h=()=>{if(!s.tokenLimit||s.tokenLimit===0)return 0;const e=(s.currentTokens||0)/s.tokenLimit*100;return Math.min(e,100)},M=()=>{const e=h();return e>=100?"bg-red-500":e>=80?"bg-yellow-500":"bg-purple-500"},m=()=>{if(s.windowEndTime&&r.value>0){const e=Date.now(),t=Math.max(0,Math.floor((s.windowEndTime-e)/1e3));r.value=t,t===0&&u&&(clearInterval(u),u=null)}};return x(()=>s.windowRemainingSeconds,e=>{r.value=e}),x(()=>s.windowEndTime,e=>{e&&(m(),!u&&r.value>0&&(u=setInterval(m,1e3)))}),R(()=>{s.windowEndTime&&r.value>0&&(m(),u=setInterval(m,1e3))}),C(()=>{u&&clearInterval(u)}),(e,t)=>(o(),i("div",$,[n("div",P,[n("span",B,l(a.label),1),c.value==="active"?(o(),i("span",E,[t[0]||(t[0]=n("i",{class:"fas fa-clock mr-1 text-blue-500"},null,-1)),w(" "+l(L(r.value)),1)])):c.value==="expired"?(o(),i("span",I,t[1]||(t[1]=[n("i",{class:"fas fa-sync-alt mr-1"},null,-1),w(" 窗口已过期 ",-1)]))):c.value==="notStarted"?(o(),i("span",V,t[2]||(t[2]=[n("i",{class:"fas fa-pause-circle mr-1"},null,-1),w(" 窗口未激活 ",-1)]))):(o(),i("span",j,l(a.rateLimitWindow)+" 分钟 ",1))]),a.showProgress?(o(),i("div",z,[T.value?(o(),i("div",D,[n("div",W,[t[3]||(t[3]=n("span",{class:"text-gray-400"},"请求",-1)),n("span",F,l(a.currentRequests||0)+"/"+l(a.requestLimit),1)]),n("div",K,[n("div",{class:b(["h-1 rounded-full transition-all duration-300",S()]),style:k({width:v()+"%"})},null,6)])])):f("",!0),_.value?(o(),i("div",O,[n("div",U,[t[4]||(t[4]=n("span",{class:"text-gray-400"},"Token",-1)),n("span",A,l(g(a.currentTokens||0))+"/"+l(g(a.tokenLimit)),1)]),n("div",G,[n("div",{class:b(["h-1 rounded-full transition-all duration-300",M()]),style:k({width:h()+"%"})},null,6)])])):f("",!0)])):f("",!0),c.value==="active"&&a.showTooltip?(o(),i("div",H,[t[5]||(t[5]=n("i",{class:"fas fa-info-circle mr-1"},null,-1)),r.value<60?(o(),i("span",J,"即将重置")):r.value<300?(o(),i("span",Q,l(Math.ceil(r.value/60))+" 分钟后重置",1)):(o(),i("span",X,l(q(r.value))+"后重置",1))])):f("",!0)]))}};export{Z as _};
|
||||
Reference in New Issue
Block a user