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
24 KiB
2 lines
24 KiB
2 weeks ago
|
var G=Object.defineProperty;var R=(e,s,i)=>s in e?G(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i;var f=(e,s,i)=>R(e,typeof s!="symbol"?s+"":s,i);import{V as O,f as A,e as N,y as H,C as M,_ as V,g as C,h as r,i as a,j as o,k as m,t as g,l as u,m as J,v as W,F as k,z as I,x as n}from"./index-BLqts8WY.js";import{G as q}from"./GiftedDialog-CFmou4Be.js";import{O as Q}from"./OfferDialog-BFpCo0de.js";import{T as z}from"./TopMessage-BE0GBIgW.js";import{Q as Y}from"./QuickNav-DgCyvgDx.js";import{E as K}from"./EntityIcon-CF1RwQI5.js";import{P as X}from"./ProjectIcon-BlrP4rvy.js";import{l as Z,s as ee,e as te,g as T,B as $,aN as ie,v as se,i as oe,aO as re,C as E,k as ne,n as le,p as ae,q as de,u as ce}from"./index-MyY_xqVN.js";import{_ as he}from"./blank-square-D9dGgMJw.js";import"./index-CsfPLOYu.js";var fe=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,pe=(e,s,i,l)=>{for(var c=l>1?void 0:l?ue(s,i):s,p=e.length-1,d;p>=0;p--)(d=e[p])&&(c=(l?d(s,i,c):d(c))||c);return l&&c&&fe(s,i,c),c};let U=class extends O{constructor(){super(...arguments);f(this,"$notify");f(this,"activeDid","");f(this,"agentDid","");f(this,"allMyDids",[]);f(this,"allContacts",[]);f(this,"apiServer","");f(this,"checkingConfirmationForJwtId","");f(this,"description","");f(this,"expanded",!1);f(this,"fulfilledByThis",null);f(this,"fulfillersToThis",[]);f(this,"fulfillersToHitLimit",!1);f(this,"givesToThis",[]);f(this,"givesHitLimit",!1);f(this,"givesProvidedByThis",[]);f(this,"givesProvidedByHitLimit",!1);f(this,"imageUrl","");f(this,"isRegistered",!1);f(this,"issuer","");f(this,"latitude",0);f(this,"longitude",0);f(this,"name","");f(this,"offersToThis",[]);f(this,"offersHitLimit",!1);f(this,"projectId","");f(this,"recentlyCheckedAndUnconfirmableJwts",[]);f(this,"showDidCopy",!1);f(this,"startTime","");f(this,"truncatedDesc","");f(this,"truncateLength",40);f(this,"url","");f(this,"libsUtil",Z);f(this,"serverUtil",ee)}async created(){const i=await A();this.activeDid=i.activeDid||"",this.apiServer=i.apiServer||"",this.allContacts=await N.contacts.toArray(),this.isRegistered=!!i.isRegistered;try{this.allMyDids=await te()}catch(c){H("Error retrieving all account DIDs on home page:"+c,!0),this.$notify({group:"alert",type:"danger",title:"Error Loading Profile",text:"See the Help page to fix problems with your personal data."},-1)}const l=window.location.pathname.substring(9);l&&(this.projectId=decodeURIComponent(l)),this.loadProject(this.projectId,this.activeDid)}onEditClick(){const i={name:"new-edit-project",query:{projectId:this.projectId}};this.$router.push(i)}expandText(){this.expanded=!0}collapseText(){this.expanded=!1}async loadProject(i,l){var d,v,h,D,x,j,P,t,b,w,L,B,S;this.projectId=i;const c=this.apiServer+"/api/claim/byHandle/"+encodeURIComponent(i),p=await T(l);try{const y=await this.axios.get(c,{headers:p});if(y.status===200){const _=(d=y.data.claim)==null?void 0:d.startTime;if(_!=null){const F=new Date(_);this.startTime=F.toLocaleDateString()+" "+F.toLocaleTimeString()}this.agentDid=(h=(v=y.data.claim)==null?void 0:v.agent)==null?void 0:h.identifier,this.imageUrl=(D=y.data.claim)==null?void 0:D.image,this.issuer=y.data.issuer,this.name=((x=y.data.claim)==null?void 0:x.name)||"(no name)",this.description=((j=y.data.claim)==null?void 0:j.description)||"(no description)",this.truncatedDesc=this.description.slice(0,this.truncateLength),this.latitude=((b=(t=(P=y.data.claim)==null?void 0:P.location)==null?void 0:t.geo)==null?void 0:b.latitude)||0,this.longitude=((B=(L=(w=y.data.claim)==null?void 0:w.location)==null?void 0:L.geo)==null?void 0:B.longitude)||0,this.url=((S=y.data.claim)==null?void 0:S.url)||""}else console.error("Error getting project:",y),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was a problem getting that project."},5e3)}catch(y){console.error("Error retrieving project:",y),this.$notify({group:"alert",type:"danger",title:"Error",text:"Something went wrong retrieving that project."},5e3)}this.givesToThis=[],this.loadGives(),this.givesProvidedByThis=[],this.loadGivesProvidedBy(),this.offersToThi
|