"use strict";(self["webpackChunklinker_web"]=self["webpackChunklinker_web"]||[]).push([[806],{23035:function(e,t,n){n.d(t,{A:function(){return w}});var a=n(56768),s=n(24232);const o={class:"flex"},c={class:"flex-1"},r={class:"t-c"};function l(e,t,n,l,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");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),l.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",r,[(0,a.bF)(h,{type:"success",onClick:l.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.bF)(m,{modelValue:l.state.data,"onUpdate:modelValue":t[0]||(t[0]=e=>l.state.data=e),rows:10,type:"textarea",resize:"none",onChange:l.handleSave},null,8,["modelValue","onChange"])])])),_:1})}var d=n(10004);const i=e=>(0,d.zG)("action/GetServerArgs",e),u=e=>(0,d.zG)("action/SetServerArgs",e);var m=n(53830),h=n(51219),v=n(90144),f=n(35931),k=n(62118),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(71241);const I=(0,g.A)(p,[["render",l]]);var w=I},29806:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}});var a=n(56768);const s={class:"action-wrap"};function o(e,t,n,o,c,r){const l=(0,a.g2)("Action");return(0,a.uX)(),(0,a.CE)("div",s,[(0,a.bF)(l,{machineId:o.state.machineId},null,8,["machineId"])])}var c=n(90144),r=n(23035),l={props:["machineId"],components:{Action:r.A},setup(e){const t=(0,c.Kh)({machineId:e.machineId});return{state:t}}},d=n(71241);const i=(0,d.A)(l,[["render",o],["__scopeId","data-v-4c3921a4"]]);var u=i},62118:function(e,t,n){n.d(t,{A:function(){return I}});var a=n(56768),s=n(24232);const o={class:"t-c"},c={class:"t-c w-100 mgt-1"};function r(e,t,n,r,l,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");return(0,a.uX)(),(0,a.CE)("div",null,[(0,a.RG)(e.$slots,"default",{},(()=>[(0,a.bF)(m,{class:"btn",size:"small",onClick:r.handleShowSync},{default:(0,a.k6)((()=>[(0,a.bF)(u,null,{default:(0,a.k6)((()=>[(0,a.bF)(i)])),_:1})])),_:1},8,["onClick"])])),(0,a.bF)(v,{class:"options-center",title:e.$t("server.sync"),"destroy-on-close":"",modelValue:r.state.showNames,"onUpdate:modelValue":t[2]||(t[2]=e=>r.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${r.state.name}`)}】${e.$t("server.asyncText")}`),1),(0,a.bF)(h,{class:"src-tranfer mgt-1",modelValue:r.state.srcIdValues,"onUpdate:modelValue":t[0]||(t[0]=e=>r.state.srcIdValues=e),filterable:"","filter-method":r.srcFilterMethod,data:r.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=>r.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:r.handleConfirm},{default:(0,a.k6)((()=>[(0,a.eW)((0,s.v_)(e.$t("common.confirm")),1)])),_:1},8,["onClick"])])])])),_:1},8,["title","modelValue"])])}var l=n(69299),d=n(10004);const i=e=>(0,d.zG)("sync/Sync",e);var u=n(53830),m=n(57477),h=n(51219),v=n(90144),f=n(35931),k={props:["name"],components:{Share:m.SYj},setup(e){const{t:t}=(0,f.s9)(),n=(0,u.B)(),s=(0,a.EW)((()=>n.value.hasAccess("Sync"))),o=(0,v.Kh)({name:e.name,loading:!1,showNames:!1,srcIdValues:[],srcIds:[]}),c=()=>{i({names:[e.name],ids:o.srcIdValues}).then((e=>{h.nk.success(t("common.oper")),o.showNames=!1}))},r=()=>{s.value?(o.showNames=!0,d()):h.nk.success(t("common.access"))},d=()=>{o.loading=!0,(0,l.NT)().then((e=>{o.loading=!1,o.srcIds=e})).catch((e=>{o.loading=!1}))},m=(e,t)=>t.MachineName.toLowerCase().includes(e.toLowerCase());return{state:o,handleShowSync:r,srcFilterMethod:m,handleConfirm:c}}},p=n(71241);const g=(0,p.A)(k,[["render",r]]);var I=g}}]);