Compare commits

..

14 Commits

Author SHA1 Message Date
be348461f1 Update 'project.task.yaml' 2023-07-19 22:07:02 -04:00
6e2c596030 proposed move to jdenticon 2023-07-19 22:06:30 -04:00
Matthew Raymer
c502869c5f Add button with gift icon for future dialog 2023-07-19 18:41:12 +08:00
Matthew Raymer
b7aacd63e6 Add and edit project tasks list 2023-07-19 18:26:59 +08:00
Matthew Raymer
5bc0e27b30 Use a DID instead of a name ... this may need some better design on the dialog @jose 2023-07-19 18:25:58 +08:00
Matthew Raymer
a4fe94f081 Add a back arrow 2023-07-19 18:25:03 +08:00
Matthew Raymer
8de95566df Cleaning up this page to switch to GiftedDialog 2023-07-19 18:23:55 +08:00
Matthew Raymer
97569697f6 * show DID if no name
* hide no contacts when there are no contacts
* replace contact property with giver (? can you have another contact give you something ?)
2023-07-19 18:22:35 +08:00
Matthew Raymer
b9ed9d748b Only project owner may see edit button of a project 2023-07-19 18:19:29 +08:00
Matthew Raymer
790d44db81 Remove the stub context menu causing vertical ellipsis 2023-07-19 16:30:56 +08:00
e2bf469dc1 set assignees on several tasks. 2023-07-19 02:26:44 -04:00
592ffacebc possible image uploader 2023-07-19 02:16:28 -04:00
b706e65598 Remove completed tasks. 2023-07-19 02:11:18 -04:00
Matthew Raymer
6e3066ae92 Stub update of project task list 2023-07-18 21:04:48 +08:00
8 changed files with 165 additions and 185 deletions

View File

@@ -1,36 +1,32 @@
tasks: tasks:
- 40 notifications :
- push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew
- 01 add a location for a project via map pin - 01 add a location for a project via map pin
- 04 search by a bounding box for local projects (see API by clicking on "Nearby") - 04 search by a bounding box for local projects (see API by clicking on "Nearby")
- 01 Replace Gifted/Give in ContactsView with GiftedDialog assignee:jose - 01 Replace Gifted/Give in ContactsView with GiftedDialog assignee:matthew
- 02 Fix images on projectview - allow choice of image from a pallete of images or a url image. - 02 Fix images on projectview - allow choice of image from a pallete of images or a url image (discovery page display also)
- SEE: https://github.com/dmester/jdenticon assignee:jose
- 08 Scan QR code to import into contacts. - 08 Scan QR code to import into contacts assignee:matthew
- SEE: https://github.com/gruhn/vue-qrcode-reader
- 40 notifications : - Show pop-up or some message confirming that settings & contacts download has been initiated/finished assignee:matthew
- push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data
- refactor UI : - Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s)
- .5 Alerts show at the top and can be missed if you've scrolled down on the page, eg. account data download - SEE: https://github.com/emmanuelsw/notiwind assignee:jose
- .2 Make alerts at the top more visible (because they're currently a similar color and sometimes aren't seen)
- Show pop-up or some message confirming that settings & contacts download has been initiated/finished
- Ensure each action sent to the server has a confirmation - eg registration
- Home Feed & Quick Give screen : - Home Feed & Quick Give screen :
- 01 save the feed-viewed status in settings storage ("afterQuery") - 01 save the feed-viewed status in settings storage ("afterQuery")
- 01 quick action - send action, maybe choose via canvas tool https://github.com/konvajs/vue-konva - 01 quick action - send action, maybe choose via canvas tool
- SEE: https://github.com/konvajs/vue-konva
- 24 Move to Vite - 24 Move to Vite assignee:matthew
- .5 add project ID to the URL, to make a project publicly-accessible
- .5 remove edit from project page for projects owned by others
- .5 fix where user 0 sees no txns from user 1 on contacts page but sees them on list page - .5 fix where user 0 sees no txns from user 1 on contacts page but sees them on list page
- .2 there are three dots at the top of ProjectViewView that refreshes the page but doesn't do anything else
- 01 fix images on project page, on discovery page
- .2 on ProjectViewView, show different messages for "to" and "from" sections if none exist - .2 on ProjectViewView, show different messages for "to" and "from" sections if none exist
- .2 fix static icon to the right on project page (Matthew - I've made "Rotary" into issuer?) - .2 fix static icon to the right on project page (Matthew - I've made "Rotary" into issuer?) assignee:jose
- .2 fix rate limit verbiage (with the new one-per-day allowance) assignee:trent - .2 fix rate limit verbiage (with the new one-per-day allowance) assignee:trent
- Discuss whether the remaining tasks are worthwhile before MVP release. - Discuss whether the remaining tasks are worthwhile before MVP release.

