import{i as o}from"./http-6b833e16.js";import{r as u,o as l,c,a as e,t as n,u as i,b as d,F as h}from"./app-211db244.js";const p=e("div",null,[e("h3",null,"欢迎")],-1),k={class:"mt-3"},f={key:0,class:"mt-3"},v=e("h3",null,"实名认证",-1),b=e("p",null," 注意，您没有完成实名认证，请点击下方按钮完成实名认证，否则您只能使用中国大陆以外的隧道。 ",-1),g=e("a",{class:"btn btn-primary",target:"_blank",href:"https://oauth.laecloud.com/real_name"},"实名认证",-1),y=e("h3",null,"访问密钥",-1),x={class:"mt-3"},B={key:0,class:"text-success"},A={name:"Index",setup(T){const r=window.Base.SiteName,s=u({name:"loading...",traffic:""}),a=u("");o.get("user").then(t=>{s.value=t.data});function _(){o.post("tokens").then(t=>{a.value=t.data.token})}function m(){o.delete("tokens").then(t=>{alert("所有 Token 删除成功。")})}return(t,w)=>(l(),c(h,null,[p,e("div",k,[e("p",null,"用户名: "+n(s.value.name),1),e("p",null,"剩余流量: "+n(s.value.traffic)+" GB",1)]),s.value.realnamed?d("",!0):(l(),c("div",f,[v,b,g,e("p",null,"在实名认证后，请重新登录 "+n(i(r))+"。",1)])),y,e("div",x,[e("p",null," 访问密钥是用于访问 "+n(i(r))+" API 的密钥，您可以使用它来开发自己的客户端。 ",1),a.value?(l(),c("p",B,"获取成功，请妥善保管您的 Token: "+n(a.value),1)):d("",!0),e("button",{class:"btn btn-primary",onClick:_}," 获取新密钥 "),e("button",{class:"btn btn-danger",style:{"margin-left":"5px"},onClick:m}," 删除所有密钥 ")])],64))}};export{A as default};
