Compare commits

..

10 Commits

Author SHA1 Message Date
Jose Olarte III
5addc3c206 Visual fixes 2023-07-31 21:36:05 +08:00
Jose Olarte III
69f2f3cfd2 Converted to tabular structure
For more adaptive widths
2023-07-31 21:32:19 +08:00
179a5cd9f8 add task for publicly-accessible project 2023-07-20 08:32:43 -06:00
d0ec7930e1 Merge pull request 'UI improvements' (#46) from contacts-view-improvements into master
Reviewed-on: trent_larson/kick-starter-for-time-pwa#46
2023-07-19 02:18:01 -04:00
3e2cd1291c Merge branch 'master' into contacts-view-improvements 2023-07-19 02:17:55 -04:00
8d42fe905d Merge pull request 'Fixes to search bar and list top' (#45) from projects-view-improvements into master
Reviewed-on: trent_larson/kick-starter-for-time-pwa#45
2023-07-19 02:17:44 -04:00
a7e98c8f1a Merge branch 'master' into projects-view-improvements 2023-07-18 06:56:01 -04:00
f07c804b24 Merge branch 'master' into contacts-view-improvements 2023-07-18 06:55:02 -04:00
Jose Olarte III
7c77578f79 Fixes to search bar and list top 2023-07-18 17:33:49 +08:00
Jose Olarte III
5134e2f562 UI improvements
- Consistent button styling for interactive elements
- Tooltips relegated to title attribute to avoid blocking other buttons
2023-07-18 16:40:16 +08:00
8 changed files with 185 additions and 165 deletions

View File

@@ -1,32 +1,36 @@
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:matthew - 01 Replace Gifted/Give in ContactsView with GiftedDialog assignee:jose
- 02 Fix images on projectview - allow choice of image from a pallete of images or a url image (discovery page display also) - 02 Fix images on projectview - allow choice of image from a pallete of images or a url image.
- SEE: https://github.com/dmester/jdenticon assignee:jose
- 08 Scan QR code to import into contacts assignee:matthew - 08 Scan QR code to import into contacts.
- SEE: https://github.com/gruhn/vue-qrcode-reader
- Show pop-up or some message confirming that settings & contacts download has been initiated/finished assignee:matthew - 40 notifications :
- push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data
- Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) - refactor UI :
- SEE: https://github.com/emmanuelsw/notiwind assignee:jose - .5 Alerts show at the top and can be missed if you've scrolled down on the page, eg. account data download
- .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 - 01 quick action - send action, maybe choose via canvas tool https://github.com/konvajs/vue-konva
- SEE: https://github.com/konvajs/vue-konva
- 24 Move to Vite assignee:matthew - 24 Move to Vite
- .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?) assignee:jose - .2 fix static icon to the right on project page (Matthew - I've made "Rotary" into issuer?)
- .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?.did || "somebody not specified" }} {{ message }} {{ giver?.name || "somebody not specified" }}
</h1> </h1>
<input <input
type="text" type="text"

View File

