3 lines
4.9 KiB
JavaScript
3 lines
4.9 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/set-ttl-CqRPhGQw.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","js/utils-DELCcnjr.js?v=1773287522785","js/ssl-Bm8jcneQ.js?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/index-S15tYq5l.js?v=1773287522785"])))=>i.map(i=>d[i]);
|
||
|
|
import{t as v,a as _,u as D,v as x,w as C,x as M,r as P}from"./ssl-Bm8jcneQ.js?v=1773287522785";import{i as m,m as b,h as d,a3 as N,p as w,P as I,au as T}from"./index-BTglIPU2.js?v=1773287522785";import{a4 as A,r,k as R,R as k,w as L,o as B,K as F,$ as j,Z as O,S as K,n as E,a0 as a,j as H,F as y,u as U,a3 as V}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{k as h,a3 as $,a4 as g,a6 as W}from"./naive-ui--dJnpVcV.js?v=1773287522785";const te=A("ssl",()=>{const e=r(!0),n=r(!0);return{dnsInstall:e,dnsStatus:n,getDNSStatus:async()=>{const{message:o}=await v();m(o)&&(n.value=o.status,e.value=o.service==="pdns")}}}),Z=["innerHTML"],z=R({__name:"index",props:{path:{type:String,default:"/www/server/panel/logs/letsencrypt.log"},callBack:{type:Function,default:()=>{}}},emits:["close"],setup(e,{emit:n}){const s=r("Please wait..."),o=r(null),{t:i}=k(),u=e,c=n,p=async()=>{const{message:l}=await _({path:u.path});m(l)&&(s.value=l.data?l.data:"None",l.data.includes("YakPanelDns Service Success!")&&(b.success(i("Waf.Block.index_75")),u.callBack(),c("close")))};p();const S=()=>{const l=o.value;l&&(l.scrollTop=l.scrollHeight)};L(s,async()=>{await E(),S()});let f=null;return B(()=>{f=setInterval(()=>{p()},1e3)}),F(()=>{f&&clearInterval(f)}),(l,J)=>(j(),O("pre",{ref_key:"logRef",ref:o,innerHTML:K(s),class:"h-full overflow-auto bg-black text-white p-10px whitespace-pre-wrap"},null,8,Z))}});function q(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!U(e)}const{t}=N.global,ae=async()=>{const e=r("none"),n=[{label:t("Accept all emails"),value:"none"},{label:t("Reject all emails"),value:"reject"}];d({width:500,title:t("Confirm Applying DMARC Policy?"),content:()=>a(y,null,[a("p",null,[t("Enabling this feature will create DMARCDNS records for all domains. If a domain already has a DMARC record, the system will not modify the existing record.")]),a(h,{class:"items-center flex-nowrap! mt-10px"},{default:()=>[a("span",{class:"whitespace-nowrap"},[t("Policy:")]),a(W,{class:"w-320px",value:e.value,"onUpdate:value":s=>e.value=s,options:n,placeholder:t("Select DMARC Policy"),consistentMenuWidth:!1},null)]})]),onConfirm:async()=>{await x({policy:e.value})}})},ne=async()=>{d({width:400,title:t("Confirm DKIM/SPF Enabled?"),content:t("After enabling this feature, the system will create DKIM and SPF DNS records for the selected domain. If an SPF record already exists for a domain, the system will appropriately append the servers IP address to the existing record. However, the system will not modify any existing DKIM records. During this process, please do not edit any nameserver configuration files."),onConfirm:async()=>{await C()}})},se=async()=>{d({width:400,title:t("DNS Clear"),content:t("This program will clean up your name server configuration files and remove all duplicate entries. Please ensure that you do not edit any name server configuration files during the cleanup process."),onConfirm:async()=>{await M()}})},oe=async()=>{T({title:()=>a(h,{class:"items-center flex-nowrap!",size:5},{default:()=>[a("span",{class:"bg-#4caf50 inline-block w-25px h-25px flex items-center justify-center rounded-5px"},[a("i",{class:"i-soft-dns-icon text-18px text-white"},null)]),a("span",null,[t("DNS Manager")])]}),name:"pdns",admin:!0})},le=async(e,n)=>{const s=e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()+" "+t("Self-Built DNS"),o=t("Are you sure you want to {0} a self-built DNS server?",[e]),i=r(0),u=()=>{w({title:s,width:500,height:300,hideClose:!0,data:{path:"/www/server/panel/logs/install_pdns.log",callBack:()=>{n==null||n()}},component:z})};d({width:400,title:s,content:()=>{let c;return e==="install"?o:a(y,null,[a("p",null,[o]),a(h,{class:"items-center flex-nowrap! mt-10px"},{default:()=>[a("span",null,[t("Preserve config")]),a($,{value:i.value,"onUpdate:value":p=>i.value=p},{default:()=>[a(g,{value:0},q(c=t("Preserve"))?c:{default:()=>[c]}),a(g,{value:1},{default:()=>[H("Don't preserve")]})]})]})])},onConfirm:async()=>{await D({act:e,clean:i.value}),u()}})},G=r(!0),re=async()=>{const{message:e}=await P({act:"status
|