You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
26 KiB

  1. /*! For license information please see core-profile.js.LICENSE.txt */
  2. (()=>{"use strict";var a,n={9002:(a,n,e)=>{var r=e(20144),i=e(45994),o=e(31352),A=e(2324),s=e(17499);const l=null===(d=(0,i.ts)())?(0,s.IY)().setApp("core").build():(0,s.IY)().setApp("core").setUid(d.uid).build();var d,c=e(78595),p=e(79954),C=e(79753),u=e(64024),_=e(75925),v=e.n(_),g=e(12945),m=e.n(g),h=e(76212),f=e.n(h),x=e(50246),b=e(73229),y=e(86158);const k={name:"PrimaryActionButton",props:{disabled:{type:Boolean,default:!1},href:{type:String,required:!0},icon:{type:String,required:!0},target:{type:String,required:!0,validator:t=>["_self","_blank","_parent","_top"].includes(t)}},computed:{colorPrimaryText:()=>getComputedStyle(document.body).getPropertyValue("--color-primary-element-text").trim()}};var w=e(93379),B=e.n(w),E=e(7795),D=e.n(E),I=e(90569),S=e.n(I),P=e(3565),O=e.n(P),U=e(19216),z=e.n(U),j=e(44589),M=e.n(j),G=e(34949),Z={};Z.styleTagTransform=M(),Z.setAttributes=O(),Z.insert=S().bind(null,"head"),Z.domAPI=D(),Z.insertStyleElement=z(),B()(G.Z,Z),G.Z&&G.Z.locals&&G.Z.locals;var W=e(51900);const Y=(0,W.Z)(k,(function(){var t=this,a=t._self._c;return a("a",t._g({staticClass:"profile__primary-action-button",class:{disabled:t.disabled},attrs:{href:t.href,target:t.target,rel:"noopener noreferrer nofollow"}},t.$listeners),[a("img",{staticClass:"icon",class:[t.icon,{"icon-invert":"#ffffff"===t.colorPrimaryText}],attrs:{src:t.icon}}),t._v(" "),t._t("default")],2)}),[],!1,null,"5b5fe9f6",null).exports,T=(0,p.j)("core","status",{}),{userId:q,displayname:F,address:$,organisation:N,role:K,headline:L,biography:V,actions:H,isUserAvatarVisible:R}=(0,p.j)("core","profileParameters",{userId:null,displayname:null,address:null,organisation:null,role:null,headline:null,biography:null,actions:[],isUserAvatarVisible:!1}),J={name:"Profile",components:{AccountIcon:y.Z,NcActionLink:f(),NcActions:m(),NcAvatar:v(),MapMarkerIcon:x.Z,PencilIcon:b.default,PrimaryActionButton:Y},data:()=>({status:T,userId:q,displayname:F,address:$,organisation:N,role:K,headline:L,biography:V,actions:H,isUserAvatarVisible:R,sections:OCA.Core.ProfileSections.getSections()}),computed:{isCurrentUser(){var t;return(null===(t=(0,i.ts)())||void 0===t?void 0:t.uid)===this.userId},allActions(){return this.actions},primaryAction(){return this.allActions.length?this.allActions[0]:null},middleActions(){return this.allActions.slice(1,4).length?this.allActions.slice(1,4):null},otherActions(){return this.allActions.slice(4).length?this.allActions.slice(4):null},settingsUrl:()=>(0,C.generateUrl)("/settings/user"),colorMainBackground:()=>getComputedStyle(document.body).getPropertyValue("--color-main-background").trim(),emptyProfileMessage(){return this.isCurrentUser?t("core","You have not added any info yet"):t("core","{user} has not added any info yet",{user:this.displayname||this.userId})}},mounted(){document.title="".concat(this.displayname||this.userId," - ").concat(document.title),(0,c.Ld)("user_status:status.updated",this.handleStatusUpdate)},beforeDestroy(){(0,c.r1)("user_status:status.updated",this.handleStatusUpdate)},methods:{handleStatusUpdate(t){this.isCurrentUser&&t.userId===this.userId&&(this.status=t)},openStatusModal(){const a=document.querySelector(".user-status-menu-item__toggle");this.isCurrentUser&&(a?a.click():(0,u.x2)(t("core","Error opening the user status modal, try hard refreshing the page")))}}};var Q=e(41724),X={};X.styleTagTransform=M(),X.setAttributes=O(),X.insert=S().bind(null,"head"),X.domAPI=D(),X.insertStyleElement=z(),B()(Q.Z,X),Q.Z&&Q.Z.locals&&Q.Z.locals;var tt=e(31487),at={};at.styleTagTransform=M(),at.setAttributes=O(),at.insert=S().bind(null,"head"),at.domAPI=D(),at.insertStyleElement=z(),B()(tt.Z,at),tt.Z&&tt.Z.locals&&tt.Z.locals;const nt=(0,W.Z)(J,(function(){var t=this,a=t._self._c;return a("div",{staticClass:"profile"},[a("div",{staticClass:"profile__header"},[a("div",{staticClass:"profile__header__container"},[a("div",{staticClass:"profile__header__container__placeholder"}),t._v(" "),a("h2",{staticClass:"profile__header__container__displayname"},[t._v("\n\t\t\t\t"+t._s(t.displayname||t.userId)+"\n\t\t\t\t"),t.isCurrentUser?a("
  3. //# sourceMappingURL=core-profile.js.map?v=0b1c99f38389fc349a77