import{i as y,c as d}from"./app-DckefXYL.js";import{_ as k}from"./app-gVd4RIjO.js";import{_ as h}from"./app-MnSDCF4P.js";import{_ as x,a as f}from"./app-DntYVxd7.js";import{_ as T}from"./app-DFWP-E91.js";import{_ as R}from"./app-COct4tsy.js";import{T as $}from"./app-LqsmzyUT.js";import{D as B}from"./app-Cx7ENVlu.js";import{r as g,o as a,g as u,b as o,u as t,w as i,F as b,a as s,f as n,h as r,t as l,c as p}from"./app-DnroACXc.js";import"./app-C9iVkiu5.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-B0NrURRk.js";import"./app-Co2SIBzr.js";import"./app-CUPmXIij.js";import"./app-Cu6FD8m8.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-xECxwo4T.js";function q(){y(this),this.keyType="key",this.success=this.$NotifyReloadSuccess("任务提交成功"),this.$delay(function(){this.$refs.keysBox.focus(),this.$watch(()=>this.keyType,function(){setTimeout(()=>{this.$refs.keysBox.focus()})})}),this.isRequesting=!1,this.before=function(){this.isRequesting=!0},this.done=function(){this.isRequesting=!1}}const V=s("div",null,[s("span",{class:"grey"},"刷新缓存指的是标记URL列表或目录为失效状态，当有新的用户请求这些URL时，会再次从源站读取最新的内容。")],-1),w=s("td",{class:"title"},"刷新类型 *",-1),D={key:0},L={key:1},U={class:"comment"},N={key:0},ae={__name:"index",setup(v){const c=g(),e=d(new q,{refs:{keysBox:c}});return(C,m)=>(a(),u(b,null,[o(k,{ctx:t(e),"active-tab":"purge"},null,8,["ctx"]),V,o(h,{action:"$",onSuccess:t(e).success,onBefore:t(e).before,onDone:t(e).done,class:"mt-4"},{default:i(()=>[o(B,null,{default:i(()=>[s("tbody",null,[s("tr",null,[w,s("td",null,[o(x,{name:"keyType",modelValue:t(e).keyType,"onUpdate:modelValue":m[0]||(m[0]=_=>t(e).keyType=_)},{default:i(()=>[o(f,{value:"key"},{default:i(()=>[n("URL")]),_:1}),o(f,{value:"prefix"},{default:i(()=>[n("目录")]),_:1})]),_:1},8,["modelValue"])])]),s("tr",null,[s("td",null,[t(e).keyType=="key"?(a(),u("span",D,"URL列表 *")):r("",!0),t(e).keyType=="prefix"?(a(),u("span",L,"目录列表 *")):r("",!0)]),s("td",null,[o(T,{rows:"20",name:"urlList",ref_key:"keysBox",ref:c,class:"w-full"},null,512),s("p",U,[n("每行一条，每次最多提交"+l(t(e).maxKeysPerTask)+"个URL，每天最多提交"+l(t(e).maxKeysPerDay)+"个",1),t(e).quotaKeysToday>0?(a(),u("span",N,"，今日剩余"+l(t(e).quotaKeysToday)+"个",1)):r("",!0),n("。 ")])])])])]),_:1}),t(e).isRequesting?r("",!0):(a(),p(R,{key:0},{default:i(()=>[n("刷新缓存")]),_:1})),t(e).isRequesting?(a(),p($,{key:1,disabled:"",type:"button"},{default:i(()=>[n("处理中...")]),_:1})):r("",!0)]),_:1},8,["onSuccess","onBefore","onDone"])],64))}};export{ae as default};
