Browse Source

show/hide given totals based on setting rather than URL parameter

pull/14/head
Trent Larson 2 years ago
parent
commit
d293d0c3e2
  1. 2
      project.yaml
  2. 14
      src/views/ContactsView.vue

2
project.yaml

@ -17,6 +17,8 @@
- .5 Add page to show seed. - .5 Add page to show seed.
- 01 Provide a way to import the non-sensitive data. - 01 Provide a way to import the non-sensitive data.
- 01 Provide way to share your contact info. - 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" - .1 remove "scan new contact"
- contacts v+ : - contacts v+ :

14
src/views/ContactsView.vue

@ -135,13 +135,14 @@
import { AxiosError } from "axios"; import { AxiosError } from "axios";
import * as didJwt from "did-jwt"; import * as didJwt from "did-jwt";
import * as R from "ramda"; import * as R from "ramda";
import { IIdentifier } from "@veramo/core";
import { Options, Vue } from "vue-class-component"; import { Options, Vue } from "vue-class-component";
import { AppString } from "@/constants/app"; import { AppString } from "@/constants/app";
import { accessToken, SimpleSigner } from "@/libs/crypto"; import { accessToken, SimpleSigner } from "@/libs/crypto";
import { IIdentifier } from "@veramo/core"; import { accountsDB, db } from "@/db";
import { accountsDB, db } from "../db"; import { Contact } from "@/db/tables/contacts";
import { Contact } from "../db/tables/contacts"; import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
export interface GiveVerifiableCredential { export interface GiveVerifiableCredential {
"@context": string; "@context": string;
@ -174,13 +175,12 @@ export default class ContactsView extends Vue {
this.identity = JSON.parse(accounts[0].identity); this.identity = JSON.parse(accounts[0].identity);
await db.open(); await db.open();
this.contacts = await db.contacts.toArray(); const settings = await db.settings.get(MASTER_SETTINGS_KEY);
this.showGiveTotals = !!settings?.showContactGivesInline;
const params = new URLSearchParams(window.location.search);
this.showGiveTotals = params.get("showGiveTotals") == "true";
if (this.showGiveTotals) { if (this.showGiveTotals) {
this.loadGives(); this.loadGives();
} }
this.contacts = await db.contacts.toArray();
} }
async onClickNewContact(): Promise<void> { async onClickNewContact(): Promise<void> {

Loading…
Cancel
Save