|
@ -104,7 +104,7 @@ |
|
|
<div class="flex gap-2"> |
|
|
<div class="flex gap-2"> |
|
|
<fa icon="user" class="fa-fw text-slate-400"></fa> |
|
|
<fa icon="user" class="fa-fw text-slate-400"></fa> |
|
|
<span>{{ |
|
|
<span>{{ |
|
|
didInfo(give.agentDid, activeDid, accounts, allContacts) |
|
|
didInfo(give.agentDid, activeDid, allMyDids, allContacts) |
|
|
}}</span> |
|
|
}}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex gap-2" v-if="give.amount"> |
|
|
<div class="flex gap-2" v-if="give.amount"> |
|
@ -126,7 +126,7 @@ |
|
|
<div class="flex gap-2"> |
|
|
<div class="flex gap-2"> |
|
|
<fa icon="user" class="fa-fw text-slate-400"></fa> |
|
|
<fa icon="user" class="fa-fw text-slate-400"></fa> |
|
|
<span>{{ |
|
|
<span>{{ |
|
|
didInfo(give.agentDid, activeDid, accounts, allContacts) |
|
|
didInfo(give.agentDid, activeDid, allMyDids, allContacts) |
|
|
}}</span> |
|
|
}}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex gap-2" v-if="give.amount"> |
|
|
<div class="flex gap-2" v-if="give.amount"> |
|
@ -163,7 +163,6 @@ import { Component, Vue } from "vue-facing-decorator"; |
|
|
|
|
|
|
|
|
import GiftedDialog from "@/components/GiftedDialog.vue"; |
|
|
import GiftedDialog from "@/components/GiftedDialog.vue"; |
|
|
import { accountsDB, db } from "@/db"; |
|
|
import { accountsDB, db } from "@/db"; |
|
|
import { AccountsSchema } from "@/db/tables/accounts"; |
|
|
|
|
|
import { Contact } from "@/db/tables/contacts"; |
|
|
import { Contact } from "@/db/tables/contacts"; |
|
|
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; |
|
|
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; |
|
|
import { accessToken } from "@/libs/crypto"; |
|
|
import { accessToken } from "@/libs/crypto"; |
|
@ -179,10 +178,10 @@ import QuickNav from "@/components/QuickNav"; |
|
|
components: { GiftedDialog, AlertMessage, QuickNav }, |
|
|
components: { GiftedDialog, AlertMessage, QuickNav }, |
|
|
}) |
|
|
}) |
|
|
export default class ProjectViewView extends Vue { |
|
|
export default class ProjectViewView extends Vue { |
|
|
accounts: AccountsSchema; |
|
|
|
|
|
activeDid = ""; |
|
|
activeDid = ""; |
|
|
alertMessage = ""; |
|
|
alertMessage = ""; |
|
|
alertTitle = ""; |
|
|
alertTitle = ""; |
|
|
|
|
|
allMyDids: Array<string> = []; |
|
|
allContacts: Array<Contact> = []; |
|
|
allContacts: Array<Contact> = []; |
|
|
apiServer = ""; |
|
|
apiServer = ""; |
|
|
description = ""; |
|
|
description = ""; |
|
@ -191,18 +190,11 @@ export default class ProjectViewView extends Vue { |
|
|
givesByThis: Array<GiveServerRecord> = []; |
|
|
givesByThis: Array<GiveServerRecord> = []; |
|
|
name = ""; |
|
|
name = ""; |
|
|
issuer = ""; |
|
|
issuer = ""; |
|
|
numAccounts = 0; |
|
|
|
|
|
projectId = localStorage.getItem("projectId") || ""; // handle ID |
|
|
projectId = localStorage.getItem("projectId") || ""; // handle ID |
|
|
timeSince = ""; |
|
|
timeSince = ""; |
|
|
truncatedDesc = ""; |
|
|
truncatedDesc = ""; |
|
|
truncateLength = 40; |
|
|
truncateLength = 40; |
|
|
|
|
|
|
|
|
async beforeCreate() { |
|
|
|
|
|
accountsDB.open(); |
|
|
|
|
|
this.accounts = accountsDB.accounts; |
|
|
|
|
|
this.numAccounts = (await this.accounts?.count()) || 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async created() { |
|
|
async created() { |
|
|
await db.open(); |
|
|
await db.open(); |
|
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY); |
|
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY); |
|
@ -210,9 +202,11 @@ export default class ProjectViewView extends Vue { |
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
this.allContacts = await db.contacts.toArray(); |
|
|
this.allContacts = await db.contacts.toArray(); |
|
|
|
|
|
|
|
|
this.accounts = accountsDB.accounts; |
|
|
await accountsDB.open(); |
|
|
const accountsArr = await this.accounts?.toArray(); |
|
|
const accounts = accountsDB.accounts; |
|
|
const account = accountsArr.find((acc) => acc.did === this.activeDid); |
|
|
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"); |
|
|
const identity = JSON.parse(account?.identity || "null"); |
|
|
this.LoadProject(identity); |
|
|
this.LoadProject(identity); |
|
|
} |
|
|
} |
|
@ -251,8 +245,8 @@ export default class ProjectViewView extends Vue { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Isn't there a better way to make this available to the template? |
|
|
// Isn't there a better way to make this available to the template? |
|
|
didInfo(did, activeDid, identities, contacts) { |
|
|
didInfo(did, activeDid, dids, contacts) { |
|
|
return didInfo(did, activeDid, identities, contacts); |
|
|
return didInfo(did, activeDid, dids, contacts); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
expandText() { |
|
|
expandText() { |
|
|