Browse Source

lower project "I Gave" button into list of contact, and tweak other wording

starred-projects
Trent Larson 10 months ago
parent
commit
88f869d600
  1. 14
      project.task.yaml
  2. 4
      src/components/GiftedDialog.vue
  3. 12
      src/libs/endorserServer.ts
  4. 33
      src/views/ProjectViewView.vue

14
project.task.yaml

@ -1,10 +1,20 @@
tasks:
- image on give
- Show a camera to take a picture
- Scale the image to a reasonable size
- Upload to a public readable place
- check the rate limits
- use CID
- put the image URL in the claim
- Rates - images erased?
- image not associated with JWT ULID since that's assigned later
- mark a project as inactive
- make a shortcut for BVC
- add share button for sending a message to confirmers when we can't see the claim
- add TimeSafari as a shareable app https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target
- make a shortcut for BVC
- choose an agent via a contact chooser (not just copy-paste a DID)
- choose a project's alternative agent ("authorized representative") via a contact chooser (not just copy-paste a DID)
- .5 find out why clicking quickly back-and-forth onto the "my project" page often shows error "You need an identifier to load your projects." (easier to reproduce on desktop?)
- .5 bug - it didn't show the "fulfills offer" on the claim detail page for a give that had one - https://test.timesafari.app/claim/01HMFWRPA3PD6Q9EYFKX3MC41J
- 01 replace all "confirm" prompts with nicer modal

4
src/components/GiftedDialog.vue

@ -37,11 +37,11 @@
</div>
</div>
<div class="mt-2 text-right">
<span v-if="showGivenToUser" class="mt-2 mr-16">
<span v-if="showGivenToUser" class="mr-16">
<input type="checkbox" class="mr-2" v-model="givenToUser" />
<label class="text-sm">Given to you</label>
</span>
<span class="mt-2">
<span>
<input type="checkbox" class="mr-2" v-model="isTrade" />
<label class="text-sm">Trade (not a gift)</label>
</span>

12
src/libs/endorserServer.ts

@ -279,15 +279,17 @@ export function didInfo(
): string {
if (!did) return "Someone Anonymous";
const myId = R.find(R.equals(did), allMyDids);
if (myId) return `You${myId !== activeDid ? " (Alt ID)" : ""}`;
const contact = R.find((c) => c.did === did, contacts);
return contact
? contact.name || "Contact With No Name"
if (contact) {
return contact.name || "Contact With No Name";
} else {
const myId = R.find(R.equals(did), allMyDids);
return myId
? `You${myId !== activeDid ? " (Alt ID)" : ""}`
: isHiddenDid(did)
? "Someone Not In Network"
: "Someone Not In Contacts";
}
}
export interface ResultWithType {

33
src/views/ProjectViewView.vue

@ -118,30 +118,31 @@
@click="openOfferDialog()"
class="block w-full text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md"
>
I offer&hellip;
Offer (maybe with conditions)...
</button>
</div>
</div>
<OfferDialog ref="customOfferDialog" :projectId="this.projectId" />
<div v-if="activeDid">
<div class="text-center">
<button
@click="openGiftDialog({ name: 'you', did: activeDid })"
class="block w-full text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md"
>
I gave&hellip;
</button>
<p class="mt-2 mb-4 text-center">Or, record a contribution from:</p>
</div>
<GiftedDialog
ref="customGiveDialog"
message="Received from"
:projectId="this.projectId"
>
</GiftedDialog>
<div class="text-center">
<p class="mt-2 mb-4 text-center">Record a contribution from:</p>
</div>
<ul class="grid grid-cols-4 gap-x-3 gap-y-5 text-center mb-5">
<li @click="openGiftDialog({ name: 'you', did: activeDid })">
<fa icon="hand" class="fa-fw text-slate-400 text-5xl" />
<h3
class="mt-5 text-xs italic font-medium text-ellipsis whitespace-nowrap overflow-hidden"
>
You
</h3>
</li>
<li @click="openGiftDialog()">
<img
src="../assets/blank-square.svg"
@ -154,7 +155,7 @@
</h3>
</li>
<li
v-for="contact in allContacts.slice(0, 7)"
v-for="contact in allContacts.slice(0, 6)"
:key="contact.did"
@click="openGiftDialog(contact)"
>
@ -189,7 +190,10 @@
</h3>
<div v-if="offersToThis.length === 0">
(None yet. Wanna offer something if others join you?)
(None yet. Wanna
<span @click="openOfferDialog()" class="cursor-pointer text-blue-500"
>offer something... especially if others join you</span
>?)
</div>
<ul v-else class="text-sm border-t border-slate-300">
@ -246,7 +250,8 @@
<h3 class="text-sm uppercase font-semibold mb-3">Given To This Idea</h3>
<div v-if="givesToThis.length === 0">
(None yet. You can be the first.)
(None yet. If you've seen something, say something by clicking a
contact above.)
</div>
<ul v-else class="text-sm border-t border-slate-300">

Loading…
Cancel
Save