View File

@@ -2,7 +2,7 @@
<div v-if="visible" class="dialog-overlay"> <div v-if="visible" class="dialog-overlay">
<div class="dialog"> <div class="dialog">
<h1 class="text-xl font-bold text-center mb-4"> <h1 class="text-xl font-bold text-center mb-4">
{{ message }} {{ giver?.name || "somebody not specified" }} {{ message }} {{ giver?.did || "somebody not specified" }}
</h1> </h1>
<input <input
type="text" type="text"

View File

@@ -10,8 +10,6 @@ import "./assets/styles/tailwind.css";
import { library } from "@fortawesome/fontawesome-svg-core"; import { library } from "@fortawesome/fontawesome-svg-core";
import { import {
faArrowLeft,
faArrowRight,
faBurst, faBurst,
faCalendar, faCalendar,
faChevronLeft, faChevronLeft,
@@ -53,8 +51,6 @@ import {
} from "@fortawesome/free-solid-svg-icons"; } from "@fortawesome/free-solid-svg-icons";
library.add( library.add(
faArrowLeft,
faArrowRight,
faBurst, faBurst,
faCalendar, faCalendar,
faChevronLeft, faChevronLeft,

View File

@@ -1,78 +1,83 @@
<template> <template>
<QuickNav selected="Contacts"></QuickNav> <QuickNav selected="Contacts"></QuickNav>
<section id="Content" class="p-6 pb-24"> <section id="Content" class="p-6 pb-24">
<!-- Breadcrumb -->
<div id="ViewBreadcrumb" class="mb-8">
<h1 class="text-lg text-center font-light relative px-7">
<!-- Back -->
<router-link
:to="{ name: 'contacts' }"
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
><fa icon="chevron-left" class="fa-fw"></fa
></router-link>
</h1>
</div>
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8"> <h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
Given with {{ contact?.name }} Given with {{ contact?.name }}
</h1> </h1>
<!-- Results List --> <!-- Results List -->
<table <div>
class="table-auto w-full border-t border-slate-300 text-sm sm:text-base text-center" <div class="border-b border-slate-300 flex">
> <div class="w-1/4"></div>
<thead class="bg-slate-100"> <div class="w-1/4">from them</div>
<tr class="border-b border-slate-300"> <div class="w-1/4"></div>
<th></th> <div class="w-1/4">to them</div>
<th class="px-1 py-2">From Them</th> </div>
<th></th> <div
<th class="px-1 py-2">To Them</th> class="border-b border-slate-300 flex"
</tr> v-for="record in giveRecords"
</thead> :key="record.id"
<tbody> >
<tr <div class="w-1/4">
v-for="record in giveRecords" {{ new Date(record.issuedAt).toLocaleString() }}
:key="record.id" </div>
class="border-b border-slate-300" <div class="w-1/4">
> <span v-if="record.agentDid == contact.did">
<td class="p-1 text-xs sm:text-sm text-left text-slate-500"> <div class="font-bold">
{{ new Date(record.issuedAt).toLocaleString() }} {{ record.amount }} {{ record.unit }}
</td> <span v-if="record.amountConfirmed" class="tooltip">
<td class="p-1"> <fa icon="circle-check" class="text-green-600 fa-fw ml-1" />
<span v-if="record.agentDid == contact.did"> <span class="tooltiptext">Confirmed</span>
<div class="font-bold"> </span>
{{ record.amount }} {{ record.unit }} <button v-else class="tooltip" @click="confirm(record)">
<span v-if="record.amountConfirmed" title="Confirmed"> <fa icon="circle" class="text-blue-600 fa-fw ml-1" />
<fa icon="circle-check" class="text-green-600 fa-fw" /> <span class="tooltiptext">Unconfirmed</span>
</span> </button>
<button v-else @click="confirm(record)" title="Unconfirmed"> </div>
<fa icon="circle" class="text-blue-600 fa-fw" /> <br />
</button> {{ record.description }}
</div> </span>
<div class="italic text-xs sm:text-sm text-slate-500"> </div>
{{ record.description }} <div class="w-1/8">
</div> <span v-if="record.agentDid == contact.did">
</span> <fa icon="long-arrow-alt-left" class="text-slate-900 fa-fw ml-1" />
</td> </span>
<td class="p-1"> <span v-else>
<span v-if="record.agentDid == contact.did"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<fa icon="arrow-left" class="text-slate-400 fa-fw" /> <fa icon="long-arrow-alt-right" class="text-slate-900 fa-fw ml-1" />
</span> </span>
<span v-else> </div>
<fa icon="arrow-right" class="text-slate-400 fa-fw" /> <div class="w-1/4">
</span> <span v-if="record.agentDid != contact.did">
</td> <div class="font-bold">
<td class="p-1"> {{ record.amount }} {{ record.unit }}
<span v-if="record.agentDid != contact.did"> <span v-if="record.amountConfirmed" class="tooltip">
<div class="font-bold"> <fa icon="circle-check" class="text-green-600 fa-fw ml-1" />
{{ record.amount }} {{ record.unit }} <span class="tooltiptext">Confirmed</span>
<span v-if="record.amountConfirmed" title="Confirmed"> </span>
<fa icon="circle-check" class="text-green-600 fa-fw" /> <button v-else class="tooltip" @click="cannotConfirmMessage()">
</span> <fa icon="circle" class="text-slate-600 fa-fw ml-1" />
<button <span class="tooltiptext">Unconfirmed</span>
v-else </button>
@click="cannotConfirmMessage()" </div>
title="Unconfirmed" <br />
> {{ record.description }}
<fa icon="circle" class="text-slate-600 fa-fw" /> </span>
</button> </div>
</div> </div>
<div class="italic text-xs sm:text-sm text-slate-500"> </div>
{{ record.description }}
</div>
</span>
</td>
</tr>
</tbody>
</table>
<AlertMessage <AlertMessage
:alertTitle="alertTitle" :alertTitle="alertTitle"
:alertMessage="alertMessage" :alertMessage="alertMessage"

View File

@@ -70,9 +70,9 @@
</div> </div>
<!-- Results List --> <!-- Results List -->
<ul v-if="contacts.length > 0" class="border-t border-slate-300"> <ul v-if="contacts.length > 0">
<li <li
class="border-b border-slate-300 py-4" class="border-b border-slate-300"
v-for="contact in contacts" v-for="contact in contacts"
:key="contact.did" :key="contact.did"
> >
@@ -85,82 +85,64 @@
Public Key (base 64): {{ contact.publicKeyBase64 }} Public Key (base 64): {{ contact.publicKeyBase64 }}
</div> </div>
<div id="ContactActions" class="flex gap-1.5 mt-2"> <button
<button v-if="contact.seesMe"
v-if="contact.seesMe" class="tooltip"
class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md" @click="setVisibility(contact, false)"
@click="setVisibility(contact, false)" >
title="They can see you" <fa icon="eye" class="text-slate-900 fa-fw ml-1" />
> <span class="tooltiptext">They can see you</span>
<fa icon="eye" class="fa-fw" /> </button>
</button> <button v-else class="tooltip" @click="setVisibility(contact, true)">
<button <span class="tooltiptext">They cannot see you</span>
v-else <fa icon="eye-slash" class="text-slate-900 fa-fw ml-1" />
class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md" </button>
@click="setVisibility(contact, true)"
title="They cannot see you"
>
<fa icon="eye-slash" class="fa-fw" />
</button>
<button <button class="tooltip" @click="checkVisibility(contact)">
class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md" <span class="tooltiptext">Check Visibility</span>
@click="checkVisibility(contact)" <fa icon="rotate" class="text-slate-900 fa-fw ml-1" />
title="Check Visibility" </button>
>
<fa icon="rotate" class="fa-fw" />
</button>
<button <button v-if="contact.registered" class="tooltip">
v-if="contact.registered" <span class="tooltiptext">Registered</span>
class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md" <fa icon="person-circle-check" class="text-slate-900 fa-fw ml-1" />
title="Registered" </button>
> <button v-else @click="register(contact)" class="tooltip">
<fa icon="person-circle-check" class="fa-fw" /> <span class="tooltiptext">Registration Unknown</span>
</button> <fa
<button icon="person-circle-question"
v-else class="text-slate-900 fa-fw ml-1"
@click="register(contact)" />
class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md" </button>
title="Registration unknown"
>
<fa icon="person-circle-question" class="fa-fw" />
</button>
<button <button @click="deleteContact(contact)" class="px-9 tooltip">
@click="deleteContact(contact)" <span class="tooltiptext">Delete!</span>
class="text-sm uppercase bg-red-600 text-white px-2 py-1.5 rounded-md" <fa icon="trash-can" class="text-red-600 fa-fw ml-1" />
title="Delete" </button>
>
<fa icon="trash-can" class="fa-fw" />
</button>
<div v-if="!showGiveNumbers" class="ml-auto flex gap-1.5"> <div v-if="showGiveNumbers" class="float-right">
<button <div class="float-right">
class="text-sm uppercase bg-blue-600 text-white px-2 py-1.5 rounded-md" <div class="tooltip">
@click="onClickAddGive(activeDid, contact.did)" to:
title="givenByMeDescriptions[contact.did]"
>
To:
{{ {{
/* eslint-disable prettier/prettier */ /* eslint-disable prettier/prettier */
this.showGiveTotals this.showGiveTotals
? ((givenByMeConfirmed[contact.did] || 0) ? ((givenByMeConfirmed[contact.did] || 0)
+ (givenByMeUnconfirmed[contact.did] || 0)) + (givenByMeUnconfirmed[contact.did] || 0))
: this.showGiveConfirmed : this.showGiveConfirmed
? (givenByMeConfirmed[contact.did] || 0) ? (givenByMeConfirmed[contact.did] || 0)
: (givenByMeUnconfirmed[contact.did] || 0) : (givenByMeUnconfirmed[contact.did] || 0)
/* eslint-enable prettier/prettier */ /* eslint-enable prettier/prettier */
}} }}
<fa icon="plus" class="fa-fw" /> <span
</button> v-if="givenByMeDescriptions[contact.did]"
class="tooltiptext-left"
<button >
class="text-sm uppercase bg-blue-600 text-white px-2 py-1.5 rounded-md" {{ givenByMeDescriptions[contact.did] }}
@click="onClickAddGive(contact.did, activeDid)" </span>
title="givenToMeDescriptions[contact.did]" </div>
> <div class="tooltip px-2">
From: from:
{{ {{
/* eslint-disable prettier/prettier */ /* eslint-disable prettier/prettier */
this.showGiveTotals this.showGiveTotals
@@ -171,18 +153,25 @@
: (givenToMeUnconfirmed[contact.did] || 0) : (givenToMeUnconfirmed[contact.did] || 0)
/* eslint-enable prettier/prettier */ /* eslint-enable prettier/prettier */
}} }}
<fa icon="plus" class="fa-fw" /> <span
</button> v-if="givenToMeDescriptions[contact.did]"
class="tooltiptext-left"
>
{{ givenToMeDescriptions[contact.did] }}
</span>
</div>
<router-link <router-link
:to="{ :to="{
name: 'contact-amounts', name: 'contact-amounts',
query: { contactDid: contact.did }, query: { contactDid: contact.did },
}" }"
class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md" class="tooltip"
title="See all given activity"
> >
<fa icon="file-lines" class="fa-fw" /> <button>
<fa icon="gift" class="pt-1 pr-2 text-slate-500" />Give
</button>
<fa icon="file-lines" class="text-slate-600 fa-fw ml-1" />
<span class="tooltiptext-left">See All Given Activity</span>
</router-link> </router-link>
</div> </div>
</div> </div>
@@ -214,12 +203,13 @@ import {
import { Component, Vue } from "vue-facing-decorator"; import { Component, Vue } from "vue-facing-decorator";
import AlertMessage from "@/components/AlertMessage"; import AlertMessage from "@/components/AlertMessage";
import QuickNav from "@/components/QuickNav"; import QuickNav from "@/components/QuickNav";
import GiftedDialog from "@/components/GiftedDialog.vue";
// eslint-disable-next-line @typescript-eslint/no-var-requires // eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer; const Buffer = require("buffer/").Buffer;
@Component({ @Component({
components: { AlertMessage, QuickNav }, components: { AlertMessage, QuickNav, GiftedDialog },
}) })
export default class ContactsView extends Vue { export default class ContactsView extends Vue {
activeDid = ""; activeDid = "";

View File

@@ -22,7 +22,7 @@
<h3 <h3
class="text-xs font-medium text-ellipsis whitespace-nowrap overflow-hidden" class="text-xs font-medium text-ellipsis whitespace-nowrap overflow-hidden"
> >
{{ contact.name || "(no name)" }} {{ contact.name || contact.did }}
</h3> </h3>
</li> </li>
</ul> </ul>
@@ -39,6 +39,7 @@
<!-- If there are no contacts, show this instead: --> <!-- If there are no contacts, show this instead: -->
<div <div
class="rounded border border-dashed border-slate-300 bg-slate-100 px-4 py-3 text-center italic text-slate-500" class="rounded border border-dashed border-slate-300 bg-slate-100 px-4 py-3 text-center italic text-slate-500"
v-if="allContacts.length === 0"
> >
(No contacts to show.) (No contacts to show.)
</div> </div>
@@ -286,7 +287,7 @@ export default class HomeView extends Vue {
handleDialogResult(result) { handleDialogResult(result) {
if (result.action === "confirm") { if (result.action === "confirm") {
return new Promise((resolve) => { return new Promise((resolve) => {
this.recordGive(result.contact?.did, result.description, result.hours); this.recordGive(result.giver?.did, result.description, result.hours);
resolve(); resolve();
}); });
} else { } else {

View File

@@ -12,13 +12,6 @@
> >
<fa icon="chevron-left" class="fa-fw"></fa> <fa icon="chevron-left" class="fa-fw"></fa>
</button> </button>
<!-- Context Menu -->
<a
href=""
class="text-lg text-center px-2 py-1 absolute -right-2 -top-1"
><fa icon="ellipsis-vertical" class="fa-fw"></fa
></a>
View Plan View Plan
</h1> </h1>
</div> </div>
@@ -56,6 +49,7 @@
</div> </div>
</div> </div>
<button <button
v-if="issuer == activeDid"
type="button" type="button"
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md" class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md"
@click="onEditClick()" @click="onEditClick()"

View File

@@ -8,18 +8,16 @@
<!-- Quick Search --> <!-- Quick Search -->
<div id="QuickSearch" class="mb-4 flex"> <input
<input type="text"
type="text" placeholder="Search…"
placeholder="Search…" class="block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2"
class="block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2" />
/> <button
<button class="px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400"
class="px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400" >
> <fa icon="magnifying-glass" class="fa-fw"></fa>
<fa icon="magnifying-glass" class="fa-fw"></fa> </button>
</button>
</div>
<!-- New Project --> <!-- New Project -->
<button <button
@@ -39,7 +37,7 @@
<!-- Results List --> <!-- Results List -->
<InfiniteScroll @reached-bottom="loadMoreData"> <InfiniteScroll @reached-bottom="loadMoreData">
<ul class="border-t border-slate-300"> <ul>
<li <li
class="border-b border-slate-300" class="border-b border-slate-300"
v-for="project in projects" v-for="project in projects"