forked from jsnbuchanan/crowd-funder-for-time-pwa
add 'offer' on contact screen
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
|
||||
<button
|
||||
@click="deleteContact(contact)"
|
||||
class="text-sm uppercase bg-gradient-to-b from-rose-500 to-rose-800 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-24 px-2 py-1.5 rounded-md"
|
||||
class="text-sm uppercase bg-gradient-to-b from-rose-500 to-rose-800 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white ml-6 px-2 py-1.5 rounded-md"
|
||||
title="Delete"
|
||||
>
|
||||
<fa icon="trash-can" class="fa-fw" />
|
||||
@@ -207,7 +207,7 @@
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="text-sm bg-blue-600 text-white px-2 py-1.5 rounded-r-md -ml-1.5 border-l border-blue-400"
|
||||
class="text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white -ml-1.5 px-2 py-1.5 rounded-r-md border-l"
|
||||
@click="onClickAddGive(contact.did, activeDid)"
|
||||
:title="givenToMeDescriptions[contact.did] || ''"
|
||||
>
|
||||
@@ -225,12 +225,19 @@
|
||||
<fa icon="plus" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md border border-blue-400"
|
||||
@click="openOfferDialog(contact.did)"
|
||||
>
|
||||
Offer
|
||||
</button>
|
||||
|
||||
<router-link
|
||||
:to="{
|
||||
name: 'contact-amounts',
|
||||
query: { contactDid: contact.did },
|
||||
}"
|
||||
class="text-sm uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md"
|
||||
class="text-sm bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-md"
|
||||
title="See more given activity"
|
||||
>
|
||||
<fa icon="file-lines" class="fa-fw" />
|
||||
@@ -241,6 +248,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
<p v-else>There are no contacts.</p>
|
||||
|
||||
<OfferDialog ref="customOfferDialog" />
|
||||
|
||||
<div v-if="showLargeIdenticon" class="fixed z-[100] top-0 inset-x-0 w-full">
|
||||
<div
|
||||
class="absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"
|
||||
@@ -312,12 +322,13 @@ import {
|
||||
import * as libsUtil from "@/libs/util";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import EntityIcon from "@/components/EntityIcon.vue";
|
||||
import OfferDialog from "@/components/OfferDialog.vue";
|
||||
import { Account } from "@/db/tables/accounts";
|
||||
|
||||
import { Buffer } from "buffer/";
|
||||
|
||||
@Component({
|
||||
components: { QuickNav, EntityIcon },
|
||||
components: { EntityIcon, OfferDialog, QuickNav },
|
||||
})
|
||||
export default class ContactsView extends Vue {
|
||||
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
||||
@@ -1131,6 +1142,10 @@ export default class ContactsView extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
openOfferDialog(recipientDid: string) {
|
||||
(this.$refs.customOfferDialog as OfferDialog).open(recipientDid);
|
||||
}
|
||||
|
||||
// similar function is in endorserServer.ts
|
||||
private async createAndSubmitContactGive(
|
||||
identity: IIdentifier,
|
||||
|
||||
Reference in New Issue
Block a user