@@ -10,6 +10,8 @@ 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,
@@ -51,6 +53,8 @@ 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,83 +1,78 @@
<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 -->
<div> <table
<div class="border-b border-slate-300 flex"> class="table-auto w-full border-t border-slate-300 text-sm sm:text-base text-center"
<div class="w-1/4"></div> >
<div class="w-1/4">from them</div> <thead class="bg-slate-100">
<div class="w-1/4"></div> <tr class="border-b border-slate-300">
<div class="w-1/4">to them</div> <th></th>
</div> <th class="px-1 py-2">From Them</th>
<div <th></th>
class="border-b border-slate-300 flex" <th class="px-1 py-2">To Them</th>
v-for="record in giveRecords" </tr>
:key="record.id" </thead>
> <tbody>
<div class="w-1/4"> <tr
{{ new Date(record.issuedAt).toLocaleString() }} v-for="record in giveRecords"
</div> :key="record.id"
<div class="w-1/4"> class="border-b border-slate-300"
<span v-if="record.agentDid == contact.did"> >
<div class="font-bold"> <td class="p-1 text-xs sm:text-sm text-left text-slate-500">
{{ record.amount }} {{ record.unit }} {{ new Date(record.issuedAt).toLocaleString() }}
<span v-if="record.amountConfirmed" class="tooltip"> </td>
<fa icon="circle-check" class="text-green-600 fa-fw ml-1" /> <td class="p-1">
<span class="tooltiptext">Confirmed</span> <span v-if="record.agentDid == contact.did">
</span> <div class="font-bold">
<button v-else class="tooltip" @click="confirm(record)"> {{ record.amount }} {{ record.unit }}
<fa icon="circle" class="text-blue-600 fa-fw ml-1" /> <span v-if="record.amountConfirmed" title="Confirmed">
<span class="tooltiptext">Unconfirmed</span> <fa icon="circle-check" class="text-green-600 fa-fw" />
</button> </span>
</div> <button v-else @click="confirm(record)" title="Unconfirmed">
<br /> <fa icon="circle" class="text-blue-600 fa-fw" />
{{ record.description }} </button>
</span> </div>
</div> <div class="italic text-xs sm:text-sm text-slate-500">
<div class="w-1/8"> {{ record.description }}
<span v-if="record.agentDid == contact.did"> </div>
<fa icon="long-arrow-alt-left" class="text-slate-900 fa-fw ml-1" /> </span>
</span> </td>
<span v-else> <td class="p-1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span v-if="record.agentDid == contact.did">
<fa icon="long-arrow-alt-right" class="text-slate-900 fa-fw ml-1" /> <fa icon="arrow-left" class="text-slate-400 fa-fw" />
</span> </span>
</div> <span v-else>
<div class="w-1/4"> <fa icon="arrow-right" class="text-slate-400 fa-fw" />
<span v-if="record.agentDid != contact.did"> </span>
<div class="font-bold"> </td>
{{ record.amount }} {{ record.unit }} <td class="p-1">
<span v-if="record.amountConfirmed" class="tooltip"> <span v-if="record.agentDid != contact.did">
<fa icon="circle-check" class="text-green-600 fa-fw ml-1" /> <div class="font-bold">
<span class="tooltiptext">Confirmed</span> {{ record.amount }} {{ record.unit }}
</span> <span v-if="record.amountConfirmed" title="Confirmed">
<button v-else class="tooltip" @click="cannotConfirmMessage()"> <fa icon="circle-check" class="text-green-600 fa-fw" />
<fa icon="circle" class="text-slate-600 fa-fw ml-1" /> </span>
<span class="tooltiptext">Unconfirmed</span> <button
</button> v-else
</div> @click="cannotConfirmMessage()"
<br /> title="Unconfirmed"
{{ record.description }} >
</span> <fa icon="circle" class="text-slate-600 fa-fw" />
</div> </button>
</div> </div>
</div> <div class="italic text-xs sm:text-sm text-slate-500">
{{ 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"> <ul v-if="contacts.length > 0" class="border-t border-slate-300">
<li <li
class="border-b border-slate-300" class="border-b border-slate-300 py-4"
v-for="contact in contacts" v-for="contact in contacts"
:key="contact.did" :key="contact.did"
> >
@@ -85,64 +85,82 @@
Public Key (base 64): {{ contact.publicKeyBase64 }} Public Key (base 64): {{ contact.publicKeyBase64 }}
</div> </div>
<button <div id="ContactActions" class="flex gap-1.5 mt-2">
v-if="contact.seesMe" <button
class="tooltip" v-if="contact.seesMe"
@click="setVisibility(contact, false)" class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md"
> @click="setVisibility(contact, false)"
<fa icon="eye" class="text-slate-900 fa-fw ml-1" /> title="They can see you"
<span class="tooltiptext">They can see you</span> >
</button> <fa icon="eye" class="fa-fw" />
<button v-else class="tooltip" @click="setVisibility(contact, true)"> </button>
<span class="tooltiptext">They cannot see you</span> <button
<fa icon="eye-slash" class="text-slate-900 fa-fw ml-1" /> v-else
</button> class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md"
@click="setVisibility(contact, true)"
title="They cannot see you"
>
<fa icon="eye-slash" class="fa-fw" />
</button>
<button class="tooltip" @click="checkVisibility(contact)"> <button
<span class="tooltiptext">Check Visibility</span> class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md"
<fa icon="rotate" class="text-slate-900 fa-fw ml-1" /> @click="checkVisibility(contact)"
</button> title="Check Visibility"
>
<fa icon="rotate" class="fa-fw" />
</button>
<button v-if="contact.registered" class="tooltip"> <button
<span class="tooltiptext">Registered</span> v-if="contact.registered"
<fa icon="person-circle-check" 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> title="Registered"
<button v-else @click="register(contact)" class="tooltip"> >
<span class="tooltiptext">Registration Unknown</span> <fa icon="person-circle-check" class="fa-fw" />
<fa </button>
icon="person-circle-question" <button
class="text-slate-900 fa-fw ml-1" v-else
/> @click="register(contact)"
</button> class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md"
title="Registration unknown"
>
<fa icon="person-circle-question" class="fa-fw" />
</button>
<button @click="deleteContact(contact)" class="px-9 tooltip"> <button
<span class="tooltiptext">Delete!</span> @click="deleteContact(contact)"
<fa icon="trash-can" class="text-red-600 fa-fw ml-1" /> class="text-sm uppercase bg-red-600 text-white px-2 py-1.5 rounded-md"
</button> title="Delete"
>
<fa icon="trash-can" class="fa-fw" />
</button>
<div v-if="showGiveNumbers" class="float-right"> <div v-if="!showGiveNumbers" class="ml-auto flex gap-1.5">
<div class="float-right"> <button
<div class="tooltip"> class="text-sm uppercase bg-blue-600 text-white px-2 py-1.5 rounded-md"
to: @click="onClickAddGive(activeDid, contact.did)"
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 */
}} }}
<span <fa icon="plus" class="fa-fw" />
v-if="givenByMeDescriptions[contact.did]" </button>
class="tooltiptext-left"
> <button
{{ givenByMeDescriptions[contact.did] }} class="text-sm uppercase bg-blue-600 text-white px-2 py-1.5 rounded-md"
</span> @click="onClickAddGive(contact.did, activeDid)"
</div> title="givenToMeDescriptions[contact.did]"
<div class="tooltip px-2"> >
from: From:
{{ {{
/* eslint-disable prettier/prettier */ /* eslint-disable prettier/prettier */
this.showGiveTotals this.showGiveTotals
@@ -153,25 +171,18 @@
: (givenToMeUnconfirmed[contact.did] || 0) : (givenToMeUnconfirmed[contact.did] || 0)
/* eslint-enable prettier/prettier */ /* eslint-enable prettier/prettier */
}} }}
<span <fa icon="plus" class="fa-fw" />
v-if="givenToMeDescriptions[contact.did]" </button>
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="tooltip" class="text-sm uppercase bg-slate-500 text-white px-2 py-1.5 rounded-md"
title="See all given activity"
> >
<button> <fa icon="file-lines" class="fa-fw" />
<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>
@@ -203,13 +214,12 @@ 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, GiftedDialog }, components: { AlertMessage, QuickNav },
}) })
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 || contact.did }} {{ contact.name || "(no name)" }}
</h3> </h3>
</li> </li>
</ul> </ul>
@@ -39,7 +39,6 @@
<!-- 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>
@@ -287,7 +286,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.giver?.did, result.description, result.hours); this.recordGive(result.contact?.did, result.description, result.hours);
resolve(); resolve();
}); });
} else { } else {

View File

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