import{_ as t}from"./index.js?v=1753954525509";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{Q as e,ad as s,m as l,ae as c,o as n,af as o,e as i}from"./page_layout.js?v=1753954525509";import{k as u,$ as r,U as p,V as d,Q as _,a2 as m,W as f,a3 as v,X as x,j as S,P as b,r as P,a1 as w,H as y,ah as $}from"./vue.js?v=1753954525509";import{d as g}from"./public.js?v=1753954525509";import{_ as k}from"./index100.js?v=1753954525509";import{bY as C,ay as j,cD as h,cA as A,aq as I}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const R={class:"p-10"},U={class:"w-48%"},B={class:"mb-8px"},L={class:"w-48%"},M={class:"mb-8px"},z=u({__name:"SslForm",setup(t){const a=e(),{certInfo:l}=r(a);return(t,a)=>{const e=k,c=C,n=j;return p(),d("div",R,[_(c,{class:"mb-16px",size:10,justify:"space-between"},{default:m((()=>[f("div",U,[f("div",B,v(t.$t("Site.Cert.index_50")),1),_(e,{value:x(l).private_key,"onUpdate:value":a[0]||(a[0]=t=>x(l).private_key=t),rows:10},null,8,["value"])]),f("div",L,[f("div",M,v(t.$t("Site.Cert.index_51")),1),_(e,{value:x(l).certificate,"onUpdate:value":a[1]||(a[1]=t=>x(l).certificate=t),rows:10},null,8,["value"])])])),_:1}),_(c,{class:"mb-12px"},{default:m((()=>[_(n,{type:"primary",onClick:a[2]||(a[2]=t=>x(s)(x(l).certificate,x(l).private_key))},{default:m((()=>[S(v(t.$t("Public.Btn.Save")),1)])),_:1})])),_:1})])}}}),H={class:"flex items-center"},Q={class:"mr-4px text-13px"},q={class:"mr-4px"},D={class:"w-300px host-modify"},E=i(u({__name:"index",setup(s){const{t:i}=b(),u=e(),{isRunning:d,serverIP:k,serverProtocol:R,serverPort:U}=r(u),B=P(!1),L=new Map([["start",i("Public.Status.Start")],["stop",i("Public.Status.Stop")],["reload",i("Public.Status.Reload")],["restart",i("Public.Status.Restart")]]),M=t=>{const a=L.get(t)||"";g({title:i("Account.Settings.index_11",[a]),content:i("Account.Settings.index_12",[a.toLocaleLowerCase()]),onConfirm:async()=>{await o(t),u.getInfo()}})},E=()=>{M(d.value?"stop":"start")},F=()=>{M("reload")},V=()=>{M("restart")},W=async()=>{""!==k.value?await c(k.value):l.error(i("Account.Settings.index_13"))},X=()=>{u.resetServerIP()};function Y(){window.open("".concat(R.value,"://").concat(k.value).concat(U.value,"/account/login"))}return u.getCertInfo(),u.getServerIP(),(e,s)=>{const l=C,c=j,o=A,i=I,u=n,r=a,b=t,P=h;return p(),w(P,{class:"p-16px px-24px"},{default:m((()=>[_(r,null,{default:m((()=>[_(o,{label:e.$t("Account.Settings.index_14")},{default:m((()=>[f("div",H,[f("span",Q,v(e.$t("Account.Settings.index_10")),1),_(l,{class:"items-center",size:4},{default:m((()=>[f("span",q,v(x(d)?e.$t("Public.Status.Enable"):e.$t("Public.Status.Stopped")),1),f("span",{class:y(["iconfont","icon-".concat(x(d)?"start":"stop")])},null,2)])),_:1})]),_(c,{class:"ml-24px",onClick:E},{default:m((()=>[S(v(x(d)?e.$t("Public.Status.Stop"):e.$t("Public.Status.Start")),1)])),_:1}),_(c,{class:"ml-8px",onClick:V},{default:m((()=>[S(v(e.$t("Public.Status.Restart")),1)])),_:1}),_(c,{class:"ml-8px",onClick:F},{default:m((()=>[S(v(e.$t("Public.Status.Reload")),1)])),_:1})])),_:1},8,["label"]),_(o,{label:"SSL"},{default:m((()=>[_(c,{type:"primary",onClick:s[0]||(s[0]=t=>B.value=!0)},{default:m((()=>[S(v(e.$t("Public.Btn.Modify")),1)])),_:1})])),_:1}),_(o,{label:e.$t("Account.Settings.index_15"),"show-feedback":!1},{default:m((()=>[f("div",D,[_(i,{value:x(k),"onUpdate:value":s[1]||(s[1]=t=>$(k)?k.value=t:null),placeholder:""},null,8,["value"])]),_(c,{type:"primary",class:"ml-8px",onClick:W},{default:m((()=>[S(v(e.$t("Public.Btn.Modify")),1)])),_:1}),_(c,{class:"ml-8px",onClick:X},{default:m((()=>[S(v(e.$t("Public.Btn.Reset")),1)])),_:1})])),_:1},8,["label"]),_(o,{label:" ","show-feedback":!1},{default:m((()=>[f("div",null,[S(v(e.$t("Account.Settings.index_9"))+" ",1),_(u,{onClick:Y},{default:m((()=>[S(v("".concat(x(R),"://").concat(x(k)).concat(x(U),"/account/login")),1)])),_:1})])])),_:1})])),_:1}),_(b,{show:x(B),"onUpdate:show":s[2]||(s[2]=t=>$(B)?B.value=t:null),title:e.$t("Account.Settings.index_16"),width:700,component:z},null,8,["show","title"])])),_:1})}}}),[["__scopeId","data-v-2c8a4053"]]);export{E as default};
