From d293d0c3e2721f91cdf87688713213d72a004757 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 20 Mar 2023 09:19:40 -0600 Subject: [PATCH] show/hide given totals based on setting rather than URL parameter --- project.yaml | 2 ++ src/views/ContactsView.vue | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/project.yaml b/project.yaml index a94ad5a8..6b17aae6 100644 --- a/project.yaml +++ b/project.yaml @@ -17,6 +17,8 @@ - .5 Add page to show seed. - 01 Provide a way to import the non-sensitive data. - 01 Provide way to share your contact info. + - 01 register others + - .2 move all "identity" references to temporary account access - .1 remove "scan new contact" - contacts v+ : diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 0f0cccee..fa910419 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -135,13 +135,14 @@ import { AxiosError } from "axios"; import * as didJwt from "did-jwt"; import * as R from "ramda"; +import { IIdentifier } from "@veramo/core"; import { Options, Vue } from "vue-class-component"; import { AppString } from "@/constants/app"; import { accessToken, SimpleSigner } from "@/libs/crypto"; -import { IIdentifier } from "@veramo/core"; -import { accountsDB, db } from "../db"; -import { Contact } from "../db/tables/contacts"; +import { accountsDB, db } from "@/db"; +import { Contact } from "@/db/tables/contacts"; +import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; export interface GiveVerifiableCredential { "@context": string; @@ -174,13 +175,12 @@ export default class ContactsView extends Vue { this.identity = JSON.parse(accounts[0].identity); await db.open(); - this.contacts = await db.contacts.toArray(); - - const params = new URLSearchParams(window.location.search); - this.showGiveTotals = params.get("showGiveTotals") == "true"; + const settings = await db.settings.get(MASTER_SETTINGS_KEY); + this.showGiveTotals = !!settings?.showContactGivesInline; if (this.showGiveTotals) { this.loadGives(); } + this.contacts = await db.contacts.toArray(); } async onClickNewContact(): Promise {