@ozdao/prometheus-framework 0.1.37 → 0.1.38
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +26 -26
- package/package.json +123 -2
package/dist/users.client.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const w=require("./Dropdown-31115457.js"),y=require("./Menu-b5d6a0c7.js"),h=require("./MenuItem-56ae7f94.js"),V=require("./ButtonToggleMembership-15f149cb.js"),C=require("./Socials-cceaeaf2.js"),N=require("./IconCommunity-b339e806.js"),q=require("./IconEdit-c0469b45.js"),U=require("./PlaceholderUserpic-47f6f319.js"),v=require("vue-router"),u=require("./auth-06d35b82.js"),S=require("./index-b41aac19.js"),$=require("./memberships-393765d8.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const p=require("./Field-e2a43424.js"),E=require("./Button-7643c9aa.js"),O=require("./UploadImage-0f488170.js");require("./inputs.validation-d7cef32b.js");require("./states.validation-03f7cd49.js");const R=require("./auth.validation-0ce9e326.js");require("./Popup-795f5c88.js");require("vue-i18n");require("./IconCross-5bf93179.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-3ca5ab39.js");require("./reports-270f69df.js");require("./globals-928eb13c.js");require("./click-outside-0b0727d1.js");require("./IconChevronRight-a55f838e.js");require("./dribbble-8e8e169b.js");const F={class:"w-100 mn-semi radius-medium pd-medium bg-main t-black"},B={__name:"ProfileCompletion",props:{user:Object,target:Object,cta:Boolean},setup(n){const{user:t,cta:d,target:f}=n,_=e.ref(0),i=m=>{let a=0,l=0;function c(s){for(let o in s)s.hasOwnProperty(o)&&(s[o]&&typeof s[o]=="object"&&!Array.isArray(s[o])?c(s[o]):(a++,s[o]!=null&&s[o]!==""&&l++))}return c(m),a===0?0:Math.round(l/a*100)};return f&&(_.value=i(f)),(m,a)=>{const l=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",F,[e.createElementVNode("h3",null," Profile completed at "+e.toDisplayString(_.value)+"% ",1),n.cta?(e.openBlock(),e.createBlock(l,{key:0,to:{name:"User Edit Profile",params:{_id:n.user}},class:"mn-t-regular t-black bg-white w-100 button"},{default:e.withCtx(()=>[e.createTextVNode(" Fill Profile ")]),_:1},8,["to"])):e.createCommentVNode("",!0)])}}},k=S.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),r=e.reactive({all:[],current:{_id:"",username:"",email:"",phone:"",status:"",profile:{name:"",photo:"",description:"",birthday:""},socials:{facebook:"",twitter:"",instagram:"",telegram:""},roles:[]}}),b={async create(n){try{const t=await k.post("/api/users",n);return g.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async read(n={}){n.params={},n._id&&(n.params._id=n._id),n.user&&(n.params.user=n.user);try{const t=await k.get("/api/users",{params:n.params});return n._id?g.set(t.data[0],"current"):g.set(t.data,"all"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async update(n){try{const t=await k.put(`/api/users/${n._id}`,n);return g.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async delete(n){try{await k.delete(`/api/users/${n._id}`);const t=r.all.findIndex(d=>d._id===n._id);t!==-1&&r.all.splice(t,1)}catch(t){console.error(t)}}},g={set(n,t){r[t]=n},clean(){r.current={phone:"",name:"",surname:"",birthday:"",city:"",address:"",roles:[],orders:[]}}},M=Object.freeze(Object.defineProperty({__proto__:null,actions:b,mutations:g,state:r},Symbol.toStringTag,{value:"Module"}));const I={key:0,class:"for-transition w-100"},D={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},z={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},T={class:"flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey"},A={class:"bg-black pd-thin radius-small"},L=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),j=["src"],G={class:"mn-thin"},Y={class:"mn-thin t-main t-semi"},H={class:"mn-small p-medium"},J={class:"mn-medium flex-center flex-nowrap flex"},K={class:"t-semi mn-small"},Q={key:5,class:"mn-t-small mn-thin"},W=e.createElementVNode("span",null," Backoffice ",-1),X=e.createElementVNode("span",null,"Events",-1),Z=e.createElementVNode("span",null,"Groups",-1),ee=e.createElementVNode("span",null,"Posts",-1),te=e.createElementVNode("span",null," Settings ",-1),re=e.createElementVNode("span",null," About ",-1),se=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),P={__name:"Profile",setup(n){const t=v.useRoute(),d=v.useRouter(),f=e.ref(!1);e.onMounted(async()=>{await b.read({_id:t.params._id,user:u.state.user._id}),f.value=!0});const _=({membership:m,status:a,target:l},c,s)=>{$.mutations.handleMembershipUpdate(r.current,m,a,l,c,s)};function i(){u.actions.logout(),d.push({name:"Sign In"})}return(m,a)=>f.value?(e.openBlock(),e.createElementBlock("div",I,[r.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",D," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",z,[e.unref(t).params._id===u.state.user._id&&f.value?(e.openBlock(),e.createBlock(B,{key:0,user:u.state.user._id,target:r.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",T,[e.unref(t).params._id&&e.unref(t).params._id!==u.state.user._id?(e.openBlock(),e.createBlock(w.Dropdown,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",A,[e.createVNode(w._sfc_main,{user:u.state.user._id,type:"user",target:r.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[L]),_:1},8,["user","target"]),u.state.user._id?(e.openBlock(),e.createBlock(V._sfc_main,{key:0,user:u.state.user._id,type:"user",role:"blocked",target:r.current._id,status:r.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:a[0]||(a[0]=l=>_(l,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.unref(t).params._id===u.state.user._id?(e.openBlock(),e.createBlock(q.IconEdit,{key:1,onClick:a[1]||(a[1]=l=>m.$router.push({name:"User Edit Profile",params:{_id:u.state.user._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),r.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(m.FILE_SERVER_URL||"")+r.current.profile.photo,class:"radius-extra bg-white mn-small object-fit-cover i-extra"},null,8,j)):(e.openBlock(),e.createBlock(U.PlaceholderUserpic,{key:3,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h3",G,e.toDisplayString(r.current.profile.name?r.current.profile.name:"Not specified"),1),e.createElementVNode("p",Y," @"+e.toDisplayString(r.current.username?r.current.username:"Not specified"),1),e.createElementVNode("p",H,e.toDisplayString(r.current.profile.description?r.current.profile.description:"Not specified"),1),e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.current.roles,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==r.current.roles.length-1}])},e.toDisplayString(l.icon)+" "+e.toDisplayString(l.name),3))),256))]),e.createElementVNode("p",K," 👨👨👧👧 "+e.toDisplayString(r.current.numberOfSubscribers)+" followers ",1),u.state.user._id&&e.unref(t).params._id&&e.unref(t).params._id!==u.state.user._id?(e.openBlock(),e.createBlock(V._sfc_main,{key:4,user:u.state.user._id,type:"user",role:"subscriber",target:r.current._id,status:r.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:a[2]||(a[2]=l=>_(l,"isSubscriber","numberOfSubscribers")),class:"w-min mn-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(r.current.socials).some(l=>l)?(e.openBlock(),e.createElementBlock("h4",Q," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(C._sfc_main,{telegram:r.current.socials.telegram,facebook:r.current.socials.facebook,instagram:r.current.socials.instagram,twitter:r.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),u.state.access.roles&&u.state.user._id===e.unref(t).params._id&&(u.state.access.roles.includes("ROLE_MODERATOR")||u.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(y._sfc_main,{key:1,class:"bg-black t-white"},{default:e.withCtx(()=>[e.createVNode(h._sfc_main,{onClick:a[3]||(a[3]=l=>e.unref(d).push({name:"Backoffice",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer",theme:"white"},{default:e.withCtx(()=>[W]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(y._sfc_main,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(h._sfc_main,{onClick:a[4]||(a[4]=l=>e.unref(d).push({name:"User Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(N.IconEvents,{class:"i-semi",icon:!0}),X]),_:1}),e.createVNode(h._sfc_main,{onClick:a[5]||(a[5]=l=>e.unref(d).push({name:"User Organizations",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(N.IconGroups,{class:"i-semi",icon:!0}),Z]),_:1}),e.createVNode(h._sfc_main,{onClick:a[6]||(a[6]=l=>e.unref(d).push({name:"User Blogposts",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(N.IconCommunity,{class:"i-semi",icon:!0}),ee]),_:1})]),_:1}),u.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(y._sfc_main,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(h._sfc_main,{onClick:a[7]||(a[7]=l=>e.unref(d).push({name:"User Edit Profile",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[te]),_:1}),e.createVNode(h._sfc_main,{onClick:a[8]||(a[8]=l=>e.unref(d).push({name:"Legal",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[re]),_:1}),e.createVNode(h._sfc_main,{class:"cursor-pointer",onClick:a[9]||(a[9]=l=>i())},{default:e.withCtx(()=>[se]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}},ae=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}));const oe={class:"pd-medium for-transition w-100"},ie=e.createElementVNode("h3",{class:"mn-small"},"Username",-1),ne=e.createElementVNode("p",{class:"mn-semi"},"Your username will be used for URL of profile like thecommunephuket/users/username",-1),le=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),ue={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},ce=e.createElementVNode("h4",null,"Upload userpic",-1),de=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),me=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),pe=e.createElementVNode("h3",{class:"mn-small"},"Account",-1),x={__name:"ProfileEdit",async setup(n){let t,d;e.ref(null);const f=v.useRoute(),_=v.useRouter();[t,d]=e.withAsyncContext(()=>b.read({_id:u.state.user._id})),await t,d();const i=e.ref(r.current);async function m(){await b.update(r.current)}async function a(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(r.current.status="removed",await b.update(r.current),u.actions.logout())}function l(){_.replace({name:"User Profile",params:{_id:r.current._id}})}return(c,s)=>(e.openBlock(),e.createElementBlock("div",oe,[e.unref(f).params._id===u.state.user._id?(e.openBlock(),e.createBlock(B,{key:0,user:u.state.user._id,target:i.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),ie,e.createVNode(p.Field,{field:i.value.username,"onUpdate:field":s[0]||(s[0]=o=>i.value.username=o),label:"@",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:c.organizationName},null,8,["field","validation"]),ne,le,e.createElementVNode("div",ue,[e.createVNode(O._sfc_main,{photo:i.value.profile.photo,"onUpdate:photo":s[1]||(s[1]=o=>i.value.profile.photo=o),uploadPath:"users/"+i.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-thin radius-extra"},null,8,["photo","uploadPath"]),ce]),e.createVNode(p.Field,{field:i.value.profile.name,"onUpdate:field":s[2]||(s[2]=o=>i.value.profile.name=o),label:"Name",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",validation:c.organizationName},null,8,["field","validation"]),e.createVNode(p.Field,{field:i.value.profile.description,"onUpdate:field":s[3]||(s[3]=o=>i.value.profile.description=o),label:"Description",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:"true",validation:c.organizationName},null,8,["field","validation"]),de,me,e.createVNode(p.Field,{field:i.value.socials.instagram,"onUpdate:field":s[4]||(s[4]=o=>i.value.socials.instagram=o),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(p.Field,{field:i.value.socials.twitter,"onUpdate:field":s[5]||(s[5]=o=>i.value.socials.twitter=o),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(p.Field,{field:i.value.socials.facebook,"onUpdate:field":s[6]||(s[6]=o=>i.value.socials.facebook=o),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(p.Field,{field:i.value.socials.telegram,"onUpdate:field":s[7]||(s[7]=o=>i.value.socials.telegram=o),label:"Telegram",placeholder:"",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["field"]),pe,e.createVNode(p.Field,{field:i.value.phone,"onUpdate:field":s[8]||(s[8]=o=>i.value.phone=o),label:"Phone",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium mn-thin radius-small",disabled:"true",validation:c.organizationName},null,8,["field","validation"]),e.createVNode(p.Field,{field:i.value.email,"onUpdate:field":s[9]||(s[9]=o=>i.value.email=o),label:"Email",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:!0,validation:c.organizationName},null,8,["field","validation"]),e.createVNode(E._sfc_main,{submit:m,callback:l,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(E._sfc_main,{submit:a,callback:c.a=()=>{e.unref(_).push({name:"Sign In"})},class:"mn-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}},fe=Object.freeze(Object.defineProperty({__proto__:null,default:x},Symbol.toStringTag,{value:"Module"})),_e=[{path:"profile/:_id",name:"User Profile",meta:{title:{en:"Profile",ru:"Профиль"}},component:()=>Promise.resolve().then(()=>ae)},{path:"profile/:_id/edit",name:"User Edit Profile",beforeEnter:[R.requiresAuth],meta:{title:{en:"Edit Profile",ru:"Редактировать Профиль"}},component:()=>Promise.resolve().then(()=>fe)},{path:"profile/:_id/blogposts",name:"User Blogposts",meta:{title:{en:"Posts",ru:"Посты"}},component:()=>Promise.resolve().then(()=>require("./ProfileBlogposts-0b81d964.js"))},{path:"profile/:_id/events",name:"User Events",meta:{title:{en:"Events",ru:"События"}},component:()=>Promise.resolve().then(()=>require("./ProfileEvents-3f7ca2c1.js"))},{path:"profile/:_id/organizations",name:"User Organizations",meta:{title:{en:"Groups",ru:"Группы"}},component:()=>Promise.resolve().then(()=>require("./ProfileOrganizations-d55ee487.js"))}];exports.Profile=P;exports.ProfileEdit=x;exports.usersRoutes=_e;exports.usersStore=M;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const w=require("./Dropdown-31115457.js"),y=require("./Menu-b5d6a0c7.js"),h=require("./MenuItem-56ae7f94.js"),V=require("./ButtonToggleMembership-15f149cb.js"),C=require("./Socials-cceaeaf2.js"),N=require("./IconCommunity-b339e806.js"),q=require("./IconEdit-c0469b45.js"),U=require("./PlaceholderUserpic-47f6f319.js"),v=require("vue-router"),u=require("./auth-06d35b82.js"),S=require("./index-b41aac19.js"),$=require("./memberships-393765d8.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const p=require("./Field-e2a43424.js"),E=require("./Button-7643c9aa.js"),O=require("./UploadImage-0f488170.js");require("./inputs.validation-d7cef32b.js");require("./states.validation-03f7cd49.js");const R=require("./auth.validation-0ce9e326.js");require("./Popup-795f5c88.js");require("vue-i18n");require("./IconCross-5bf93179.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-3ca5ab39.js");require("./reports-270f69df.js");require("./globals-928eb13c.js");require("./click-outside-0b0727d1.js");require("./IconChevronRight-a55f838e.js");require("./dribbble-8e8e169b.js");const F={class:"w-100 mn-semi radius-medium pd-medium bg-main t-black"},B={__name:"ProfileCompletion",props:{user:Object,target:Object,cta:Boolean},setup(n){const{user:t,cta:d,target:f}=n,_=e.ref(0),i=m=>{let a=0,l=0;function c(s){for(let o in s)s.hasOwnProperty(o)&&(s[o]&&typeof s[o]=="object"&&!Array.isArray(s[o])?c(s[o]):(a++,s[o]!=null&&s[o]!==""&&l++))}return c(m),a===0?0:Math.round(l/a*100)};return f&&(_.value=i(f)),(m,a)=>{const l=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",F,[e.createElementVNode("h3",null," Profile completed at "+e.toDisplayString(_.value)+"% ",1),n.cta?(e.openBlock(),e.createBlock(l,{key:0,to:{name:"User Edit Profile",params:{_id:n.user}},class:"mn-t-regular t-black bg-white w-100 button"},{default:e.withCtx(()=>[e.createTextVNode(" Fill Profile ")]),_:1},8,["to"])):e.createCommentVNode("",!0)])}}},k=S.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),r=e.reactive({all:[],current:{_id:"",username:"",email:"",phone:"",status:"",profile:{name:"",photo:"",description:"",birthday:""},socials:{facebook:"",twitter:"",instagram:"",telegram:""},roles:[]}}),b={async create(n){try{const t=await k.post("/api/users",n);return g.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async read(n={}){n.params={},n._id&&(n.params._id=n._id),n.user&&(n.params.user=n.user);try{const t=await k.get("/api/users",{params:n.params});return n._id?g.set(t.data[0],"current"):g.set(t.data,"all"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async update(n){try{const t=await k.put(`/api/users/${n._id}`,n);return g.set(t.data,"current"),Promise.resolve(t.data)}catch(t){return console.error(t),Promise.reject(t)}},async delete(n){try{await k.delete(`/api/users/${n._id}`);const t=r.all.findIndex(d=>d._id===n._id);t!==-1&&r.all.splice(t,1)}catch(t){console.error(t)}}},g={set(n,t){r[t]=n},clean(){r.current={phone:"",name:"",surname:"",birthday:"",city:"",address:"",roles:[],orders:[]}}},M=Object.freeze(Object.defineProperty({__proto__:null,actions:b,mutations:g,state:r},Symbol.toStringTag,{value:"Module"}));const I={key:0,class:"for-transition w-100"},D={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},z={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},T={class:"flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey"},A={class:"bg-black pd-thin radius-small"},L=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),j=["src"],G={class:"mn-thin"},Y={class:"mn-thin t-main t-semi"},H={class:"mn-small p-medium"},J={class:"mn-medium flex-center flex-nowrap flex"},K={class:"t-semi mn-small"},Q={key:5,class:"mn-t-small mn-thin"},W=e.createElementVNode("span",null," Backoffice ",-1),X=e.createElementVNode("span",null,"Events",-1),Z=e.createElementVNode("span",null,"Groups",-1),ee=e.createElementVNode("span",null,"Posts",-1),te=e.createElementVNode("span",null," Settings ",-1),re=e.createElementVNode("span",null," About ",-1),se=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),P={__name:"Profile",setup(n){const t=v.useRoute(),d=v.useRouter(),f=e.ref(!1);e.onMounted(async()=>{await b.read({_id:t.params._id,user:u.state.user._id}),f.value=!0});const _=({membership:m,status:a,target:l},c,s)=>{$.mutations.handleMembershipUpdate(r.current,m,a,l,c,s)};function i(){u.actions.logout(),d.push({name:"Sign In"})}return(m,a)=>f.value?(e.openBlock(),e.createElementBlock("div",I,[r.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",D," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",z,[e.unref(t).params._id===u.state.user._id&&f.value?(e.openBlock(),e.createBlock(B,{key:0,user:u.state.user._id,target:r.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",T,[e.unref(t).params._id&&e.unref(t).params._id!==u.state.user._id?(e.openBlock(),e.createBlock(w.Dropdown,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",A,[e.createVNode(w._sfc_main,{user:u.state.user._id,type:"user",target:r.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[L]),_:1},8,["user","target"]),u.state.user._id?(e.openBlock(),e.createBlock(V._sfc_main,{key:0,user:u.state.user._id,type:"user",role:"blocked",target:r.current._id,status:r.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:a[0]||(a[0]=l=>_(l,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.unref(t).params._id===u.state.user._id?(e.openBlock(),e.createBlock(q.IconEdit,{key:1,onClick:a[1]||(a[1]=l=>m.$router.push({name:"User Edit Profile",params:{_id:u.state.user._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),r.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(m.FILE_SERVER_URL||"")+r.current.profile.photo,class:"radius-extra bg-white mn-small object-fit-cover i-extra"},null,8,j)):(e.openBlock(),e.createBlock(U.PlaceholderUserpic,{key:3,class:"radius-medium mn-small i-extra"})),e.createElementVNode("h3",G,e.toDisplayString(r.current.profile.name?r.current.profile.name:"Not specified"),1),e.createElementVNode("p",Y," @"+e.toDisplayString(r.current.username?r.current.username:"Not specified"),1),e.createElementVNode("p",H,e.toDisplayString(r.current.profile.description?r.current.profile.description:"Not specified"),1),e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.current.roles,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==r.current.roles.length-1}])},e.toDisplayString(l.icon)+" "+e.toDisplayString(l.name),3))),256))]),e.createElementVNode("p",K," 👨👨👧👧 "+e.toDisplayString(r.current.numberOfSubscribers)+" followers ",1),u.state.user._id&&e.unref(t).params._id&&e.unref(t).params._id!==u.state.user._id?(e.openBlock(),e.createBlock(V._sfc_main,{key:4,user:u.state.user._id,type:"user",role:"subscriber",target:r.current._id,status:r.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:a[2]||(a[2]=l=>_(l,"isSubscriber","numberOfSubscribers")),class:"w-min mn-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(r.current.socials).some(l=>l)?(e.openBlock(),e.createElementBlock("h4",Q," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(C._sfc_main,{telegram:r.current.socials.telegram,facebook:r.current.socials.facebook,instagram:r.current.socials.instagram,twitter:r.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),u.state.access.roles&&u.state.user._id===e.unref(t).params._id&&(u.state.access.roles.includes("ROLE_MODERATOR")||u.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(y._sfc_main,{key:1,class:"mn-regular bg-black t-white"},{default:e.withCtx(()=>[e.createVNode(h._sfc_main,{onClick:a[3]||(a[3]=l=>e.unref(d).push({name:"Backoffice",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer",theme:"white"},{default:e.withCtx(()=>[W]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(y._sfc_main,{class:"mn-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(h._sfc_main,{onClick:a[4]||(a[4]=l=>e.unref(d).push({name:"User Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(N.IconEvents,{class:"i-semi",icon:!0}),X]),_:1}),e.createVNode(h._sfc_main,{onClick:a[5]||(a[5]=l=>e.unref(d).push({name:"User Organizations",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(N.IconGroups,{class:"i-semi",icon:!0}),Z]),_:1}),e.createVNode(h._sfc_main,{onClick:a[6]||(a[6]=l=>e.unref(d).push({name:"User Blogposts",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(N.IconCommunity,{class:"i-semi",icon:!0}),ee]),_:1})]),_:1}),u.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(y._sfc_main,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(h._sfc_main,{onClick:a[7]||(a[7]=l=>e.unref(d).push({name:"User Edit Profile",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[te]),_:1}),e.createVNode(h._sfc_main,{onClick:a[8]||(a[8]=l=>e.unref(d).push({name:"Legal",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[re]),_:1}),e.createVNode(h._sfc_main,{class:"cursor-pointer",onClick:a[9]||(a[9]=l=>i())},{default:e.withCtx(()=>[se]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}},ae=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"}));const oe={class:"pd-medium for-transition w-100"},ie=e.createElementVNode("h3",{class:"mn-small"},"Username",-1),ne=e.createElementVNode("p",{class:"mn-semi"},"Your username will be used for URL of profile like thecommunephuket/users/username",-1),le=e.createElementVNode("h3",{class:"mn-small"},"Profile",-1),ue={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},ce=e.createElementVNode("h4",null,"Upload userpic",-1),de=e.createElementVNode("h3",{class:"mn-small"},"Socials",-1),me=e.createElementVNode("p",{class:"mn-thin"},"Please provide only the username for social media profiles, without full links.",-1),pe=e.createElementVNode("h3",{class:"mn-small"},"Account",-1),x={__name:"ProfileEdit",async setup(n){let t,d;e.ref(null);const f=v.useRoute(),_=v.useRouter();[t,d]=e.withAsyncContext(()=>b.read({_id:u.state.user._id})),await t,d();const i=e.ref(r.current);async function m(){await b.update(r.current)}async function a(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(r.current.status="removed",await b.update(r.current),u.actions.logout())}function l(){_.replace({name:"User Profile",params:{_id:r.current._id}})}return(c,s)=>(e.openBlock(),e.createElementBlock("div",oe,[e.unref(f).params._id===u.state.user._id?(e.openBlock(),e.createBlock(B,{key:0,user:u.state.user._id,target:i.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),ie,e.createVNode(p.Field,{field:i.value.username,"onUpdate:field":s[0]||(s[0]=o=>i.value.username=o),label:"@",placeholder:"Not specified",class:"mn-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:c.organizationName},null,8,["field","validation"]),ne,le,e.createElementVNode("div",ue,[e.createVNode(O._sfc_main,{photo:i.value.profile.photo,"onUpdate:photo":s[1]||(s[1]=o=>i.value.profile.photo=o),uploadPath:"users/"+i.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-thin radius-extra"},null,8,["photo","uploadPath"]),ce]),e.createVNode(p.Field,{field:i.value.profile.name,"onUpdate:field":s[2]||(s[2]=o=>i.value.profile.name=o),label:"Name",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium radius-small",validation:c.organizationName},null,8,["field","validation"]),e.createVNode(p.Field,{field:i.value.profile.description,"onUpdate:field":s[3]||(s[3]=o=>i.value.profile.description=o),label:"Description",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:"true",validation:c.organizationName},null,8,["field","validation"]),de,me,e.createVNode(p.Field,{field:i.value.socials.instagram,"onUpdate:field":s[4]||(s[4]=o=>i.value.socials.instagram=o),label:"Instagram",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(p.Field,{field:i.value.socials.twitter,"onUpdate:field":s[5]||(s[5]=o=>i.value.socials.twitter=o),label:"Twitter",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(p.Field,{field:i.value.socials.facebook,"onUpdate:field":s[6]||(s[6]=o=>i.value.socials.facebook=o),label:"Facebook",placeholder:"",class:"mn-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(p.Field,{field:i.value.socials.telegram,"onUpdate:field":s[7]||(s[7]=o=>i.value.socials.telegram=o),label:"Telegram",placeholder:"",class:"mn-semi bg-grey pd-medium radius-small"},null,8,["field"]),pe,e.createVNode(p.Field,{field:i.value.phone,"onUpdate:field":s[8]||(s[8]=o=>i.value.phone=o),label:"Phone",placeholder:"Not specified",class:"mn-thin bg-grey pd-medium mn-thin radius-small",disabled:"true",validation:c.organizationName},null,8,["field","validation"]),e.createVNode(p.Field,{field:i.value.email,"onUpdate:field":s[9]||(s[9]=o=>i.value.email=o),label:"Email",placeholder:"Not specified",class:"mn-semi bg-grey pd-medium radius-small",disabled:!0,validation:c.organizationName},null,8,["field","validation"]),e.createVNode(E._sfc_main,{submit:m,callback:l,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(E._sfc_main,{submit:a,callback:c.a=()=>{e.unref(_).push({name:"Sign In"})},class:"mn-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}},fe=Object.freeze(Object.defineProperty({__proto__:null,default:x},Symbol.toStringTag,{value:"Module"})),_e=[{path:"profile/:_id",name:"User Profile",meta:{title:{en:"Profile",ru:"Профиль"}},component:()=>Promise.resolve().then(()=>ae)},{path:"profile/:_id/edit",name:"User Edit Profile",beforeEnter:[R.requiresAuth],meta:{title:{en:"Edit Profile",ru:"Редактировать Профиль"}},component:()=>Promise.resolve().then(()=>fe)},{path:"profile/:_id/blogposts",name:"User Blogposts",meta:{title:{en:"Posts",ru:"Посты"}},component:()=>Promise.resolve().then(()=>require("./ProfileBlogposts-0b81d964.js"))},{path:"profile/:_id/events",name:"User Events",meta:{title:{en:"Events",ru:"События"}},component:()=>Promise.resolve().then(()=>require("./ProfileEvents-3f7ca2c1.js"))},{path:"profile/:_id/organizations",name:"User Organizations",meta:{title:{en:"Groups",ru:"Группы"}},component:()=>Promise.resolve().then(()=>require("./ProfileOrganizations-d55ee487.js"))}];exports.Profile=P;exports.ProfileEdit=x;exports.usersRoutes=_e;exports.usersStore=M;
|
package/dist/users.client.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as S, resolveComponent as B, openBlock as c, createElementBlock as y, createElementVNode as u, toDisplayString as U, createBlock as
|
1
|
+
import { ref as S, resolveComponent as B, openBlock as c, createElementBlock as y, createElementVNode as u, toDisplayString as U, createBlock as g, withCtx as p, createTextVNode as O, createCommentVNode as h, reactive as L, onMounted as D, unref as d, createVNode as n, Fragment as F, renderList as T, normalizeClass as j, withAsyncContext as V } from "vue";
|
2
2
|
import "./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs";
|
3
3
|
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
4
4
|
import { D as G, _ as q } from "./Dropdown-cab3605b.mjs";
|
@@ -39,19 +39,19 @@ const re = { class: "w-100 mn-semi radius-medium pd-medium bg-main t-black" }, A
|
|
39
39
|
cta: Boolean
|
40
40
|
},
|
41
41
|
setup(o) {
|
42
|
-
const { user: e, cta: _, target: w } = o, k = S(0), i = (
|
42
|
+
const { user: e, cta: _, target: w } = o, k = S(0), i = (b) => {
|
43
43
|
let s = 0, l = 0;
|
44
44
|
function f(r) {
|
45
45
|
for (let a in r)
|
46
46
|
r.hasOwnProperty(a) && (r[a] && typeof r[a] == "object" && !Array.isArray(r[a]) ? f(r[a]) : (s++, r[a] != null && r[a] !== "" && l++));
|
47
47
|
}
|
48
|
-
return f(
|
48
|
+
return f(b), s === 0 ? 0 : Math.round(l / s * 100);
|
49
49
|
};
|
50
|
-
return w && (k.value = i(w)), (
|
50
|
+
return w && (k.value = i(w)), (b, s) => {
|
51
51
|
const l = B("router-link");
|
52
52
|
return c(), y("section", re, [
|
53
53
|
u("h3", null, " Profile completed at " + U(k.value) + "% ", 1),
|
54
|
-
o.cta ? (c(),
|
54
|
+
o.cta ? (c(), g(l, {
|
55
55
|
key: 0,
|
56
56
|
to: {
|
57
57
|
name: "User Edit Profile",
|
@@ -159,29 +159,29 @@ const se = {
|
|
159
159
|
}, oe = { class: "flex-center flex flex-column t-center w-100 mn-semi radius-medium pd-medium bg-grey" }, le = { class: "bg-black pd-thin radius-small" }, ne = /* @__PURE__ */ u("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), ue = ["src"], de = { class: "mn-thin" }, me = { class: "mn-thin t-main t-semi" }, ce = { class: "mn-small p-medium" }, pe = { class: "mn-medium flex-center flex-nowrap flex" }, fe = { class: "t-semi mn-small" }, _e = {
|
160
160
|
key: 5,
|
161
161
|
class: "mn-t-small mn-thin"
|
162
|
-
}, he = /* @__PURE__ */ u("span", null, " Backoffice ", -1),
|
162
|
+
}, he = /* @__PURE__ */ u("span", null, " Backoffice ", -1), ge = /* @__PURE__ */ u("span", null, "Events", -1), be = /* @__PURE__ */ u("span", null, "Groups", -1), ve = /* @__PURE__ */ u("span", null, "Posts", -1), ye = /* @__PURE__ */ u("span", null, " Settings ", -1), we = /* @__PURE__ */ u("span", null, " About ", -1), ke = /* @__PURE__ */ u("span", { class: "t-red" }, " Logout ", -1), Pe = {
|
163
163
|
__name: "Profile",
|
164
164
|
setup(o) {
|
165
165
|
const e = I(), _ = z(), w = S(!1);
|
166
166
|
D(async () => {
|
167
167
|
await x.read({ _id: e.params._id, user: m.user._id }), w.value = !0;
|
168
168
|
});
|
169
|
-
const k = ({ membership:
|
170
|
-
Z.handleMembershipUpdate(t.current,
|
169
|
+
const k = ({ membership: b, status: s, target: l }, f, r) => {
|
170
|
+
Z.handleMembershipUpdate(t.current, b, s, l, f, r);
|
171
171
|
};
|
172
172
|
function i() {
|
173
173
|
M.logout(), _.push({ name: "Sign In" });
|
174
174
|
}
|
175
|
-
return (
|
175
|
+
return (b, s) => w.value ? (c(), y("div", se, [
|
176
176
|
t.current.status === "removed" ? (c(), y("div", ae, " Sorry, user has been removed. ")) : (c(), y("div", ie, [
|
177
|
-
d(e).params._id === m.user._id && w.value ? (c(),
|
177
|
+
d(e).params._id === m.user._id && w.value ? (c(), g(A, {
|
178
178
|
key: 0,
|
179
179
|
user: m.user._id,
|
180
180
|
target: t.current,
|
181
181
|
cta: !0
|
182
182
|
}, null, 8, ["user", "target"])) : h("", !0),
|
183
183
|
u("section", oe, [
|
184
|
-
d(e).params._id && d(e).params._id !== m.user._id ? (c(),
|
184
|
+
d(e).params._id && d(e).params._id !== m.user._id ? (c(), g(G, {
|
185
185
|
key: 0,
|
186
186
|
label: "...",
|
187
187
|
align: "right",
|
@@ -201,7 +201,7 @@ const se = {
|
|
201
201
|
]),
|
202
202
|
_: 1
|
203
203
|
}, 8, ["user", "target"]),
|
204
|
-
m.user._id ? (c(),
|
204
|
+
m.user._id ? (c(), g(C, {
|
205
205
|
key: 0,
|
206
206
|
user: m.user._id,
|
207
207
|
type: "user",
|
@@ -216,9 +216,9 @@ const se = {
|
|
216
216
|
]),
|
217
217
|
_: 1
|
218
218
|
}, 8, ["label"])) : h("", !0),
|
219
|
-
d(e).params._id === m.user._id ? (c(),
|
219
|
+
d(e).params._id === m.user._id ? (c(), g(Q, {
|
220
220
|
key: 1,
|
221
|
-
onClick: s[1] || (s[1] = (l) =>
|
221
|
+
onClick: s[1] || (s[1] = (l) => b.$router.push({
|
222
222
|
name: "User Edit Profile",
|
223
223
|
params: {
|
224
224
|
_id: m.user._id
|
@@ -228,9 +228,9 @@ const se = {
|
|
228
228
|
})) : h("", !0),
|
229
229
|
t.current.profile.photo.length > 0 ? (c(), y("img", {
|
230
230
|
key: 2,
|
231
|
-
src: (
|
231
|
+
src: (b.FILE_SERVER_URL || "") + t.current.profile.photo,
|
232
232
|
class: "radius-extra bg-white mn-small object-fit-cover i-extra"
|
233
|
-
}, null, 8, ue)) : (c(),
|
233
|
+
}, null, 8, ue)) : (c(), g(W, {
|
234
234
|
key: 3,
|
235
235
|
class: "radius-medium mn-small i-extra"
|
236
236
|
})),
|
@@ -243,7 +243,7 @@ const se = {
|
|
243
243
|
}, U(l.icon) + " " + U(l.name), 3))), 256))
|
244
244
|
]),
|
245
245
|
u("p", fe, " 👨👨👧👧 " + U(t.current.numberOfSubscribers) + " followers ", 1),
|
246
|
-
m.user._id && d(e).params._id && d(e).params._id !== m.user._id ? (c(),
|
246
|
+
m.user._id && d(e).params._id && d(e).params._id !== m.user._id ? (c(), g(C, {
|
247
247
|
key: 4,
|
248
248
|
user: m.user._id,
|
249
249
|
type: "user",
|
@@ -263,9 +263,9 @@ const se = {
|
|
263
263
|
class: "mn-r-auto mn-l-auto"
|
264
264
|
}, null, 8, ["telegram", "facebook", "instagram", "twitter"])
|
265
265
|
]),
|
266
|
-
m.access.roles && m.user._id === d(e).params._id && (m.access.roles.includes("ROLE_MODERATOR") || m.access.roles.includes("ROLE_ADMIN")) ? (c(),
|
266
|
+
m.access.roles && m.user._id === d(e).params._id && (m.access.roles.includes("ROLE_MODERATOR") || m.access.roles.includes("ROLE_ADMIN")) ? (c(), g(N, {
|
267
267
|
key: 1,
|
268
|
-
class: "bg-black t-white"
|
268
|
+
class: "mn-regular bg-black t-white"
|
269
269
|
}, {
|
270
270
|
default: p(() => [
|
271
271
|
n(P, {
|
@@ -286,7 +286,7 @@ const se = {
|
|
286
286
|
]),
|
287
287
|
_: 1
|
288
288
|
})) : h("", !0),
|
289
|
-
n(N, { class: "bg-grey" }, {
|
289
|
+
n(N, { class: "mn-regular bg-grey" }, {
|
290
290
|
default: p(() => [
|
291
291
|
n(P, {
|
292
292
|
onClick: s[4] || (s[4] = (l) => d(_).push({ name: "User Events", params: { _id: d(e).params._id } })),
|
@@ -297,7 +297,7 @@ const se = {
|
|
297
297
|
class: "i-semi",
|
298
298
|
icon: !0
|
299
299
|
}),
|
300
|
-
|
300
|
+
ge
|
301
301
|
]),
|
302
302
|
_: 1
|
303
303
|
}),
|
@@ -310,7 +310,7 @@ const se = {
|
|
310
310
|
class: "i-semi",
|
311
311
|
icon: !0
|
312
312
|
}),
|
313
|
-
|
313
|
+
be
|
314
314
|
]),
|
315
315
|
_: 1
|
316
316
|
}),
|
@@ -330,7 +330,7 @@ const se = {
|
|
330
330
|
]),
|
331
331
|
_: 1
|
332
332
|
}),
|
333
|
-
m.user._id === d(e).params._id ? (c(),
|
333
|
+
m.user._id === d(e).params._id ? (c(), g(N, {
|
334
334
|
key: 2,
|
335
335
|
class: "bg-grey"
|
336
336
|
}, {
|
@@ -390,7 +390,7 @@ const $e = { class: "pd-medium for-transition w-100" }, xe = /* @__PURE__ */ u("
|
|
390
390
|
const w = I(), k = z();
|
391
391
|
[e, _] = V(() => x.read({ _id: m.user._id })), await e, _();
|
392
392
|
const i = S(t.current);
|
393
|
-
async function
|
393
|
+
async function b() {
|
394
394
|
await x.update(t.current);
|
395
395
|
}
|
396
396
|
async function s() {
|
@@ -400,7 +400,7 @@ const $e = { class: "pd-medium for-transition w-100" }, xe = /* @__PURE__ */ u("
|
|
400
400
|
k.replace({ name: "User Profile", params: { _id: t.current._id } });
|
401
401
|
}
|
402
402
|
return (f, r) => (c(), y("div", $e, [
|
403
|
-
d(w).params._id === m.user._id ? (c(),
|
403
|
+
d(w).params._id === m.user._id ? (c(), g(A, {
|
404
404
|
key: 0,
|
405
405
|
user: m.user._id,
|
406
406
|
target: i.value,
|
@@ -494,7 +494,7 @@ const $e = { class: "pd-medium for-transition w-100" }, xe = /* @__PURE__ */ u("
|
|
494
494
|
validation: f.organizationName
|
495
495
|
}, null, 8, ["field", "validation"]),
|
496
496
|
n(R, {
|
497
|
-
submit:
|
497
|
+
submit: b,
|
498
498
|
callback: l,
|
499
499
|
class: "mn-thin"
|
500
500
|
}, {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ozdao/prometheus-framework",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.38",
|
4
4
|
"description": "Web3 Framework focused on user experience and ease of development.",
|
5
5
|
"author": "OZ DAO <hello@ozdao.dev>",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -24,7 +24,128 @@
|
|
24
24
|
"dist/",
|
25
25
|
"src/"
|
26
26
|
],
|
27
|
-
"exports":
|
27
|
+
"exports": {
|
28
|
+
".": {
|
29
|
+
"import": "./dist/prometheus-framework.es.js",
|
30
|
+
"require": "./dist/prometheus-framework.cjs.js"
|
31
|
+
},
|
32
|
+
"./dist/main.css": {
|
33
|
+
"require": "./dist/main.css",
|
34
|
+
"import": "./dist/main.css"
|
35
|
+
},
|
36
|
+
"./dist/style.css": {
|
37
|
+
"require": "./dist/style.css",
|
38
|
+
"import": "./dist/style.css"
|
39
|
+
},
|
40
|
+
"./modules/auth/client": {
|
41
|
+
"import": "./dist/auth.client.js",
|
42
|
+
"require": "./dist/auth.client.cjs"
|
43
|
+
},
|
44
|
+
"./modules/auth/server": {
|
45
|
+
"import": "./dist/auth.server.mjs",
|
46
|
+
"require": "./dist/auth.server.js"
|
47
|
+
},
|
48
|
+
"./modules/community/client": {
|
49
|
+
"import": "./dist/community.client.js",
|
50
|
+
"require": "./dist/community.client.cjs"
|
51
|
+
},
|
52
|
+
"./modules/community/server": {
|
53
|
+
"import": "./dist/community.server.mjs",
|
54
|
+
"require": "./dist/community.server.js"
|
55
|
+
},
|
56
|
+
"./modules/globals/client": {
|
57
|
+
"import": "./dist/globals.client.js",
|
58
|
+
"require": "./dist/globals.client.cjs"
|
59
|
+
},
|
60
|
+
"./modules/globals/server": {
|
61
|
+
"import": "./dist/globals.server.mjs",
|
62
|
+
"require": "./dist/globals.server.js"
|
63
|
+
},
|
64
|
+
"./modules/orders/client": {
|
65
|
+
"import": "./dist/orders.client.js",
|
66
|
+
"require": "./dist/orders.client.cjs"
|
67
|
+
},
|
68
|
+
"./modules/orders/server": {
|
69
|
+
"import": "./dist/orders.server.mjs",
|
70
|
+
"require": "./dist/orders.server.js"
|
71
|
+
},
|
72
|
+
"./modules/organizations/client": {
|
73
|
+
"import": "./dist/organizations.client.js",
|
74
|
+
"require": "./dist/organizations.client.cjs"
|
75
|
+
},
|
76
|
+
"./modules/organizations/server": {
|
77
|
+
"import": "./dist/organizations.server.mjs",
|
78
|
+
"require": "./dist/organizations.server.js"
|
79
|
+
},
|
80
|
+
"./modules/products/client": {
|
81
|
+
"import": "./dist/products.client.js",
|
82
|
+
"require": "./dist/products.client.cjs"
|
83
|
+
},
|
84
|
+
"./modules/products/server": {
|
85
|
+
"import": "./dist/products.server.mjs",
|
86
|
+
"require": "./dist/products.server.js"
|
87
|
+
},
|
88
|
+
"./modules/spots/client": {
|
89
|
+
"import": "./dist/spots.client.js",
|
90
|
+
"require": "./dist/spots.client.cjs"
|
91
|
+
},
|
92
|
+
"./modules/spots/server": {
|
93
|
+
"import": "./dist/spots.server.mjs",
|
94
|
+
"require": "./dist/spots.server.js"
|
95
|
+
},
|
96
|
+
"./modules/users/client": {
|
97
|
+
"import": "./dist/users.client.js",
|
98
|
+
"require": "./dist/users.client.cjs"
|
99
|
+
},
|
100
|
+
"./modules/users/server": {
|
101
|
+
"import": "./dist/users.server.mjs",
|
102
|
+
"require": "./dist/users.server.js"
|
103
|
+
},
|
104
|
+
"./modules/events/server": {
|
105
|
+
"import": "./dist/events.server.mjs",
|
106
|
+
"require": "./dist/events.server.js"
|
107
|
+
},
|
108
|
+
"./modules/events/client": {
|
109
|
+
"import": "./dist/events.client.js",
|
110
|
+
"require": "./dist/events.client.cjs"
|
111
|
+
},
|
112
|
+
"./modules/files/client": {
|
113
|
+
"import": "./dist/files.client.js",
|
114
|
+
"require": "./dist/files.client.cjs"
|
115
|
+
},
|
116
|
+
"./modules/files/server": {
|
117
|
+
"import": "./dist/files.server.mjs",
|
118
|
+
"require": "./dist/files.server.js"
|
119
|
+
},
|
120
|
+
"./modules/landing/client": {
|
121
|
+
"import": "./dist/landing.client.js",
|
122
|
+
"require": "./dist/landing.client.cjs"
|
123
|
+
},
|
124
|
+
"./modules/gallery/server": {
|
125
|
+
"import": "./dist/gallery.server.mjs",
|
126
|
+
"require": "./dist/gallery.server.js"
|
127
|
+
},
|
128
|
+
"./modules/backoffice/client": {
|
129
|
+
"import": "./dist/backoffice.client.js",
|
130
|
+
"require": "./dist/backoffice.client.cjs"
|
131
|
+
},
|
132
|
+
"./modules/legal/client": {
|
133
|
+
"import": "./dist/legal.client.js",
|
134
|
+
"require": "./dist/legal.client.cjs"
|
135
|
+
},
|
136
|
+
"./modules/reports/client": {
|
137
|
+
"import": "./dist/reports.client.js",
|
138
|
+
"require": "./dist/reports.client.cjs"
|
139
|
+
},
|
140
|
+
"./modules/reports/server": {
|
141
|
+
"import": "./dist/reports.server.mjs",
|
142
|
+
"require": "./dist/reports.server.js"
|
143
|
+
},
|
144
|
+
"./modules/icons": {
|
145
|
+
"import": "./dist/icons.client.js",
|
146
|
+
"require": "./dist/icons.client.cjs"
|
147
|
+
}
|
148
|
+
},
|
28
149
|
"browser": {
|
29
150
|
".": "./dist/prometheus-framework.es.js"
|
30
151
|
},
|