芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/adminpanel/js/3286.abb08e50.js
"use strict";(globalThis["webpackChunkadmin_panel_vue_webclient"]=globalThis["webpackChunkadmin_panel_vue_webclient"]||[]).push([[3286],{3286:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var n=s(9835),l=s(6970);const i={class:"q-pa-lg"},o={class:"row q-mb-md"},a={class:"col text-h5"},r={class:"row q-mb-lg"},E={class:"col-10"},L={class:"row q-mb-sm"},I={class:"col-2"},c={class:"col-5 q-ml-md textarea"},u={key:0,class:"row q-my-md"},N=["innerHTML"],C={key:1,class:"row q-my-md"},_=["innerHTML"],T={class:"row q-mb-md"},d={class:"col-2"},h={class:"col-5 q-ml-md"},p={class:"row"},m={class:"col-2"},g={class:"col-5 q-ml-md"},w={class:"q-pt-md text-right"};function y(e,t,s,y,S,R){const A=(0,n.up)("q-item-label"),B=(0,n.up)("q-input"),q=(0,n.up)("q-card-section"),v=(0,n.up)("q-card"),W=(0,n.up)("q-btn"),b=(0,n.up)("q-card-actions"),G=(0,n.up)("q-dialog"),f=(0,n.up)("q-linear-progress"),k=(0,n.up)("q-inner-loading"),U=(0,n.up)("q-scroll-area"),K=(0,n.Q2)("t"),Z=(0,n.Q2)("close-popup");return(0,n.wg)(),(0,n.j4)(U,{class:"full-height full-width"},{default:(0,n.w5)((()=>[(0,n._)("div",i,[(0,n._)("div",o,[(0,n._)("div",a,(0,l.zw)(e.$t("LICENSINGWEBCLIENT.HEADING_SETTINGS_TAB")),1)]),(0,n.Wm)(v,{flat:"",bordered:"",class:"card-edit-settings"},{default:(0,n.w5)((()=>[(0,n.Wm)(q,null,{default:(0,n.w5)((()=>[(0,n._)("div",r,[(0,n._)("div",E,[(0,n.Wm)(A,{caption:""},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.$t("LICENSINGWEBCLIENT.LABEL_LICENSING_HINT")),1)])),_:1})])]),(0,n._)("div",L,[(0,n._)("div",I,(0,l.zw)(e.$t("LICENSINGWEBCLIENT.LABEL_LICENSING_KEY")),1),(0,n._)("div",c,[(0,n.Wm)(B,{outlined:"",dense:"","bg-color":"white","input-class":"textarea",type:"textarea",modelValue:S.key,"onUpdate:modelValue":t[0]||(t[0]=e=>S.key=e)},null,8,["modelValue"])])]),S.showTrialKeyHint?((0,n.wg)(),(0,n.iD)("div",u,[(0,n.Wm)(A,{caption:""},{default:(0,n.w5)((()=>[(0,n._)("div",{class:"col-9",innerHTML:S.trialKeyHint},null,8,N)])),_:1})])):(0,n.kq)("",!0),""!==S.permanentKeyHint?((0,n.wg)(),(0,n.iD)("div",C,[(0,n.Wm)(A,{caption:""},{default:(0,n.w5)((()=>[(0,n._)("div",{class:"col-9",innerHTML:S.permanentKeyHint},null,8,_)])),_:1})])):(0,n.kq)("",!0),(0,n._)("div",T,[(0,n.wy)((0,n._)("div",d,null,512),[[K,"LICENSINGWEBCLIENT.LABEL_LICENSING_USERS_NUMBER"]]),(0,n._)("div",h,[(0,n._)("b",null,(0,l.zw)(S.userCount),1)])]),(0,n._)("div",p,[(0,n.wy)((0,n._)("div",m,null,512),[[K,"LICENSINGWEBCLIENT.LABEL_LICENSING_TYPE"]]),(0,n._)("div",g,[(0,n._)("b",null,(0,l.zw)(S.licenseType),1)])])])),_:1})])),_:1}),(0,n._)("div",w,[(0,n.Wm)(W,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",label:e.$t("COREWEBCLIENT.ACTION_SAVE"),onClick:R.save},null,8,["label","onClick"])])]),(0,n.Wm)(G,{modelValue:S.showDialog,"onUpdate:modelValue":t[1]||(t[1]=e=>S.showDialog=e)},{default:(0,n.w5)((()=>[(0,n.Wm)(v,null,{default:(0,n.w5)((()=>[(0,n.Wm)(q,null,{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.$t("LICENSINGWEBCLIENT.INFO_LICENSE_KEY_CHANGED")),1)])),_:1}),(0,n.Wm)(b,{align:"right"},{default:(0,n.w5)((()=>[(0,n.wy)((0,n.Wm)(W,{unelevated:"","no-caps":"",dense:"",ripple:!1,color:"primary",label:e.$t("COREWEBCLIENT.ACTION_OK"),onClick:R.reloadUI},null,8,["label","onClick"]),[[Z]])])),_:1})])),_:1})])),_:1},8,["modelValue"]),(0,n.Wm)(k,{style:{"justify-content":"flex-start"},showing:S.saving},{default:(0,n.w5)((()=>[(0,n.Wm)(f,{query:""})])),_:1},8,["showing"])])),_:1})}var S=s(9336),R=s(1427),A=s(2456),B=s(4952);const q={name:"Licensing",data(){return{key:"",userCount:0,saving:!1,licenseType:"",trialKeyHint:"",permanentKeyHint:"",showTrialKeyHint:!1,showDialog:!1,getLicenseInfoRequestController:null,getTotalUsersCountRequestController:null}},mounted(){this.abortRequestsControllers(),this.getLicenseInfoRequestController=new AbortController,this.getTotalUsersCountRequestController=new AbortController,this.getLicenseInfo(),this.getTotalUsersCount(),this.populate()},unmounted(){this.abortRequestsControllers()},beforeRouteLeave(e,t,s){this.$root.doBeforeRouteLeave(e,t,s)},methods:{abortRequestsControllers(){this.getLicenseInfoRequestController&&this.getLicenseInfoRequestController.abort(),this.getTotalUsersCountRequestController&&this.getTotalUsersCountRequestController.abort()},getLicenseInfo(){A.Z.sendRequest({moduleName:"Licensing",methodName:"GetLicenseInfo",signal:this.getLicenseInfoRequestController.signal}).then((e=>{if(e)switch(e.Type){case 0:this.licenseType=this.$t("LICENSINGWEBCLIENT.LABEL_TYPE_UNLIM");break;case 1:this.licenseType=this.$tc("LICENSINGWEBCLIENT.LABEL_TYPE_PERMANENT_PLURAL",e.Count,{COUNT:e.Count});break;case 2:this.licenseType=this.$tc("LICENSINGWEBCLIENT.LABEL_TYPE_DOMAINS_PLURAL",e.Count,{COUNT:e.Count});break;case 4:e.ExpiresIn<1&&(this.licenseType=this.$t("LICENSINGWEBCLIENT.LABEL_TYPE_OUTDATED_INFO"));break;case 3:case 10:this.licenseType=3===e.Type?this.$tc("LICENSINGWEBCLIENT.LABEL_TYPE_ANNUAL_PLURAL",e.Count,{COUNT:e.Count}):this.$t("LICENSINGWEBCLIENT.LABEL_TYPE_TRIAL"),"*"!==e.ExpiresIn&&(e.ExpiresIn>0?this.licenseType+=this.$tc("LICENSINGWEBCLIENT.LABEL_TYPE_EXPIRES_IN_PLURAL",e.ExpiresIn,{DAYS:e.ExpiresIn}):this.licenseType+=this.$t("LICENSINGWEBCLIENT.LABEL_TYPE_EXPIRED")+" "+this.$t("LICENSINGWEBCLIENT.LABEL_TYPE_OUTDATED_INFO"));break}else this.licenseType=this.$t("LICENSINGWEBCLIENT.LABEL_TYPE_NOT_SET")}),(e=>{R.Z.showError(S.Z.getTextFromResponse(e))}))},getTotalUsersCount(){A.Z.sendRequest({moduleName:"Core",methodName:"GetTotalUsersCount",signal:this.getTotalUsersCountRequestController.signal}).then((e=>{!1!==e&&(this.userCount=e)}),(e=>{R.Z.showError(S.Z.getTextFromResponse(e))}))},hasChanges(){const e=B.Z.getLicenseSettings();return this.key!==e.licenseKey},revertChanges(){this.populate()},populate(){const e=B.Z.getLicenseSettings();this.key=e.licenseKey,this.trialKeyHint=e.trialKeyLink?this.$t("LICENSINGWEBCLIENT.LABEL_LICENSING_TRIAL_KEY_HINT",{LINK:e.trialKeyLink}):"",this.permanentKeyHint=e.permanentKeyLink?this.$t("LICENSINGWEBCLIENT.LABEL_LICENSING_PERMANENT_KEY_HINT",{LINK:e.permanentKeyLink}):"",this.showTrialKeyHint=""===e.licenseKey&&""!==this.trialKeyHint},save(){if(!this.saving){this.saving=!0;const e={LicenseKey:this.key};A.Z.sendRequest({moduleName:"Licensing",methodName:"UpdateSettings",parameters:e}).then((e=>{if(this.saving=!1,!0===e){R.Z.showReport(this.$t("COREWEBCLIENT.REPORT_SETTINGS_UPDATE_SUCCESS"));const e=B.Z.getLicenseSettings();this.key!==e.licenseKey&&(this.showDialog=!0)}else R.Z.showError(this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED"))}),(e=>{this.saving=!1,R.Z.showError(S.Z.getTextFromResponse(e,this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED")))}))}},reloadUI(){window.location.reload()}}};var v=s(1639),W=s(6663),b=s(4458),G=s(3190),f=s(3115),k=s(6611),U=s(8879),K=s(7743),Z=s(1821),P=s(854),$=s(8289),O=s(2146),H=s(9984),D=s.n(H);const Y=(0,v.Z)(q,[["render",y],["__scopeId","data-v-b71b8944"]]),x=Y;D()(q,"components",{QScrollArea:W.Z,QCard:b.Z,QCardSection:G.Z,QItemLabel:f.Z,QInput:k.Z,QBtn:U.Z,QDialog:K.Z,QCardActions:Z.Z,QInnerLoading:P.Z,QLinearProgress:$.Z}),D()(q,"directives",{ClosePopup:O.Z})}}]);