|
|
@ -148,25 +148,17 @@ export default class HomeView extends Vue { |
|
|
|
|
|
|
|
// 'created' hook runs when the Vue instance is first created |
|
|
|
async created() { |
|
|
|
try { |
|
|
|
await accountsDB.open(); |
|
|
|
this.allAccounts = await accountsDB.accounts.toArray(); |
|
|
|
await db.open(); |
|
|
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY); |
|
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
|
this.activeDid = settings?.activeDid || ""; |
|
|
|
this.allContacts = await db.contacts.toArray(); |
|
|
|
this.feedLastViewedId = settings?.lastViewedClaimId; |
|
|
|
} |
|
|
|
|
|
|
|
// 'mounted' hook runs after initial render |
|
|
|
async mounted() { |
|
|
|
try { |
|
|
|
await db.open(); |
|
|
|
const settings = await db.settings.get(MASTER_SETTINGS_KEY); |
|
|
|
this.apiServer = settings?.apiServer || ""; |
|
|
|
|
|
|
|
this.updateAllFeed(); |
|
|
|
} catch (err) { |
|
|
|
console.log("Error in mounted():", err); |
|
|
|
this.alertTitle = "Error"; |
|
|
|
this.alertMessage = |
|
|
|
err.userMessage || |
|
|
@ -217,7 +209,6 @@ export default class HomeView extends Vue { |
|
|
|
(acc) => acc.did === this.activeDid, |
|
|
|
this.allAccounts |
|
|
|
); |
|
|
|
//console.log("about to parse from", this.activeDid, account?.identity); |
|
|
|
const identity = JSON.parse(account?.identity || "null"); |
|
|
|
if (!identity) { |
|
|
|
throw new Error("No identity found."); |
|
|
|