From f281e41181759bf90eac0f56a9125d32e3da3d78 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 25 Mar 2023 19:03:25 -0600 Subject: [PATCH] add details on contact-specific page --- project.yaml | 1 + src/constants/app.ts | 2 +- src/libs/endorserServer.ts | 30 +++++ src/main.ts | 8 ++ src/views/ContactAmountsView.vue | 212 +++++++++++++++++++++++++++++- src/views/ContactsView.vue | 219 ++++++++++++++----------------- 6 files changed, 347 insertions(+), 125 deletions(-) create mode 100644 src/libs/endorserServer.ts diff --git a/project.yaml b/project.yaml index e459076c..e341de09 100644 --- a/project.yaml +++ b/project.yaml @@ -30,6 +30,7 @@ - refactor UI : - .5 Alerts show at the top and can be missed, eg. account data download + - 01 Change alerts into a component (to cut down duplicate code) - 01 Code for "nav" tabs across the bottom is duplicated on each page. - .2 Add "copied" feedback when they click "copy" on /account diff --git a/src/constants/app.ts b/src/constants/app.ts index 719735b5..60be1201 100644 --- a/src/constants/app.ts +++ b/src/constants/app.ts @@ -2,7 +2,7 @@ * Generic strings that could be used throughout the app. */ export enum AppString { - APP_NAME = "Kickstart for time", + APP_NAME = "KickStart with Time", VERSION = "0.1", DEFAULT_ENDORSER_API_SERVER = "https://test.endorser.ch:8000", //DEFAULT_ENDORSER_API_SERVER = "http://localhost:3000", diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts new file mode 100644 index 00000000..ee15d2a5 --- /dev/null +++ b/src/libs/endorserServer.ts @@ -0,0 +1,30 @@ +export const SERVICE_ID = "endorser.ch"; + +export interface GiveServerRecord { + agentDid: string; + amount: number; + confirmed: number; + description: string; + fullClaim: GiveVerifiableCredential; + handleId: string; + issuedAt: string; + recipientDid: string; + unit: string; +} + +export interface GiveVerifiableCredential { + "@context": string; + "@type": string; + agent: { identifier: string }; + description?: string; + object: { amountOfThisGood: number; unitCode: string }; + recipient: { identifier: string }; +} + +export interface RegisterVerifiableCredential { + "@context": string; + "@type": string; + agent: { identifier: string }; + object: string; + recipient: { identifier: string }; +} diff --git a/src/main.ts b/src/main.ts index 88dbedbd..cdb751d9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,7 @@ import { library } from "@fortawesome/fontawesome-svg-core"; import { faCalendar, faChevronLeft, + faCircle, faCircleCheck, faCircleQuestion, faCircleUser, @@ -19,9 +20,12 @@ import { faEllipsisVertical, faEye, faEyeSlash, + faFileLines, faFolderOpen, faHand, faHouseChimney, + faLongArrowAltLeft, + faLongArrowAltRight, faMagnifyingGlass, faPen, faPersonCircleCheck, @@ -40,6 +44,7 @@ import { library.add( faCalendar, faChevronLeft, + faCircle, faCircleCheck, faCircleQuestion, faCircleUser, @@ -47,9 +52,12 @@ library.add( faEllipsisVertical, faEye, faEyeSlash, + faFileLines, faFolderOpen, faHand, faHouseChimney, + faLongArrowAltLeft, + faLongArrowAltRight, faMagnifyingGlass, faPen, faPersonCircleCheck, diff --git a/src/views/ContactAmountsView.vue b/src/views/ContactAmountsView.vue index 9ee06fbe..ebbf5e1f 100644 --- a/src/views/ContactAmountsView.vue +++ b/src/views/ContactAmountsView.vue @@ -45,26 +45,232 @@

- Transactions with {{ contact?.name }} + Given with {{ contact?.name }}

-
{{ contact?.did }}
+ + +
+
+
+
from them
+
+
to them
+
+
+
+ {{ new Date(record.issuedAt).toLocaleString() }} +
+
+ +
+ {{ record.amount }} {{ record.unit }} + + + Confirmed + + + + Unconfirmed + +
+
+ {{ record.description }} +
+
+
+ + + + +            + + +
+
+ +
+ {{ record.amount }} {{ record.unit }} + + + Confirmed + + + + Unconfirmed + +
+
+ {{ record.description }} +
+
+
+
+ + diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 80ecc901..86ab9c87 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -122,10 +122,10 @@ @click="setVisibility(contact, false)" > - Can see you + They can see you @@ -135,11 +135,11 @@