1import{V as n,g as o,_ as i,a1 as a,aK as r,m as u,d as c,e as l,al as m,n as h,a as p}from"./index-25cd0ebb.js";import{V as _}from"./list-menu-b6b53b05.js";import{V as d}from"./social-links-255600ea.js";import"./toggle-a64c13ea.js";const g={name:"AccountItem",components:{VwListMenu:_,VwSocialLinks:d,VwSpinner:n},data(){return{error:"",loading:!1}},metaInfo(){return o(this.$route.fullPath,this.user.display_name,this.user.occupation,i.result(this.user,"profile_image","")||a)},asyncData({store:s,route:t}){return r(t.params.slug).then(e=>s.dispatch("setAccountUser",{user:e}))},methods:{...u(["setFetching","setAccountUser"]),fetch(){this.error="",this.loading=!0,window.scrollTo(0,0),r(this.$route.params.slug).then(s=>{if(s.person_slug)return this.$router.push(`/mp/${s.person_slug}`);this.setAccountUser({user:s}),this.loading=!1}).catch(s=>{this.loading=!1,this.error=this.$t(`errors.${s}`)})}},computed:{...c(["isAdmin"]),...l({user:s=>s.Account.user,currentUser:s=>s.user}),image(){let s=i.result(this.user,"profile_image","")||a;if(!s)s=a;else if(s.includes("gravatar")){let t=encodeURIComponent(p+"/static/icons/user-oil.png");s+=`?d=${t}`}return s},social_links(){return m(this.user)},menu(){const s=[{name:this.$t("sections.question_answers"),link:`/u/${this.$route.params.slug}`,count:this.user.questions_count}];return(i.result(this.currentUser,"_profile")===this.user._id||this.isAdmin)&&(s.push({name:this.$t("sections.NOTIFICATIONS"),link:`/u/${this.$route.params.slug}/notifications`,count:this.user.notifications_count}),s.push({name:"ΡΥÎÎÎΣÎÎΣ ΠΡÎΤÎÎÎΣÎΩÎ",link:`/u/${this.$route.params.slug}/user-preferences`}),s.push({name:this.$t("sections.PROFILE_SETTINGS"),link:`/u/${this.$route.params.slug}/settings`})),s}},mounted(){this.fetch()},watch:{$route(s,t){t.params.slug!==s.params.slug&&this.fetch()}}};var f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"account-page"},[e("vw-spinner",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]}),e("section",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],staticClass:"generic-head"},[t._m(0),e("div",{staticClass:"container tiny cf"},[e("div",{staticClass:"left-content"},[e("h1",[e("span",[t._v(t._s(t.user.display_name))])]),e("vw-social-links",{attrs:{items:t.social_links}})],1),e("div",{staticClass:"right-content"},[e("div",{staticClass:"round-img",style:{backgroundImage:`url(${t.image})`}})])])]),t.error?e("div",{staticClass:"error-bar"},[t._v(t._s(t.error))]):t._e(),e("section",{staticClass:"list-wrapper cf"},[e("vw-list-menu",{attrs:{menu:t.menu}}),e("router-view",{staticClass:"view"})],1)],1)},v=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"bc-cnt"},[t("div",{staticClass:"back-img"})])}],$=h(g,f,v,!1,null,null,null,null);const I=$.exports;export{I 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.