nextcloud/dist/core-profile.js

3 lines
26 KiB
JavaScript
Raw Normal View History

/*! For license information please see core-profile.js.LICENSE.txt */
!function(){"use strict";var n,e={8948:function(n,e,a){var i,r=a(20144),o=a(22200),A=a(9944),s=a(34741),l=a(17499),c=null===(i=(0,o.getCurrentUser)())?(0,l.getLoggerBuilder)().setApp("core").build():(0,l.getLoggerBuilder)().setApp("core").setUid(i.uid).build(),d=a(74854),p=a(16453),C=a(79753),u=a(26932),_=a(28017),v=a.n(_),g=a(79440),f=a.n(g),h=a(74466),m=a.n(h),x=a(58022),b=a(59466),y=a(48747),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:function(t){return["_self","_blank","_parent","_top"].includes(t)}}},computed:{colorPrimaryText:function(){return getComputedStyle(document.body).getPropertyValue("--color-primary-text").trim()}}},w=a(93379),B=a.n(w),E=a(7795),D=a.n(E),S=a(90569),I=a.n(S),P=a(3565),U=a.n(P),z=a(19216),O=a.n(z),Z=a(44589),M=a.n(Z),G=a(53155),q={};q.styleTagTransform=M(),q.setAttributes=U(),q.insert=I().bind(null,"head"),q.domAPI=D(),q.insertStyleElement=O(),B()(G.Z,q),G.Z&&G.Z.locals&&G.Z.locals;var W=a(51900),j=(0,W.Z)(k,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("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),[e("img",{staticClass:"icon",class:[t.icon,{"icon-invert":"#ffffff"===t.colorPrimaryText}],attrs:{src:t.icon}}),t._v(" "),t._t("default")],2)}),[],!1,null,"35d5c4b6",null).exports,T=(0,p.loadState)("core","status",{}),Y=(0,p.loadState)("core","profileParameters",{userId:null,displayname:null,address:null,organisation:null,role:null,headline:null,biography:null,actions:[],isUserAvatarVisible:!1}),$=Y.userId,F=Y.displayname,J=Y.address,K=Y.organisation,L=Y.role,R=Y.headline,V=Y.biography,H=Y.actions,Q=Y.isUserAvatarVisible,N={name:"Profile",components:{AccountIcon:y.Z,ActionLink:m(),Actions:f(),Avatar:v(),MapMarkerIcon:x.Z,PencilIcon:b.default,PrimaryActionButton:j},data:function(){return{status:T,userId:$,displayname:F,address:J,organisation:K,role:L,headline:R,biography:V,actions:H,isUserAvatarVisible:Q}},computed:{isCurrentUser:function(){var t;return(null===(t=(0,o.getCurrentUser)())||void 0===t?void 0:t.uid)===this.userId},allActions:function(){return this.actions},primaryAction:function(){return this.allActions.length?this.allActions[0]:null},middleActions:function(){return this.allActions.slice(1,4).length?this.allActions.slice(1,4):null},otherActions:function(){return this.allActions.slice(4).length?this.allActions.slice(4):null},settingsUrl:function(){return(0,C.generateUrl)("/settings/user")},colorMainBackground:function(){return getComputedStyle(document.body).getPropertyValue("--color-main-background").trim()},emptyProfileMessage:function(){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:function(){document.title="".concat(this.displayname||this.userId," - ").concat(document.title),(0,d.subscribe)("user_status:status.updated",this.handleStatusUpdate)},beforeDestroy:function(){(0,d.unsubscribe)("user_status:status.updated",this.handleStatusUpdate)},methods:{handleStatusUpdate:function(t){this.isCurrentUser&&t.userId===this.userId&&(this.status=t)},openStatusModal:function(){var n=document.querySelector(".user-status-menu-item__toggle");this.isCurrentUser&&(n?n.click():(0,u.x2)(t("core","Error opening the user status modal, try hard refreshing the page")))}}},X=a(52500),tt={};tt.styleTagTransform=M(),tt.setAttributes=U(),tt.insert=I().bind(null,"head"),tt.domAPI=D(),tt.insertStyleElement=O(),B()(X.Z,tt),X.Z&&X.Z.locals&&X.Z.locals;var nt=a(20075),et={};et.styleTagTransform=M(),et.setAttributes=U(),et.insert=I().bind(null,"head"),et.domAPI=D(),et.insertStyleElement=O(),B()(nt.Z,et),nt.Z&&nt.Z.locals&&nt.Z.locals;var at=(0,W.Z)(N,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"profile"},[e("div",{staticClass:"profile__header"},[e("div",{staticClass:"profile__header__co
//# sourceMappingURL=core-profile.js.map?v=be8cde7681881d8e80e7