|
|
@ -104,7 +104,7 @@ |
|
|
|
<div class="flex gap-2"> |
|
|
|
<fa icon="user" class="fa-fw text-slate-400"></fa> |
|
|
|
<span>{{ |
|
|
|
didInfo(give.agentDid, activeDid, accounts, allContacts) |
|
|
|
didInfo(give.agentDid, activeDid, allMyDids, allContacts) |
|
|
|
}}</span> |
|
|
|
</div> |
|
|
|
<div class="flex gap-2" v-if="give.amount"> |
|
|
@ -126,7 +126,7 @@ |
|
|
|
<div class="flex gap-2"> |
|
|
|
<fa icon="user" class="fa-fw text-slate-400"></fa> |
|
|
|
<span>{{ |
|
|
|
didInfo(give.agentDid, activeDid, accounts, allContacts) |
|
|
|
didInfo(give.agentDid, activeDid, allMyDids, allContacts) |
|
|
|
}}</span> |
|
|
|
</div> |
|
|
|
<div class="flex gap-2" v-if="give.amount"> |
|
|
@ -183,6 +183,7 @@ export default class ProjectViewView extends Vue { |
|
|
|
activeDid = ""; |
|
|
|
alertMessage = ""; |
|
|
|
alertTitle = ""; |
|
|
|
allMyDids: Array<string> = []; |
|
|
|
allContacts: Array<Contact> = []; |
|
|
|
apiServer = ""; |
|
|
|
description = ""; |
|
|
@ -191,17 +192,11 @@ export default class ProjectViewView extends Vue { |
|
|
|
givesByThis: Array<GiveServerRecord> = []; |
|
|
|
name = ""; |
|
|
|
issuer = ""; |
|
|
|
numAccounts = 0; |
|
|
|
projectId = localStorage.getItem("projectId") || ""; // handle ID |
|
|
|
timeSince = ""; |
|
|
|
truncatedDesc = ""; |
|
|
|
truncateLength = 40; |
|
|
|
|
|
|
|
async beforeCreate() { |
|
|
|
await accountsDB.open(); |
|
|
|
this.numAccounts = (await accountsDB.accounts?.count()) || 0; |
|
|
|
} |
|
|
|
|
|
|
|
async created() { |
|
|
|
await db.open(); |
|
|
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY); |
|
|
@ -209,9 +204,11 @@ export default class ProjectViewView extends Vue { |
|
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
|
this.allContacts = await db.contacts.toArray(); |
|
|
|
|
|
|
|
this.accounts = accountsDB.accounts; |
|
|
|
const accountsArr = await this.accounts?.toArray(); |
|
|
|
const account = accountsArr.find((acc) => acc.did === this.activeDid); |
|
|
|
await accountsDB.open(); |
|
|
|
const accounts = accountsDB.accounts; |
|
|
|
const accountsArr = await accounts?.toArray(); |
|
|
|
this.allMyDids = accountsArr.map((acc) => acc.did); |
|
|
|
const account = accountsArr?.find((acc) => acc.did === this.activeDid); |
|
|
|
const identity = JSON.parse(account?.identity || "null"); |
|
|
|
this.LoadProject(identity); |
|
|
|
} |
|
|
@ -250,8 +247,8 @@ export default class ProjectViewView extends Vue { |
|
|
|
} |
|
|
|
|
|
|
|
// Isn't there a better way to make this available to the template? |
|
|
|
didInfo(did, activeDid, identities, contacts) { |
|
|
|
return didInfo(did, activeDid, identities, contacts); |
|
|
|
didInfo(did, activeDid, dids, contacts) { |
|
|
|
return didInfo(did, activeDid, dids, contacts); |
|
|
|
} |
|
|
|
|
|
|
|
expandText() { |
|
|
|