Browse Source

show appropriate icon next to amount numbers (and some docs)

kb/add-usage-guide
Trent Larson 12 months ago
parent
commit
a77d20b572
  1. 4
      README.md
  2. 4
      project.task.yaml
  3. 6
      src/main.ts
  4. 16
      src/views/AccountViewView.vue
  5. 1
      src/views/ContactsView.vue
  6. 15
      src/views/HelpView.vue
  7. 42
      src/views/ProjectViewView.vue

4
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. 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 ### Manual walk-through
- Clear the browser cache for localhost for a new user. - Clear the browser cache for localhost for a new user.

4
project.task.yaml

@ -13,8 +13,10 @@ tasks:
- Discuss whether the remaining tasks are worthwhile before MVP release. - 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) - .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) - 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 - .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? - .1 Make give description text box into something that expands as they type?

6
src/main.ts

@ -14,6 +14,7 @@ import {
faArrowLeft, faArrowLeft,
faArrowRight, faArrowRight,
faBan, faBan,
faBitcoinSign,
faBurst, faBurst,
faCalendar, faCalendar,
faChevronLeft, faChevronLeft,
@ -27,6 +28,7 @@ import {
faCoins, faCoins,
faComment, faComment,
faCopy, faCopy,
faDollar,
faEllipsisVertical, faEllipsisVertical,
faEye, faEye,
faEyeSlash, faEyeSlash,
@ -44,6 +46,7 @@ import {
faPersonCircleCheck, faPersonCircleCheck,
faPersonCircleQuestion, faPersonCircleQuestion,
faPlus, faPlus,
faQuestion,
faQrcode, faQrcode,
faRotate, faRotate,
faShareNodes, faShareNodes,
@ -61,6 +64,7 @@ library.add(
faArrowLeft, faArrowLeft,
faArrowRight, faArrowRight,
faBan, faBan,
faBitcoinSign,
faBurst, faBurst,
faCalendar, faCalendar,
faChevronLeft, faChevronLeft,
@ -74,6 +78,7 @@ library.add(
faCoins, faCoins,
faComment, faComment,
faCopy, faCopy,
faDollar,
faEllipsisVertical, faEllipsisVertical,
faEye, faEye,
faEyeSlash, faEyeSlash,
@ -92,6 +97,7 @@ library.add(
faPersonCircleQuestion, faPersonCircleQuestion,
faPlus, faPlus,
faQrcode, faQrcode,
faQuestion,
faRotate, faRotate,
faShareNodes, faShareNodes,
faSpinner, faSpinner,

16
src/views/AccountViewView.vue

@ -288,6 +288,14 @@
</div> </div>
</label> </label>
<div class="flex py-2">
<button class="text-blue-500">
<router-link :to="{ name: 'statistics' }" class="block text-center">
See Global Animated History of Giving
</router-link>
</button>
</div>
<div class="flex py-2"> <div class="flex py-2">
<button class="text-blue-500"> <button class="text-blue-500">
<!-- id used by puppeteer test script --> <!-- id used by puppeteer test script -->
@ -301,14 +309,6 @@
</button> </button>
</div> </div>
<div class="flex py-2">
<button class="text-blue-500">
<router-link :to="{ name: 'statistics' }" class="block text-center">
See Achievements & Statistics
</router-link>
</button>
</div>
<div class="flex py-4"> <div class="flex py-4">
<h2 class="text-slate-500 text-sm font-bold mb-2">Claim Server</h2> <h2 class="text-slate-500 text-sm font-bold mb-2">Claim Server</h2>
<input <input

1
src/views/ContactsView.vue

@ -957,6 +957,7 @@ export default class ContactsView extends Vue {
} }
} }
// similar function is in endorserServer.ts
private async createAndSubmitGive( private async createAndSubmitGive(
identity: IIdentifier, identity: IIdentifier,
fromDid: string, fromDid: string,

15
src/views/HelpView.vue

@ -181,6 +181,21 @@
different page. different page.
</p> </p>
<h2 class="text-xl font-semibold">
How do I access even more functionality?
</h2>
<p>
There is an "Advanced" section at the bottom of the Account
<fa icon="circle-user" /> page.
</p>
<p>
There is a even more functionality in a mobile app (and more
documentation) at
<a href="https://endorser.ch" class="text-blue-500">
EndorserSearch.com
</a>
</p>
<h2 class="text-xl font-semibold">What is your privacy policy?</h2> <h2 class="text-xl font-semibold">What is your privacy policy?</h2>
<p> <p>
See See

42
src/views/ProjectViewView.vue

@ -56,8 +56,11 @@
<div class="text-sm text-slate-500"> <div class="text-sm text-slate-500">
<div v-if="!expanded"> <div v-if="!expanded">
{{ truncatedDesc }} {{ truncatedDesc }}
<a v-if="description.length >= truncateLength" @click="expandText" <a
>Read More</a v-if="description.length >= truncateLength"
@click="expandText"
class="uppercase text-xs font-semibold text-slate-700"
>... Read More</a
> >
</div> </div>
<div v-else> <div v-else>
@ -65,7 +68,7 @@
<a <a
@click="collapseText" @click="collapseText"
class="uppercase text-xs font-semibold text-slate-700" class="uppercase text-xs font-semibold text-slate-700"
>Read Less</a >- Read Less</a
> >
</div> </div>
</div> </div>
@ -167,8 +170,10 @@
{{ didInfo(offer.agentDid, activeDid, allMyDids, allContacts) }} {{ didInfo(offer.agentDid, activeDid, allMyDids, allContacts) }}
</span> </span>
<span v-if="offer.amount"> <span v-if="offer.amount">
<fa icon="coins" class="fa-fw text-slate-400"></fa> <fa
{{ offer.amount }} :icon="iconForUnitCode(offer.unit)"
class="fa-fw text-slate-400"
/>{{ offer.amount }}
</span> </span>
</div> </div>
<div v-if="offer.objectDescription" class="text-slate-500"> <div v-if="offer.objectDescription" class="text-slate-500">
@ -195,9 +200,11 @@
><fa icon="user" class="fa-fw text-slate-400"></fa> ><fa icon="user" class="fa-fw text-slate-400"></fa>
{{ didInfo(give.agentDid, activeDid, allMyDids, allContacts) }} {{ didInfo(give.agentDid, activeDid, allMyDids, allContacts) }}
</span> </span>
<span v-if="give.amount" <span v-if="give.amount">
><fa icon="coins" class="fa-fw text-slate-400"></fa> <fa
{{ give.amount }} :icon="iconForUnitCode(give.unit)"
class="fa-fw text-slate-400"
/>{{ give.amount }}
</span> </span>
</div> </div>
<div v-if="give.description" class="text-slate-500"> <div v-if="give.description" class="text-slate-500">
@ -625,5 +632,24 @@ export default class ProjectViewView extends Vue {
openOfferDialog() { openOfferDialog() {
(this.$refs.customOfferDialog as OfferDialog).open(); (this.$refs.customOfferDialog as OfferDialog).open();
} }
UNIT_CODES: Record<string, Record<string, string>> = {
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";
}
} }
</script> </script>

Loading…
Cancel
Save