"use strict";(self["webpackChunklinker_web"]=self["webpackChunklinker_web"]||[]).push([[76],{6271:function(e,t,n){n.d(t,{A:function(){return y}});var a=n(6768),s=n(4232);const o={class:"flex"},c={class:"flex-1"},l={class:"t-c"};function r(e,t,n,r,d,i){const u=(0,a.g2)("Sync"),m=(0,a.g2)("el-input"),h=(0,a.g2)("el-button"),v=(0,a.g2)("el-card"),f=(0,a.gN)("trim");return(0,a.uX)(),(0,a.Wv)(v,{shadow:"never"},{header:(0,a.k6)((()=>[(0,a.Lk)("div",o,[(0,a.Lk)("span",c,(0,s.v_)(e.$t("action.text")),1),r.state.isSelf?((0,a.uX)(),(0,a.Wv)(u,{key:0,name:"ActionStatic"})):(0,a.Q3)("",!0)])])),footer:(0,a.k6)((()=>[(0,a.Lk)("div",l,[(0,a.bF)(h,{type:"success",onClick:r.handleSave},{default:(0,a.k6)((()=>[(0,a.eW)((0,s.v_)(e.$t("common.confirm")),1)])),_:1},8,["onClick"])])])),default:(0,a.k6)((()=>[(0,a.Lk)("div",null,[(0,a.bo)((0,a.bF)(m,{modelValue:r.state.data,"onUpdate:modelValue":t[0]||(t[0]=e=>r.state.data=e),rows:10,type:"textarea",resize:"none",onChange:r.handleSave},null,8,["modelValue","onChange"]),[[f]])])])),_:1})}var d=n(4);const i=e=>(0,d.zG)("action/GetServerArgs",e),u=e=>(0,d.zG)("action/SetServerArgs",e);var m=n(3830),h=n(1219),v=n(144),f=n(5931),k=n(2322),p={props:["machineId"],components:{Sync:k.A},setup(e){const{t:t}=(0,f.s9)(),n=(0,m.B)(),s=(0,v.Kh)({data:"",machineId:e.machineId||n.value.config.Client.Id,isSelf:(0,a.EW)((()=>s.machineId==n.value.config.Client.Id))}),o=()=>{i(s.machineId).then((e=>{s.data=e}))},c=()=>{try{if(s.data&&"object"!=typeof JSON.parse(s.data))return void h.nk.error(t("action.jsonError"))}catch(e){return void h.nk.error(t("action.jsonError"))}u({Key:s.machineId,Value:s.data}).then((()=>{h.nk.success(t("common.oper"))})).catch((e=>{console.log(e),h.nk.error(t("common.operFail"))}))};return(0,a.sV)((()=>{o()})),{state:s,handleSave:c}}},g=n(1241);const I=(0,g.A)(p,[["render",r]]);var y=I},2322:function(e,t,n){n.d(t,{A:function(){return I}});var a=n(6768),s=n(4232);const o={class:"t-c"},c={class:"t-c w-100 mgt-1"};function l(e,t,n,l,r,d){const i=(0,a.g2)("Share"),u=(0,a.g2)("el-icon"),m=(0,a.g2)("el-button"),h=(0,a.g2)("el-transfer"),v=(0,a.g2)("el-dialog"),f=(0,a.g2)("AccessBoolean");return(0,a.uX)(),(0,a.Wv)(f,{value:"Sync"},{default:(0,a.k6)((({values:n})=>[(0,a.Lk)("div",null,[(0,a.RG)(e.$slots,"default",{},(()=>[(0,a.bF)(m,{class:"btn",size:"small",onClick:e=>l.handleShowSync(n)},{default:(0,a.k6)((()=>[(0,a.bF)(u,null,{default:(0,a.k6)((()=>[(0,a.bF)(i)])),_:1})])),_:2},1032,["onClick"])])),(0,a.bF)(v,{class:"options-center",title:e.$t("server.sync"),"destroy-on-close":"",modelValue:l.state.showNames,"onUpdate:modelValue":t[2]||(t[2]=e=>l.state.showNames=e),width:"54rem",top:"2vh"},{default:(0,a.k6)((()=>[(0,a.Lk)("div",null,[(0,a.Lk)("div",o,(0,s.v_)(`${e.$t("server.sync")}【${e.$t(`server.async${l.state.name}`)}】${e.$t("server.asyncText")}`),1),(0,a.bF)(h,{class:"src-tranfer mgt-1",modelValue:l.state.srcIdValues,"onUpdate:modelValue":t[0]||(t[0]=e=>l.state.srcIdValues=e),filterable:"","filter-method":l.srcFilterMethod,data:l.state.srcIds,titles:[e.$t("firewall.unselect"),e.$t("firewall.selected")],props:{key:"MachineId",label:"MachineName"}},null,8,["modelValue","filter-method","data","titles"]),(0,a.Lk)("div",c,[(0,a.bF)(m,{onClick:t[1]||(t[1]=e=>l.state.showNames=!1)},{default:(0,a.k6)((()=>[(0,a.eW)((0,s.v_)(e.$t("common.cancel")),1)])),_:1}),(0,a.bF)(m,{type:"primary",onClick:l.handleConfirm},{default:(0,a.k6)((()=>[(0,a.eW)((0,s.v_)(e.$t("common.confirm")),1)])),_:1},8,["onClick"])])])])),_:1},8,["title","modelValue"])])])),_:3})}var r=n(9299),d=n(4);const i=e=>(0,d.zG)("sync/Sync",e);var u=n(3830),m=n(7477),h=n(1219),v=n(144),f=n(5931),k={props:["name"],components:{Share:m.SYj},setup(e){const{t:t}=(0,f.s9)(),n=((0,u.B)(),(0,v.Kh)({name:e.name,loading:!1,showNames:!1,srcIdValues:[],srcIds:[]})),a=()=>{i({names:[e.name],ids:n.srcIdValues}).then((e=>{h.nk.success(t("common.oper")),n.showNames=!1}))},s=e=>{e.Sync?(n.showNames=!0,o()):h.nk.success(t("common.access"))},o=()=>{n.loading=!0,(0,r.NT)().then((e=>{n.loading=!1,n.srcIds=e})).catch((e=>{n.loading=!1}))},c=(e,t)=>t.MachineName.toLowerCase().includes(e.toLowerCase());return{state:n,handleShowSync:s,srcFilterMethod:c,handleConfirm:a}}},p=n(1241);const g=(0,p.A)(k,[["render",l]]);var I=g},4076:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}});var a=n(6768);const s={class:"action-wrap"};function o(e,t,n,o,c,l){const r=(0,a.g2)("Action");return(0,a.uX)(),(0,a.CE)("div",s,[(0,a.bF)(r,{machineId:o.state.machineId},null,8,["machineId"])])}var c=n(144),l=n(6271),r={props:["machineId"],components:{Action:l.A},setup(e){const t=(0,c.Kh)({machineId:e.machineId});return{state:t}}},d=n(1241);const i=(0,d.A)(r,[["render",o],["__scopeId","data-v-768e8d60"]]);var u=i}}]);