|
@ -256,7 +256,7 @@ import { NotificationIface } from "@/constants/app"; |
|
|
import { IIdentifier } from "@veramo/core"; |
|
|
import { IIdentifier } from "@veramo/core"; |
|
|
import { accountsDB, db } from "@/db/index"; |
|
|
import { accountsDB, db } from "@/db/index"; |
|
|
import { Contact } from "@/db/tables/contacts"; |
|
|
import { Contact } from "@/db/tables/contacts"; |
|
|
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; |
|
|
import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings"; |
|
|
import { |
|
|
import { |
|
|
accessToken, |
|
|
accessToken, |
|
|
getContactPayloadFromJwtUrl, |
|
|
getContactPayloadFromJwtUrl, |
|
@ -271,6 +271,7 @@ import { |
|
|
import { Component, Vue } from "vue-facing-decorator"; |
|
|
import { Component, Vue } from "vue-facing-decorator"; |
|
|
import QuickNav from "@/components/QuickNav.vue"; |
|
|
import QuickNav from "@/components/QuickNav.vue"; |
|
|
import EntityIcon from "@/components/EntityIcon.vue"; |
|
|
import EntityIcon from "@/components/EntityIcon.vue"; |
|
|
|
|
|
import { Account } from "@/db/tables/accounts"; |
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires |
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires |
|
|
const Buffer = require("buffer/").Buffer; |
|
|
const Buffer = require("buffer/").Buffer; |
|
@ -308,7 +309,7 @@ export default class ContactsView extends Vue { |
|
|
|
|
|
|
|
|
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)) as Settings; |
|
|
this.activeDid = settings?.activeDid || ""; |
|
|
this.activeDid = settings?.activeDid || ""; |
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
|
|
|
|
|
@ -332,7 +333,7 @@ export default class ContactsView extends Vue { |
|
|
public async getIdentity(activeDid: string) { |
|
|
public async getIdentity(activeDid: string) { |
|
|
await accountsDB.open(); |
|
|
await accountsDB.open(); |
|
|
const accounts = await accountsDB.accounts.toArray(); |
|
|
const accounts = await accountsDB.accounts.toArray(); |
|
|
const account = R.find((acc) => acc.did === activeDid, accounts); |
|
|
const account = R.find((acc) => acc.did === activeDid, accounts) as Account; |
|
|
const identity = JSON.parse(account?.identity || "null"); |
|
|
const identity = JSON.parse(account?.identity || "null"); |
|
|
|
|
|
|
|
|
if (!identity) { |
|
|
if (!identity) { |
|
@ -765,8 +766,8 @@ export default class ContactsView extends Vue { |
|
|
-1, |
|
|
-1, |
|
|
); |
|
|
); |
|
|
} else { |
|
|
} else { |
|
|
const message = |
|
|
console.log("Got bad server response when checking visibility: ", resp); |
|
|
resp.data.error?.message || "Bad server response of " + resp.status; |
|
|
const message = resp.data.error?.message || "Got bad server response."; |
|
|
this.$notify( |
|
|
this.$notify( |
|
|
{ |
|
|
{ |
|
|
group: "alert", |
|
|
group: "alert", |
|
|