From a77d20b572d554f6af61f74a600fc7e1329adf43 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 5 Dec 2023 17:58:46 -0700 Subject: [PATCH] show appropriate icon next to amount numbers (and some docs) --- README.md | 4 ++++ project.task.yaml | 4 +++- src/main.ts | 6 +++++ src/views/AccountViewView.vue | 16 ++++++------- src/views/ContactsView.vue | 1 + src/views/HelpView.vue | 15 +++++++++++++ src/views/ProjectViewView.vue | 42 ++++++++++++++++++++++++++++------- 7 files changed, 71 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b27c591..f23c321 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ Under the "Your Identity" screen, click "Advanced", click "Switch Identity / No For your own web-push tests, change the 'vapid' URL in App.vue, and install apps on the same domain. +### Icons + +To add an icon, add to main.ts and reference with `fa` element and `icon` attribute with the hyphenated name. + ### Manual walk-through - Clear the browser cache for localhost for a new user. diff --git a/project.task.yaml b/project.task.yaml index f36b06f..c0bc9f8 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -13,8 +13,10 @@ tasks: - Discuss whether the remaining tasks are worthwhile before MVP release. -- .1 Add units or different icon to the coins (to distinguish $, BTC, hours, etc) +- .5 If notifications are not enabled, add message to front page with link/button to enable + - .5 make a VC details page, or link to endorser.ch (including confirmations) +- .3 Add URL for project - 01 allow download of each VC (& confirmations, to show that they actually own their data) - .3 check that Android shows "back" buttons on screens without bottom tray - .1 Make give description text box into something that expands as they type? diff --git a/src/main.ts b/src/main.ts index 7bcaade..de867e1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,6 +14,7 @@ import { faArrowLeft, faArrowRight, faBan, + faBitcoinSign, faBurst, faCalendar, faChevronLeft, @@ -27,6 +28,7 @@ import { faCoins, faComment, faCopy, + faDollar, faEllipsisVertical, faEye, faEyeSlash, @@ -44,6 +46,7 @@ import { faPersonCircleCheck, faPersonCircleQuestion, faPlus, + faQuestion, faQrcode, faRotate, faShareNodes, @@ -61,6 +64,7 @@ library.add( faArrowLeft, faArrowRight, faBan, + faBitcoinSign, faBurst, faCalendar, faChevronLeft, @@ -74,6 +78,7 @@ library.add( faCoins, faComment, faCopy, + faDollar, faEllipsisVertical, faEye, faEyeSlash, @@ -92,6 +97,7 @@ library.add( faPersonCircleQuestion, faPlus, faQrcode, + faQuestion, faRotate, faShareNodes, faSpinner, diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index e33d0d2..cdd8d1e 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -288,6 +288,14 @@ +
+ +
+
-
- -
-

Claim Server

+

+ How do I access even more functionality? +

+

+ There is an "Advanced" section at the bottom of the Account + page. +

+

+ There is a even more functionality in a mobile app (and more + documentation) at + + EndorserSearch.com + +

+

What is your privacy policy?

See diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index b58f754..6232592 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -56,8 +56,11 @@

{{ truncatedDesc }} - Read More... Read More
@@ -65,7 +68,7 @@ Read Less- Read Less
@@ -167,8 +170,10 @@ {{ didInfo(offer.agentDid, activeDid, allMyDids, allContacts) }} - - {{ offer.amount }} + {{ offer.amount }}
@@ -195,9 +200,11 @@ > {{ didInfo(give.agentDid, activeDid, allMyDids, allContacts) }} - - {{ give.amount }} + + {{ give.amount }}
@@ -625,5 +632,24 @@ export default class ProjectViewView extends Vue { openOfferDialog() { (this.$refs.customOfferDialog as OfferDialog).open(); } + + UNIT_CODES: Record> = { + BTC: { + name: "Bitcoin", + faIcon: "bitcoin-sign", + }, + HUR: { + name: "hours", + faIcon: "clock", + }, + USD: { + name: "US Dollars", + faIcon: "dollar", + }, + }; + + iconForUnitCode(unitCode: string) { + return this.UNIT_CODES[unitCode]?.faIcon || "question"; + } }