nextcloud/dist/core-profile.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
17 KiB
JavaScript
Raw Normal View History

(()=>{"use strict";var t,e,a,r={96219:(t,e,a)=>{var r=a(21777),i=a(85471),A=a(85168),n=a(61338),o=a(32981),s=a(53334),l=a(63814),c=a(24764),C=a(73267),d=a(18195),p=a(41944),u=a(18740),_=a(22378),f=a(34196);const v={name:"AccountIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h=a(14486);const m=(0,h.A)(v,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,g={name:"MapMarkerIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},b=(0,h.A)(g,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon map-marker-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var y=a(93919);const x=(0,i.pM)({name:"Profile",components:{AccountIcon:m,MapMarkerIcon:b,NcActionLink:C.A,NcActions:c.A,NcAppContent:d.A,NcAvatar:p.A,NcButton:u.A,NcContent:_.A,NcEmptyContent:f.A,PencilIcon:y.A},data:()=>({...(0,o.C)("core","profileParameters",{userId:null,displayname:null,address:null,organisation:null,role:null,headline:null,biography:null,actions:[],isUserAvatarVisible:!1,pronouns:null}),status:(0,o.C)("core","status",{}),sections:window.OCA.Core.ProfileSections.getSections()}),computed:{isCurrentUser(){return(0,r.HW)()?.uid===this.userId},allActions(){return this.actions},primaryAction(){return this.allActions.length?this.allActions[0]:null},otherActions(){return console.warn(this.allActions),this.allActions.length>1?this.allActions.slice(1):[]},settingsUrl:()=>(0,l.Jv)("/settings/user"),emptyProfileMessage(){return this.isCurrentUser?(0,s.Tl)("core","You have not added any info yet"):(0,s.Tl)("core","{user} has not added any info yet",{user:this.displayname||this.userId})}},mounted(){document.title=`${this.displayname||this.userId} - ${document.title}`,(0,n.B1)("user_status:status.updated",this.handleStatusUpdate)},beforeDestroy(){(0,n.al)("user_status:status.updated",this.handleStatusUpdate)},methods:{t:s.Tl,handleStatusUpdate(t){this.isCurrentUser&&t.userId===this.userId&&(this.status=t)},openStatusModal(){const t=document.querySelector(".user-status-menu-item");this.isCurrentUser&&(t?t.click():(0,A.Qg)((0,s.Tl)("core","Error opening the user status modal, try hard refreshing the page")))}}});var k=a(85072),w=a.n(k),B=a(97825),S=a.n(B),E=a(77659),I=a.n(E),D=a(55056),O=a.n(D),P=a(10540),N=a.n(P),U=a(41113),M=a.n(U),j=a(52054),T={};T.styleTagTransform=M(),T.setAttributes=O(),T.insert=I().bind(null,"head"),T.domAPI=S(),T.insertStyleElement=N(),w()(j.A,T),j.A&&j.A.locals&&j.A.locals;const G=(0,h.A)(x,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcContent",{attrs:{"app-name":"profile"}},[e("NcAppContent",[e("div",{staticClass:"profile__header"},[e("div",{staticClass:"profile__header__container"},[e("div",{staticClass:"profile__header__container__placeholder"}),t._v(" "),e("div",{staticClass:"profile__header__container__displayname"},[e("h2",[t._v(t._s(t.displayname||t.userId))]),t._v(" "),t.pronouns?e("span",[
//# sourceMappingURL=core-profile.js.map?v=e35b4d7ee9cf36a36f62