"use strict";(globalThis["webpackChunkadmin_panel_vue_webclient"]=globalThis["webpackChunkadmin_panel_vue_webclient"]||[]).push([[6747],{16747:(e,s,t)=>{t.r(s),t.d(s,{default:()=>B});var o=t(61758),l=t(58790);const a={class:"q-pa-lg"},r={class:"row q-mb-md"},i={class:"col text-h5"},n={class:"row q-mb-md"},d={class:"col-2 q-mt-sm"},p={class:"col-5 textarea"},u={class:"row q-mb-md"},h=(0,o.Lk)("div",{class:"col-2"},null,-1),S={class:"col-8"},c={class:"row"},A={class:"col-2 q-mt-sm"},v={class:"col-5"},L={class:"col-1 q-mt-sm q-pl-md"},g={class:"col-1"},m={class:"q-pt-md text-right"};function E(e,s,t,E,P,b){const _=(0,o.g2)("q-input"),I=(0,o.g2)("q-item-label"),R=(0,o.g2)("q-card-section"),k=(0,o.g2)("q-card"),N=(0,o.g2)("q-btn"),C=(0,o.g2)("q-linear-progress"),T=(0,o.g2)("q-inner-loading"),q=(0,o.g2)("q-scroll-area"),O=(0,o.gN)("t");return(0,o.uX)(),(0,o.Wv)(q,{class:"full-height full-width"},{default:(0,o.k6)((()=>[(0,o.Lk)("div",a,[(0,o.Lk)("div",r,[(0,o.bo)((0,o.Lk)("div",i,null,512),[[O,"MAILCHANGEPASSWORDPOPPASSDPLUGIN.HEADING_SETTINGS_TAB"]])]),(0,o.bF)(k,{flat:"",bordered:"",class:"card-edit-settings"},{default:(0,o.k6)((()=>[(0,o.bF)(R,null,{default:(0,o.k6)((()=>[(0,o.Lk)("div",n,[(0,o.bo)((0,o.Lk)("div",d,null,512),[[O,"MAILCHANGEPASSWORDPOPPASSDPLUGIN.LABEL_MAIL_SERVERS"]]),(0,o.Lk)("div",p,[(0,o.bF)(_,{outlined:"",dense:"","bg-color":"white",type:"textarea",modelValue:P.supportedServers,"onUpdate:modelValue":s[0]||(s[0]=e=>P.supportedServers=e)},null,8,["modelValue"])])]),(0,o.Lk)("div",u,[h,(0,o.Lk)("div",S,[(0,o.bF)(I,{caption:""},{default:(0,o.k6)((()=>[(0,o.eW)((0,l.v_)(e.$t("MAILCHANGEPASSWORDPOPPASSDPLUGIN.LABEL_HINT_MAIL_SERVERS")),1)])),_:1})])]),(0,o.Lk)("div",c,[(0,o.bo)((0,o.Lk)("div",A,null,512),[[O,"MAILCHANGEPASSWORDPOPPASSDPLUGIN.LABEL_HOST"]]),(0,o.Lk)("div",v,[(0,o.bF)(_,{outlined:"",dense:"","bg-color":"white",modelValue:P.host,"onUpdate:modelValue":s[1]||(s[1]=e=>P.host=e)},null,8,["modelValue"])]),(0,o.bo)((0,o.Lk)("div",L,null,512),[[O,"MAILCHANGEPASSWORDPOPPASSDPLUGIN.LABEL_PORT"]]),(0,o.Lk)("div",g,[(0,o.bF)(_,{outlined:"",dense:"","bg-color":"white",modelValue:P.port,"onUpdate:modelValue":s[2]||(s[2]=e=>P.port=e)},null,8,["modelValue"])])])])),_:1})])),_:1}),(0,o.Lk)("div",m,[(0,o.bF)(N,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",label:e.$t("COREWEBCLIENT.ACTION_SAVE"),onClick:b.save},null,8,["label","onClick"])])]),(0,o.bF)(T,{style:{"justify-content":"flex-start"},showing:P.saving},{default:(0,o.k6)((()=>[(0,o.bF)(C,{query:""})])),_:1},8,["showing"])])),_:1})}var P=t(36720),b=t(38176),_=t(79134),I=t(14967);const R={name:"PoppassdAdminSettings",mounted(){this.populate()},data(){return{host:"",port:"",supportedServers:"",saving:!1}},beforeRouteLeave(e,s,t){this.$root.doBeforeRouteLeave(e,s,t)},methods:{hasChanges(){const e=I.A.getPoppassdSettings();return this.supportedServers!==e.supportedServers||this.host!==e.host||this.port!==e.port},revertChanges(){this.populate()},populate(){const e=I.A.getPoppassdSettings();this.supportedServers=e.supportedServers,this.host=e.host,this.port=e.port},save(){if(!this.saving){this.saving=!0;const e={SupportedServers:this.supportedServers,Host:this.host,Port:this.port};_.A.sendRequest({moduleName:"MailChangePasswordPoppassdPlugin",methodName:"UpdateSettings",parameters:e}).then((e=>{this.saving=!1,!0===e?(I.A.savePoppassdSettings({supportedServers:this.supportedServers,host:this.host,port:this.port}),this.populate(),b.A.showReport(this.$t("COREWEBCLIENT.REPORT_SETTINGS_UPDATE_SUCCESS"))):b.A.showError(this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED"))}),(e=>{this.saving=!1,b.A.showError(P.A.getTextFromResponse(e,this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED")))}))}}}};var k=t(12807),N=t(48958),C=t(23316),T=t(44189),q=t(39270),O=t(13796),w=t(56384),G=t(39035),f=t(35859),D=t(98582),V=t.n(D);const F=(0,k.A)(R,[["render",E]]),B=F;V()(R,"components",{QScrollArea:N.A,QCard:C.A,QCardSection:T.A,QInput:q.A,QItemLabel:O.A,QBtn:w.A,QInnerLoading:G.A,QLinearProgress:f.A})}}]);