From 230773a91773e8f7a1c37709c9f5c5c05ed4c52e Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Thu, 20 Jun 2024 20:52:26 -0600 Subject: [PATCH 01/11] add Confirm Gift screen for simpler confirmation --- src/components/GiftedDialog.vue | 2 +- src/libs/util.ts | 4 +- src/main.ts | 6 + src/router/index.ts | 9 +- src/views/ClaimView.vue | 37 +- src/views/ConfirmGiftView.vue | 933 +++++++++++++++++++++++++++++ src/views/DiscoverView.vue | 2 +- src/views/GiftedDetails.vue | 4 +- src/views/HomeView.vue | 12 +- src/views/IdentitySwitcherView.vue | 13 +- src/views/ProjectViewView.vue | 4 +- 11 files changed, 992 insertions(+), 34 deletions(-) create mode 100644 src/views/ConfirmGiftView.vue diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 9dd8f01..183ac97 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -54,7 +54,7 @@ }" class="text-blue-500" > - Photo, ... + Photo & Details ... diff --git a/src/libs/util.ts b/src/libs/util.ts index 0bd8016..97fe9c1 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -70,7 +70,7 @@ export const isGlobalUri = (uri: string) => { return uri && uri.match(new RegExp(/^[A-Za-z][A-Za-z0-9+.-]+:/)); }; -export const giveIsConfirmable = (veriClaim: GenericCredWrapper) => { +export const isGiveAction = (veriClaim: GenericCredWrapper) => { return veriClaim.claimType === "GiveAction"; }; @@ -91,7 +91,7 @@ export const isGiveRecordTheUserCanConfirm = ( confirmerIdList: string[] = [], ) => { return ( - giveIsConfirmable(veriClaim) && + isGiveAction(veriClaim) && !confirmerIdList.includes(activeDid) && veriClaim.issuer !== activeDid && !containsHiddenDid(veriClaim.claim) diff --git a/src/main.ts b/src/main.ts index bd183f3..8b33ed3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,10 +11,12 @@ import "./assets/styles/tailwind.css"; import { library } from "@fortawesome/fontawesome-svg-core"; import { + faArrowDown, faArrowLeft, faArrowRight, faArrowRotateBackward, faArrowUpRightFromSquare, + faArrowUp, faBan, faBitcoinSign, faBurst, @@ -47,6 +49,7 @@ import { faGlobe, faHammer, faHand, + faHandHoldingDollar, faHandHoldingHeart, faHouseChimney, faImagePortrait, @@ -77,10 +80,12 @@ import { } from "@fortawesome/free-solid-svg-icons"; library.add( + faArrowDown, faArrowLeft, faArrowRight, faArrowRotateBackward, faArrowUpRightFromSquare, + faArrowUp, faBan, faBitcoinSign, faBurst, @@ -113,6 +118,7 @@ library.add( faGlobe, faHammer, faHand, + faHandHoldingDollar, faHandHoldingHeart, faHouseChimney, faImagePortrait, diff --git a/src/router/index.ts b/src/router/index.ts index 1189599..c44739d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -43,14 +43,19 @@ const routes: Array = [ name: "confirm-contact", component: () => import("../views/ConfirmContactView.vue"), }, + { + path: "/confirm-gift/:id?", + name: "confirm-gift", + component: () => import("@/views/ConfirmGiftView.vue"), + }, { path: "/contact-amounts", name: "contact-amounts", component: () => import("../views/ContactAmountsView.vue"), }, { - path: "/contact-gives", - name: "contact-gives", + path: "/contact-gift", + name: "contact-gift", component: () => import("../views/ContactGiftingView.vue"), }, { diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index 8b8e5a0..22c04a5 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -10,7 +10,7 @@ @click="$router.go(-1)" class="text-lg text-center px-2 py-1 absolute -left-2 -top-1" > - + Verifiable Claim Details @@ -35,16 +35,16 @@ " class="ml-2 mr-2" > - + Copied ID
- + {{ veriClaim.claim?.description }}
- + {{ veriClaim.issuer }} Copied DID
- + {{ veriClaim.issuedAt?.replace(/T/, " ").replace(/Z/, " UTC") }}
@@ -121,7 +121,7 @@ -
+
+ + + Confirmation Details... + + + - - - Record One of Your Own - + + {{ issuerName }} posted that.
@@ -298,7 +268,8 @@ @click="showDetails = !showDetails" > {{ serverUtil.containsHiddenDid(veriClaim) ? "Visible " : "" }}Details - ... + +
Date: Fri, 21 Jun 2024 19:13:19 -0600 Subject: [PATCH 03/11] give-detail page: add more-correct parameters from confirm-give page, and allow toggling of project & user-recipient --- src/main.ts | 2 + src/views/ConfirmGiftView.vue | 163 +++++++++++++++------------------- src/views/GiftedDetails.vue | 58 +++++++++--- 3 files changed, 121 insertions(+), 102 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8b33ed3..384c648 100644 --- a/src/main.ts +++ b/src/main.ts @@ -69,6 +69,7 @@ import { faRotate, faShareNodes, faSpinner, + faSquare, faSquareCaretDown, faSquareCaretUp, faSquarePlus, @@ -138,6 +139,7 @@ library.add( faRotate, faShareNodes, faSpinner, + faSquare, faSquareCaretDown, faSquareCaretUp, faSquarePlus, diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index 7fdf258..d9ae300 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -27,7 +27,7 @@
-
+
- People {{ profileImageUrl ? "without your image" : "" }} see this: + People {{ profileImageUrl ? "without your image" : "" }} see this
- (if you've let them see your activity) + (if you've let them see your activity):
Copied
+ +
+ + Activity + +
@@ -387,7 +393,7 @@ > Contacts Display - Show amounts given + Show hours given & received
diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index d9f13e9..e8b5160 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -47,7 +47,7 @@ class="text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 py-1 rounded-md" @click="toggleShowContactAmounts()" > - {{ showGiveNumbers ? "Hide Given Numbers" : "Show Given Numbers" }} + {{ showGiveNumbers ? "Hide Given Hours" : "Show Given Hours" }}
From 08e1ce648651e6ed1d76de7aa767185590bfd386 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 22 Jun 2024 11:47:10 -0600 Subject: [PATCH 07/11] fix prompt for already-registered contacts (plus some verbiage) --- src/views/ConfirmGiftView.vue | 7 +------ src/views/ContactsView.vue | 2 +- src/views/ProjectsView.vue | 5 +++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index d9ae300..ce70fbb 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -71,12 +71,7 @@
gave
- {{ - displayAmount( - giveDetails.unit, - giveDetails.amount, - ) - }} + {{ displayAmount(giveDetails.unit, giveDetails.amount) }}
diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index e8b5160..f2f2faa 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -680,7 +680,7 @@ export default class ContactsView extends Vue { nextPubKeyHashB64: payload.own.nextPublicEncKeyHash, profileImageUrl: payload.own.profileImageUrl, publicKeyBase64: payload.own.publicEncKey, - isRegistered: payload.own.isRegistered, + registered: payload.own.registered, } as Contact); } } diff --git a/src/views/ProjectsView.vue b/src/views/ProjectsView.vue index 4d53979..d4c003c 100644 --- a/src/views/ProjectsView.vue +++ b/src/views/ProjectsView.vue @@ -190,8 +190,9 @@
You have not announced any projects.
- Try the big - button. + Hit the big + + button. You'll never know until you try.
  • Date: Sat, 22 Jun 2024 12:06:55 -0600 Subject: [PATCH 08/11] fix checkbox verbiage when no project is chosen for a give --- src/views/GiftedDetails.vue | 43 +++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/src/views/GiftedDetails.vue b/src/views/GiftedDetails.vue index da6f516..c0f746f 100644 --- a/src/views/GiftedDetails.vue +++ b/src/views/GiftedDetails.vue @@ -78,7 +78,7 @@
    - +
    @@ -106,7 +110,7 @@ icon="square" class="bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded" @click=" - notifyUser('Cannot be both given to a project and also given to you.') + notifyUser('You cannot assign this both a project and also to you.') " /> @@ -114,7 +118,7 @@
    - +

    @@ -450,6 +454,31 @@ export default class GiftedDetails extends Vue { ); } + notifyUserOfProject() { + if (!this.projectId) { + this.$notify( + { + group: "alert", + type: "warning", + title: "Error", + text: "To assign to a project, you must open this dialog through a project.", + }, + 3000, + ); + } else { + // must be because givenToUser is true + this.$notify( + { + group: "alert", + type: "warning", + title: "Error", + text: "You cannot assign both to a project and to yourself.", + }, + 3000, + ); + } + } + /** * * @param giverDid may be null From 810f3074427b99acd34f05af06b1b1d5025e385f Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 22 Jun 2024 12:23:10 -0600 Subject: [PATCH 09/11] bump to v 0.3.14 --- CHANGELOG.md | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- src/views/GiftedDetails.vue | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d0a7df..52f6075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.3.14] +### Added +- Clearer give-confirmation screen +- BX currency https://thebx.medium.com/ +- Deselection of project on gifted details page +### Fixed +- Don't show registration pop-up for a new contact that is registered ### Changed in DB or environment - Nothing diff --git a/package-lock.json b/package-lock.json index 4e2bab3..12ec280 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.14-beta", + "version": "0.3.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.14-beta", + "version": "0.3.14", "dependencies": { "@dicebear/collection": "^5.4.1", "@dicebear/core": "^5.4.1", diff --git a/package.json b/package.json index 1d6f317..0a77f0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.14-beta", + "version": "0.3.14", "private": true, "scripts": { "dev": "vite", diff --git a/src/views/GiftedDetails.vue b/src/views/GiftedDetails.vue index c0f746f..16758f6 100644 --- a/src/views/GiftedDetails.vue +++ b/src/views/GiftedDetails.vue @@ -118,7 +118,7 @@

    - +

    From 8f2bebe8aea6bf2d8d32659718ba58044c1c13f1 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 22 Jun 2024 12:23:57 -0600 Subject: [PATCH 10/11] bump version and add "-beta" --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 12ec280..750d59f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.14", + "version": "0.3.15-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.14", + "version": "0.3.15-beta", "dependencies": { "@dicebear/collection": "^5.4.1", "@dicebear/core": "^5.4.1", diff --git a/package.json b/package.json index 0a77f0f..de9099a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.14", + "version": "0.3.15-beta", "private": true, "scripts": { "dev": "vite", From 1639e7cf254c9ecd712a8242307e0ccc5d3a69a6 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 22 Jun 2024 12:34:30 -0600 Subject: [PATCH 11/11] move & resize the contact edit & info buttons --- src/views/AccountViewView.vue | 2 +- src/views/ContactsView.vue | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index d97977d..a1e1de2 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -57,7 +57,7 @@

    {{ givenName }} - +

    diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index f2f2faa..38fd167 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -90,20 +90,27 @@ {{ contact.name || AppString.NO_CONTACT_NAME }} + + +
    {{ contact.did }} @@ -118,14 +125,6 @@ > - - - Copied DID