1import{c as m,o as l,a as s,t as r,e as d,f as y,M as k,_ as A,b as h,d as f,w as S,i as V,bc as C,b6 as w}from"./client.7d61c7e.js";import{_ as F}from"./router-back.7d61c7e.js";const P={class:"cms-newstyle-account"},U={class:"cms-modern-card-page-header"},E={class:"cms-modern-card-page-header-content"},O={class:"cms-modern-card-content-grid"},N={class:"cms-modern-card-main-column"},B={class:"cms-modern-card"},I={class:"cms-modern-card-header"},M={class:"cms-modern-card-title-wrapper"},T={class:"cms-modern-card-content"},R={class:"cms-form-group"},Y={class:"cms-form-group"},z={class:"cms-modern-card-actions"},j={class:"cms-modern-card"},D={class:"cms-modern-card-header"},G={class:"cms-modern-card-title-wrapper"},q={class:"cms-modern-card-content"},H={class:"cms-form-group"},Z={class:"cms-form-group"},$={class:"cms-modern-card-actions"},J={class:"cms-modern-card"},K={class:"cms-modern-card-header"},Q={class:"cms-modern-card-title-wrapper"},W={class:"cms-modern-card-content"},X={class:"cms-modern-card-twofa-layout"},x=["src"],ss={class:"cms-modern-card-twofa-form"},es={class:"cms-form-group"},ts={class:"cms-form-group"},as={key:0,class:"cms-modern-card-status-item"},os={class:"cms-modern-card-status-info"},ns={class:"cms-modern-card-status-value"},rs={class:"reset-hint"},ds={class:"cms-modern-card-actions"},ls={class:"cms-modern-card-side-column"},is={class:"cms-modern-card status-card"},cs={class:"cms-modern-card-content"},ms={class:"cms-modern-card-status-list"},us={class:"cms-modern-card-status-item"},hs={class:"cms-modern-card-status-info"},gs={class:"cms-modern-card-status-label"},_s={class:"cms-modern-card-status-value"},ps={key:0,class:"cms-modern-card-status-item"},vs={class:"cms-modern-card-status-info"},fs={class:"cms-modern-card-status-label"},ws={class:"cms-modern-card-status-value"},bs={class:"cms-modern-card-status-item"},Ls={class:"cms-modern-card-status-info"},ys={class:"cms-modern-card-status-label"},ks={class:"cms-modern-card-status-value"};function As(t,e,u,g,n,a){var _,p,v;const i=y,b=k,c=A,L=F;return l(),m("div",P,[s("div",U,[e[7]||(e[7]=s("div",{class:"cms-modern-card-page-header-icon"},[s("i",{class:"material-icons"},"account_circle")],-1)),s("div",E,[s("h1",null,r(t.getLocale("admincenter","account_title")),1),e[6]||(e[6]=s("p",null,"Verwalten Sie Ihre persönlichen Einstellungen und Sicherheitsoptionen",-1))])]),s("div",O,[s("div",N,[s("div",B,[s("div",I,[e[9]||(e[9]=s("div",{class:"cms-modern-card-icon primary"},[s("i",{class:"material-icons"},"person")],-1)),s("div",M,[s("h2",null,r(t.getLocale("admincenter","user_information")),1),e[8]||(e[8]=s("p",null,"Benutzername und Spracheinstellungen",-1))])]),s("div",T,[s("div",R,[d(i,{modelValue:a.model.username,"onUpdate:modelValue":e[0]||(e[0]=o=>a.model.username=o),label:t.getLocale("admincenter","username_label"),maxlength:12},null,8,["modelValue","label"])]),s("div",Y,[d(b,{modelValue:a.model.preferredLanguage,"onUpdate:modelValue":e[1]||(e[1]=o=>a.model.preferredLanguage=o),options:a.availableLanguages,label:t.getLocale("admincenter","preferred_language"),placeholder:"Sprache wählen",trackBy:"code",objkey:"code",customLabel:o=>o.name||o.code},null,8,["modelValue","options","label","customLabel"])])]),s("div",z,[d(c,{label:t.getLocale("admincenter","save"),icon:"save",variant:"primary",onClick:a.save},null,8,["label","onClick"])])]),s("div",j,[s("div",D,[e[11]||(e[11]=s("div",{class:"cms-modern-card-icon warning"},[s("i",{class:"material-icons"},"lock")],-1)),s("div",G,[s("h2",null,r(t.getLocale("admincenter","change_password")),1),e[10]||(e[10]=s("p",null,"Passwort regelmäÃig ändern für mehr Sicherheit",-1))])]),s("div",q,[s("div",H,[d(i,{modelValue:n.oldpass,"onUpdate:modelValue":e[2]||(e[2]=o=>n.oldpass=o),label:t.getLocale("admincenter","current_password"),type:"password"},null,8,["modelValue","label"])]),s("div",Z,[d(i,{modelValue:n.newpass,"onUpdate:modelValue":e[3]||(e[3]=o=>n.newpass=o),label:t.getLocale("admincenter","new_password"),type:"password"},null,8,["modelValue","label"])])]),s("div",$,[d(c,{label:t.getLocale("admincenter","change_password_btn"),icon:"check",variant:"primary",onClick:a.changePassword},null,8,["label","onClick"])])]),s("div",J,[s("div",K,[e[13]||(e[13]=s("div",{class:"cms-modern-card-icon success"},[s("i",{class:"material-icons"},"security")],-1)),s("div",Q,[s("h2",null,r(t.getLocale("admincenter","two_factor_auth")),1),e[12]||(e[12]=s("p",null,"Zusätzliche Sicherheit durch Authenticator-App",-1))])]),s("div",W,[s("div",X,[(_=a.model.two_factor)!=null&&_.enabled?h("",!0):(l(),m("img",{key:0,class:"cms-modern-card-qr-code",src:(p=a.model.two_factor)==null?void 0:p.qr},null,8,x)),s("div",ss,[s("div",es,[d(i,{modelValue:n.oldPassword2FA,"onUpdate:modelValue":e[4]||(e[4]=o=>n.oldPassword2FA=o),label:t.getLocale("admincenter","current_password"),type:"password"},null,8,["modelValue","label"])]),s("div",ts,[d(i,{modelValue:n.twofacode,"onUpdate:modelValue":e[5]||(e[5]=o=>n.twofacode=o),label:t.getLocale("admincenter","authenticator_token")},null,8,["modelValue","label"])])])]),n.showResetString?(l(),m("div",as,[e[15]||(e[15]=s("div",{class:"cms-modern-card-status-icon warning"},[s("i",{class:"material-icons"},"warning")],-1)),s("div",os,[e[14]||(e[14]=s("div",{class:"cms-modern-card-status-label"},"Reset-Code",-1)),s("div",ns,r(n.resetString),1),s("p",rs,r(t.getLocale("admincenter","reset_code_notice")),1)])])):h("",!0)]),s("div",ds,[d(L,null,{default:S(()=>[d(c,{label:t.getLocale("admincenter","back"),icon:"chevron_left",variant:"secondary"},null,8,["label"])]),_:1}),e[16]||(e[16]=s("div",{class:"spacer"},null,-1)),(v=a.model.two_factor)!=null&&v.enabled?(l(),f(c,{key:1,label:t.getLocale("admincenter","disable_2fa"),icon:"close",variant:"danger",onClick:a.disable2FA},null,8,["label","onClick"])):(l(),f(c,{key:0,label:t.getLocale("admincenter","enable_2fa"),icon:"check",variant:"primary",onClick:a.enable2FA},null,8,["label","onClick"]))])])]),s("div",ls,[s("div",is,[e[20]||(e[20]=s("div",{class:"cms-modern-card-header"}
1,[s("div",{class:"cms-modern-card-icon info"},[s("i",{class:"material-icons"},"info")]),s("div",{class:"cms-modern-card-title-wrapper"},[s("h2",null,"Account Status"),s("p",null,"Ãbersicht Ihrer Session")])],-1)),s("div",cs,[s("div",ms,[s("div",us,[e[17]||(e[17]=s("div",{class:"cms-modern-card-status-icon"},[s("i",{class:"material-icons"},"login")],-1)),s("div",hs,[s("div",gs,r(t.getLocale("admincenter","last_login")),1),s("div",_s,r(a.lastLogin),1)])]),a.failedLogins?(l(),m("div",ps,[e[18]||(e[18]=s("div",{class:"cms-modern-card-status-icon warning"},[s("i",{class:"material-icons"},"warning")],-1)),s("div",vs,[s("div",fs,r(t.getLocale("admincenter","failed_logins")),1),s("div",ws,r(a.failedLogins),1)])])):h("",!0),s("div",bs,[e[19]||(e[19]=s("div",{class:"cms-modern-card-status-icon"},[s("i",{class:"material-icons"},"timer")],-1)),s("div",Ls,[s("div",ys,r(t.getLocale("admincenter","auto_logout")),1),s("div",ks,r(n.expiresAt),1)])])])])])])])])}const Ss={props:{},data(){return{oldpass:"",newpass:"",oldPassword2FA:"",twofacode:"",resetString:"",showResetString:!1,avatarOptions:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],expiresAt:""}},computed:{lastLogin(){return w(this.$store.getters["auth/lastLogin"]).format("MMM D, YYYY HH:mm")},AUTO_LOGOUT_IN(){return this.$store.getters["auth/GET_AUTO_LOGOUT_IN"]},model(){return this.$store.getters["auth/getUser"]},failedLogins(){return this.$store.getters["auth/failedLogins"]},test(){return this.$store.getters["config/SYSTEM"].localization.languageNames},availableLanguages(){var e,u;const t=((u=(e=this.$store.getters["config/SYSTEM"])==null?void 0:e.localization)==null?void 0:u.languageNames)||{};return Object.entries(t).map(([g,n])=>({code:g,name:n}))}},created(){this.avatarOptions=this.avatarOptions.map(t=>({key:0,value:`/cms2-public/avatars/${t}.svg`}))},watch:{},mounted(){let t=C(this.$store);this.expiresAt=w(Number(t)).toString()},methods:{customLanguageLabel(t){return`${t.code} - ${t.name}`},save(){this.$store.dispatch("auth/UPDATE",this.model).then(t=>{this.$notify({content:this.getLocale("admincenter","saved_notification")})},t=>{this.$notify({content:t.message,type:"error"})})},changePassword(){var t={old:this.oldpass,new:this.newpass};this.$store.dispatch("auth/changePass",t).then(e=>{this.$notify({content:this.getLocale("admincenter","saved_notification")})},e=>{this.$notify({content:e.message,type:"error"})})},enable2FA(){var t={password:this.oldPassword2FA,token:this.twofacode};this.$store.dispatch("auth/enable2FA",t).then(e=>{this.resetString=e.two_factor.reset_2FA,this.$notify({content:this.getLocale("admincenter","saved_notification")}),this.showResetString=!0,this.oldPassword2FA="",this.twofacode=""},e=>{this.$notify({content:e.message,type:"error"})})},disable2FA(){this.showResetString=!1;var t={password:this.oldPassword2FA,token:this.twofacode};this.$store.dispatch("auth/disable2FA",t).then(e=>{this.$notify({content:this.getLocale("admincenter","saved_notification")}),this.oldPassword2FA="",this.twofacode=""},e=>{this.$notify({content:e.message,type:"error"})})}}},Fs=V(Ss,[["render",As],["__scopeId","data-v-b2b9c47e"]]);export{Fs as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.