|  |  | @ -90,10 +90,12 @@ | 
			
		
	
		
			
				
					|  |  |  |             </div> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             <div class="grow"> | 
			
		
	
		
			
				
					|  |  |  |               <h2 class="text-base font-semibold">Canyon cleanup</h2> | 
			
		
	
		
			
				
					|  |  |  |               <h2 class="text-base font-semibold">{{ project.name }}</h2> | 
			
		
	
		
			
				
					|  |  |  |               <div class="text-sm"> | 
			
		
	
		
			
				
					|  |  |  |                 <fa icon="user" class="fa-fw text-slate-400"></fa> | 
			
		
	
		
			
				
					|  |  |  |                 {{ project.name }} | 
			
		
	
		
			
				
					|  |  |  |                 {{ | 
			
		
	
		
			
				
					|  |  |  |                   didInfo(project.issuerDid, activeDid, allMyDids, allContacts) | 
			
		
	
		
			
				
					|  |  |  |                 }} | 
			
		
	
		
			
				
					|  |  |  |               </div> | 
			
		
	
		
			
				
					|  |  |  |             </div> | 
			
		
	
		
			
				
					|  |  |  |           </a> | 
			
		
	
	
		
			
				
					|  |  | @ -111,8 +113,10 @@ | 
			
		
	
		
			
				
					|  |  |  | import { Component, Vue } from "vue-facing-decorator"; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import { accountsDB, db } from "@/db"; | 
			
		
	
		
			
				
					|  |  |  | import { Contact } from "@/db/tables/contacts"; | 
			
		
	
		
			
				
					|  |  |  | import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; | 
			
		
	
		
			
				
					|  |  |  | import { accessToken } from "@/libs/crypto"; | 
			
		
	
		
			
				
					|  |  |  | import { didInfo } from "@/libs/endorserServer"; | 
			
		
	
		
			
				
					|  |  |  | import AlertMessage from "@/components/AlertMessage"; | 
			
		
	
		
			
				
					|  |  |  | import QuickNav from "@/components/QuickNav"; | 
			
		
	
		
			
				
					|  |  |  | import InfiniteScroll from "@/components/InfiniteScroll"; | 
			
		
	
	
		
			
				
					|  |  | @ -122,6 +126,8 @@ import InfiniteScroll from "@/components/InfiniteScroll"; | 
			
		
	
		
			
				
					|  |  |  | }) | 
			
		
	
		
			
				
					|  |  |  | export default class DiscoverView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |   activeDid = ""; | 
			
		
	
		
			
				
					|  |  |  |   allContacts: Array<Contact> = []; | 
			
		
	
		
			
				
					|  |  |  |   allMyDids: Array<string> = []; | 
			
		
	
		
			
				
					|  |  |  |   apiServer = ""; | 
			
		
	
		
			
				
					|  |  |  |   searchTerms = ""; | 
			
		
	
		
			
				
					|  |  |  |   alertMessage = ""; | 
			
		
	
	
		
			
				
					|  |  | @ -133,11 +139,20 @@ export default class DiscoverView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |   remoteCount = 0; | 
			
		
	
		
			
				
					|  |  |  |   isLoading = false; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   // make this function available to the Vue template | 
			
		
	
		
			
				
					|  |  |  |   didInfo = didInfo; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   async mounted() { | 
			
		
	
		
			
				
					|  |  |  |     await db.open(); | 
			
		
	
		
			
				
					|  |  |  |     const settings = await db.settings.get(MASTER_SETTINGS_KEY); | 
			
		
	
		
			
				
					|  |  |  |     this.activeDid = settings?.activeDid || ""; | 
			
		
	
		
			
				
					|  |  |  |     this.apiServer = settings?.apiServer || ""; | 
			
		
	
		
			
				
					|  |  |  |     this.allContacts = await db.contacts.toArray(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     await accountsDB.open(); | 
			
		
	
		
			
				
					|  |  |  |     const allAccounts = await accountsDB.accounts.toArray(); | 
			
		
	
		
			
				
					|  |  |  |     this.allMyDids = allAccounts.map((acc) => acc.did); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.searchLocal(); | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -166,7 +181,6 @@ export default class DiscoverView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |   public async search(beforeId?: string) { | 
			
		
	
		
			
				
					|  |  |  |     let queryParams = "claimContents=" + encodeURIComponent(this.searchTerms); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     console.log(beforeId); | 
			
		
	
		
			
				
					|  |  |  |     if (beforeId) { | 
			
		
	
		
			
				
					|  |  |  |       queryParams = queryParams + `&beforeId=${beforeId}`; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  | @ -204,9 +218,8 @@ export default class DiscoverView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |       const plans: ProjectData[] = results.data; | 
			
		
	
		
			
				
					|  |  |  |       if (plans) { | 
			
		
	
		
			
				
					|  |  |  |         for (const plan of plans) { | 
			
		
	
		
			
				
					|  |  |  |           const { name, description, handleId = plan.handleId, rowid } = plan; | 
			
		
	
		
			
				
					|  |  |  |           console.log("here"); | 
			
		
	
		
			
				
					|  |  |  |           this.projects.push({ name, description, handleId, rowid }); | 
			
		
	
		
			
				
					|  |  |  |           const { name, description, handleId, rowid, issuerDid } = plan; | 
			
		
	
		
			
				
					|  |  |  |           this.projects.push({ name, description, handleId, rowid, issuerDid }); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.remoteCount = this.projects.length; | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
	
		
			
				
					|  |  | @ -310,8 +323,6 @@ export default class DiscoverView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |   async loadMoreData(payload: boolean) { | 
			
		
	
		
			
				
					|  |  |  |     if (this.projects.length > 0 && payload) { | 
			
		
	
		
			
				
					|  |  |  |       const latestProject = this.projects[this.projects.length - 1]; | 
			
		
	
		
			
				
					|  |  |  |       console.log("rowid", latestProject, payload); | 
			
		
	
		
			
				
					|  |  |  |       console.log(Object.keys(latestProject)); | 
			
		
	
		
			
				
					|  |  |  |       if (this.isLocalActive) { | 
			
		
	
		
			
				
					|  |  |  |         this.searchLocal(latestProject["rowid"]); | 
			
		
	
		
			
				
					|  |  |  |       } else if (this.isRemoteActive) { | 
			
		
	
	
		
			
				
					|  |  | 
 |