12 |
- (()=>{"use strict";var t,e,i,a={95086:(t,e,i)=>{var a=i(21777),r=i(85471),A=i(63814),n=i(32981),o=i(85168),s=i(61338),l=i(53334),c=i(24764),C=i(69321),p=i(18195),d=i(41944),u=i(70995),_=i(22378),f=i(28326);const v={name:"AccountIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h=i(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:"true","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:"true","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=i(2413);const x=(0,r.pM)({name:"Profile",components:{AccountIcon:m,MapMarkerIcon:b,NcActionLink:C.A,NcActions:c.A,NcAppContent:p.A,NcAvatar:d.A,NcButton:u.A,NcContent:_.A,NcEmptyContent:f.A,PencilIcon:y.A},setup:()=>({t:l.Tl}),data:()=>({...(0,n.C)("profile","profileParameters",{userId:null,displayname:null,address:null,organisation:null,role:null,headline:null,biography:null,actions:[],isUserAvatarVisible:!1,pronouns:null}),status:(0,n.C)("profile","status",{}),sections:window.OCA.Core.ProfileSections.getSections()}),computed:{isCurrentUser(){return(0,a.HW)()?.uid===this.userId},allActions(){return this.actions},primaryAction(){return this.allActions.length?this.allActions[0]:null},otherActions(){return this.allActions.length>1?this.allActions.slice(1):[]},settingsUrl:()=>(0,A.Jv)("/settings/user"),emptyProfileMessage(){return this.isCurrentUser?(0,l.Tl)("profile","You have not added any info yet"):(0,l.Tl)("profile","{user} has not added any info yet",{user:this.displayname||this.userId||""})}},mounted(){document.title=`${this.displayname||this.userId} - ${document.title}`,(0,s.B1)("user_status:status.updated",this.handleStatusUpdate)},beforeDestroy(){(0,s.al)("user_status:status.updated",this.handleStatusUpdate)},methods:{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,o.Qg)((0,l.Tl)("profile","Error opening the user status modal, try hard refreshing the page")))}}});var k=i(85072),w=i.n(k),B=i(97825),S=i.n(B),E=i(77659),I=i.n(E),D=i(55056),O=i.n(D),P=i(10540),N=i.n(P),U=i(41113),M=i.n(U),j=i(5995),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",[t._v("·")]):t._e(),t._v(" "),t.pronouns?e("span",{staticClass:"profile__header__container__pronouns"},[t._v(t._s(t.pronouns))]):t._e(),t._v(" "),t.isCurrentUser?e("NcButton",{attrs:{type:"primary",href:t.settingsUrl},scopedSlots:t._u([{key:"icon",fn:function(){return[e("PencilIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,4260349822)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("profile","Edit Profile"))+"\n\t\t\t\t\t")]):t._e()],1),t._v(" "),t.status.icon||t.status.message?e("NcButton",{attrs:{disabled:!t.isCurrentUser,type:t.isCurrentUser?"tertiary":"tertiary-no-background"},on:{click:t.openStatusModal}},[t._v("\n\t\t\t\t\t"+t._s(t.status.icon)+" "+t._s(t.status.message)+"\n\t\t\t\t")]):t._e()],1)]),t._v(" "),e("div",{staticClass:"profile__wrapper"},[e("div",{staticClass:"profile__content"},[e("div",{staticClass:"profile__sidebar"},[e("NcAvatar",{staticClass:"avatar",class:{interactive:t.isCurrentUser},attrs:{user:t.userId,size:180,"show-user-status":!0,"show-user-status-compact":!1,"disable-menu":!0,"disable-tooltip":!0,"is-no-user":!t.isUserAvatarVisible},nativeOn:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.openStatusModal.apply(null,arguments)}}}),t._v(" "),e("div",{staticClass:"user-actions"},[t.primaryAction?e("NcButton",{staticClass:"user-actions__primary",attrs:{type:"primary",href:t.primaryAction.target,icon:t.primaryAction.icon,target:"phone"===t.primaryAction.id?"_self":"_blank"},scopedSlots:t._u([{key:"icon",fn:function(){return[e("img",{staticClass:"user-actions__primary__icon",attrs:{src:t.primaryAction.icon,alt:""}})]},proxy:!0}],null,!1,1780240256)},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.primaryAction.title)+"\n\t\t\t\t\t\t")]):t._e(),t._v(" "),e("NcActions",{staticClass:"user-actions__other",attrs:{inline:4}},t._l(t.otherActions,(function(i){return e("NcActionLink",{key:i.id,attrs:{"close-after-click":!0,href:i.target,target:"phone"===i.id?"_self":"_blank"},scopedSlots:t._u([{key:"icon",fn:function(){return[e("img",{staticClass:"user-actions__other__icon",attrs:{src:i.icon,alt:""}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(i.title)+"\n\t\t\t\t\t\t\t")])})),1)],1)],1),t._v(" "),e("div",{staticClass:"profile__blocks"},[t.organisation||t.role||t.address?e("div",{staticClass:"profile__blocks-details"},[t.organisation||t.role?e("div",{staticClass:"detail"},[e("p",[t._v(t._s(t.organisation)+" "),t.organisation&&t.role?e("span",[t._v("•")]):t._e(),t._v(" "+t._s(t.role))])]):t._e(),t._v(" "),t.address?e("div",{staticClass:"detail"},[e("p",[e("MapMarkerIcon",{staticClass:"map-icon",attrs:{size:16}}),t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.address)+"\n\t\t\t\t\t\t\t")],1)]):t._e()]):t._e(),t._v(" "),t.headline||t.biography||t.sections.length>0?[t.headline?e("h3",{staticClass:"profile__blocks-headline"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.headline)+"\n\t\t\t\t\t\t")]):t._e(),t._v(" "),t.biography?e("p",{staticClass:"profile__blocks-biography"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.biography)+"\n\t\t\t\t\t\t")]):t._e(),t._v(" "),t._l(t.sections,(function(i,a){return e("div",{key:a,ref:"section-"+a,refInFor:!0,staticClass:"profile__additionalContent"},[e(i(t.$refs["section-"+a],t.userId),{tag:"component",attrs:{"user-id":t.userId}})],1)}))]:e("NcEmptyContent",{staticClass:"profile__blocks-empty-info",attrs:{name:t.emptyProfileMessage,description:t.t("profile","The headline and about sections will show up here")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountIcon",{attrs:{size:60}})]},proxy:!0}])})],2)])])])],1)}),[],!1,null,"0747f858",null).exports;i.nc=(0,a.aV)(),window.OCA||(window.OCA={}),window.OCA.Core||(window.OCA.Core={}),Object.assign(window.OCA.Core,{ProfileSections:new class{constructor(){var t,e,i;t=this,i=void 0,(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e="_sections"))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,this._sections=[]}registerSection(t){this._sections.push(t)}getSections(){return this._sections}}});const z=r.Ay.extend(G);window.addEventListener("DOMContentLoaded",(()=>{(new z).$mount("#content")}))},5995:(t,e,i)=>{i.d(e,{A:()=>o});var a=i(71354),r=i.n(a),A=i(76314),n=i.n(A)()(r());n.push([t.id,"[data-v-0747f858] #app-content-vue{background-color:unset}.profile[data-v-0747f858]{width:100%;overflow-y:auto}.profile__header[data-v-0747f858]{display:flex;position:sticky;height:190px;top:-40px;background-color:var(--color-main-background-blur);backdrop-filter:var(--filter-background-blur);-webkit-backdrop-filter:var(--filter-background-blur)}.profile__header__container[data-v-0747f858]{align-self:flex-end;width:100%;max-width:1024px;margin:8px auto;row-gap:8px;display:grid;grid-template-rows:max-content max-content;grid-template-columns:240px 1fr;justify-content:center}.profile__header__container__placeholder[data-v-0747f858]{grid-row:1/3}.profile__header__container__displayname[data-v-0747f858]{padding-inline:16px;width:640px;height:45px;margin-block:125px 0;display:flex;align-items:center;gap:18px}.profile__header__container__displayname h2[data-v-0747f858]{font-size:30px;margin:0}.profile__header__container__displayname span[data-v-0747f858]{font-size:20px}.profile__sidebar[data-v-0747f858]{position:sticky;top:0;align-self:flex-start;padding-top:20px;min-width:220px;margin-block:-150px 0;margin-inline:0 20px}.profile__sidebar[data-v-0747f858] .avatar.avatardiv{text-align:center;margin:auto;display:block;padding:8px}.profile__sidebar[data-v-0747f858] .avatar.avatardiv.interactive .avatardiv__user-status{cursor:pointer}.profile__sidebar[data-v-0747f858] .avatar.avatardiv .avatardiv__user-status{inset-inline-end:14px;bottom:14px;width:34px;height:34px;background-size:28px;border:none;background-color:var(--color-main-background);line-height:34px;font-size:20px}.profile__wrapper[data-v-0747f858]{background-color:var(--color-main-background);min-height:100%}.profile__content[data-v-0747f858]{max-width:1024px;margin:0 auto;display:flex;width:100%}.profile__blocks[data-v-0747f858]{margin:18px 0 80px 0;display:grid;gap:16px 0;width:640px}.profile__blocks p[data-v-0747f858],.profile__blocks h3[data-v-0747f858]{cursor:text;overflow-wrap:anywhere}.profile__blocks-details[data-v-0747f858]{display:flex;flex-direction:column;gap:2px 0}.profile__blocks-details .detail[data-v-0747f858]{display:inline-block;color:var(--color-text-maxcontrast)}.profile__blocks-details .detail p .map-icon[data-v-0747f858]{display:inline-block;vertical-align:middle}.profile__blocks-headline[data-v-0747f858]{margin-inline:0;margin-block:10px 0;font-weight:bold;font-size:20px}.profile__blocks-biography[data-v-0747f858]{white-space:pre-line}@media only screen and (max-width: 1024px){.profile__header[data-v-0747f858]{height:250px;position:unset}.profile__header__container[data-v-0747f858]{grid-template-columns:unset;margin-bottom:110px}.profile__header__container__displayname[data-v-0747f858]{margin:80px 20px 0px 0px !important;width:unset;text-align:center;padding-inline:12px}.profile__header__container__edit-button[data-v-0747f858]{width:fit-content;display:block;margin:60px auto}.profile__header__container__status-text[data-v-0747f858]{margin:4px auto}.profile__content[data-v-0747f858]{display:block}.profile__content .avatar[data-v-0747f858]{margin-top:-110px !important}.profile__blocks[data-v-0747f858]{width:unset;max-width:600px;margin:0 auto;padding:20px 50px 50px 50px}.profile__sidebar[data-v-0747f858]{margin:unset;position:unset}}.user-actions[data-v-0747f858]{display:flex;flex-direction:column;gap:8px 0;margin-top:20px}.user-actions__primary[data-v-0747f858]{margin:0 auto}.user-actions__primary__icon[data-v-0747f858]{filter:var(--primary-invert-if-dark)}.user-actions__other[data-v-0747f858]{display:flex;justify-content:center;gap:0 4px}.user-actions__other__icon[data-v-0747f858]{height:20px;width:20px;object-fit:contain;filter:var(--background-invert-if-dark);align-self:center;margin:12px}","",{version:3,sources:["webpack://./apps/profile/src/views/Profile.vue"],names:[],mappings:"AAIA,mCACC,sBAAA,CAGD,0BACC,UAAA,CACA,eAAA,CAEA,kCACC,YAAA,CACA,eAAA,CACA,YAAA,CACA,SAAA,CACA,kDAAA,CACA,6CAAA,CACA,qDAAA,CAEA,6CACC,mBAAA,CACA,UAAA,CACA,gBAvBiB,CAwBjB,eAAA,CACA,WAAA,CACA,YAAA,CACA,0CAAA,CACA,+BAAA,CACA,sBAAA,CAEA,0DACC,YAAA,CAGD,0DACC,mBAAA,CACA,WApCgB,CAqChB,WAAA,CACA,oBAAA,CACA,YAAA,CACA,kBAAA,CACA,QAAA,CAEA,6DACC,cAAA,CACA,QAAA,CAGD,+DACC,cAAA,CAMJ,mCACC,eAAA,CACA,KAAA,CACA,qBAAA,CACA,gBAAA,CACA,eAAA,CACA,qBAAA,CACA,oBAAA,CAGA,qDACC,iBAAA,CACA,WAAA,CACA,aAAA,CACA,WAAA,CAGC,yFAEC,cAAA,CAIF,6EACC,qBAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,oBAAA,CACA,WAAA,CAEA,6CAAA,CACA,gBAAA,CACA,cAAA,CAKH,mCACC,6CAAA,CACA,eAAA,CAGD,mCACC,gBApGkB,CAqGlB,aAAA,CACA,YAAA,CACA,UAAA,CAGD,kCACC,oBAAA,CACA,YAAA,CACA,UAAA,CACA,WA7GkB,CA+GlB,yEACC,WAAA,CACA,sBAAA,CAGD,0CACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,kDACC,oBAAA,CACA,mCAAA,CAEA,8DACC,oBAAA,CACA,qBAAA,CAKH,2CACC,eAAA,CACA,mBAAA,CACA,gBAAA,CACA,cAAA,CAGD,4CACC,oBAAA,CAKH,2CAEE,kCACC,YAAA,CACA,cAAA,CAEA,6CACC,2BAAA,CACA,mBAAA,CAEA,0DACC,mCAAA,CACA,WAAA,CACA,iBAAA,CACA,mBAAA,CAGD,0DACC,iBAAA,CACA,aAAA,CACA,gBAAA,CAGD,0DACC,eAAA,CAKH,mCACC,aAAA,CAEC,2CAEA,4BAAA,CAIF,kCACC,WAAA,CACA,eAAA,CACA,aAAA,CACA,2BAAA,CAGD,mCACC,YAAA,CACA,cAAA,CAAA,CAKH,+BACC,YAAA,CACA,qBAAA,CACA,SAAA,CACA,eAAA,CAEA,wCACC,aAAA,CAEA,8CACC,oCAAA,CAIF,sCACC,YAAA,CACA,sBAAA,CACA,SAAA,CAEA,4CACC,WAAA,CACA,UAAA,CACA,kBAAA,CACA,uCAAA,CACA,iBAAA,CACA,WAAA",sourceRoot:""}]);const o=n}},r={};function A(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return a[t].call(i.exports,i,i.exports,A),i.loaded=!0,i.exports}A.m=a,t=[],A.O=(e,i,a,r)=>{if(!i){var n=1/0;for(c=0;c<t.length;c++){i=t[c][0],a=t[c][1],r=t[c][2];for(var o=!0,s=0;s<i.length;s++)(!1&r||n>=r)&&Object.keys(A.O).every((t=>A.O[t](i[s])))?i.splice(s--,1):(o=!1,r<n&&(n=r));if(o){t.splice(c--,1);var l=a();void 0!==l&&(e=l)}}return e}r=r||0;for(var c=t.length;c>0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[i,a,r]},A.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return A.d(e,{a:e}),e},A.d=(t,e)=>{for(var i in e)A.o(e,i)&&!A.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},A.f={},A.e=t=>Promise.all(Object.keys(A.f).reduce(((e,i)=>(A.f[i](t,e),e)),[])),A.u=t=>t+"-"+t+".js?v="+{5706:"3153330af47fc26a725a",6127:"40fbb3532bb7846b7035"}[t],A.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),A.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},i="nextcloud:",A.l=(t,a,r,n)=>{if(e[t])e[t].push(a);else{var o,s;if(void 0!==r)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var C=l[c];if(C.getAttribute("src")==t||C.getAttribute("data-webpack")==i+r){o=C;break}}o||(s=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,A.nc&&o.setAttribute("nonce",A.nc),o.setAttribute("data-webpack",i+r),o.src=t),e[t]=[a];var p=(i,a)=>{o.onerror=o.onload=null,clearTimeout(d);var r=e[t];if(delete e[t],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach((t=>t(a))),i)return i(a)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=p.bind(null,o.onerror),o.onload=p.bind(null,o.onload),s&&document.head.appendChild(o)}},A.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},A.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),A.j=8820,(()=>{var t;A.g.importScripts&&(t=A.g.location+"");var e=A.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var a=i.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=i[a--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),A.p=t})(),(()=>{A.b=document.baseURI||self.location.href;var t={8820:0};A.f.j=(e,i)=>{var a=A.o(t,e)?t[e]:void 0;if(0!==a)if(a)i.push(a[2]);else{var r=new Promise(((i,r)=>a=t[e]=[i,r]));i.push(a[2]=r);var n=A.p+A.u(e),o=new Error;A.l(n,(i=>{if(A.o(t,e)&&(0!==(a=t[e])&&(t[e]=void 0),a)){var r=i&&("load"===i.type?"missing":i.type),n=i&&i.target&&i.target.src;o.message="Loading chunk "+e+" failed.\n("+r+": "+n+")",o.name="ChunkLoadError",o.type=r,o.request=n,a[1](o)}}),"chunk-"+e,e)}},A.O.j=e=>0===t[e];var e=(e,i)=>{var a,r,n=i[0],o=i[1],s=i[2],l=0;if(n.some((e=>0!==t[e]))){for(a in o)A.o(o,a)&&(A.m[a]=o[a]);if(s)var c=s(A)}for(e&&e(i);l<n.length;l++)r=n[l],A.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return A.O(c)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),A.nc=void 0;var n=A.O(void 0,[4208],(()=>A(95086)));n=A.O(n)})();
- //# sourceMappingURL=profile-main.js.map?v=04b71b6da6e1eda8807c
|