Browse Source

Implemented design of Contact Gifting List view

kb/add-usage-guide
Jose Olarte III 1 year ago
parent
commit
47ce91cca1
  1. 70
      src/views/ContactGiftingView.vue
  2. 8
      src/views/HomeView.vue

70
src/views/ContactGiftingView.vue

@ -2,37 +2,65 @@
<QuickNav selected="Home"></QuickNav> <QuickNav selected="Home"></QuickNav>
<!-- CONTENT --> <!-- CONTENT -->
<section id="Content" class="p-6 pb-24"> <section id="Content" class="p-6 pb-24">
<div class="mb-8"> <!-- Breadcrumb -->
<h2 class="text-xl font-bold">Quick Action</h2> <div id="ViewBreadcrumb" class="mb-8">
<p class="mb-4">Show appreciation to a contact:</p> <h1 class="text-lg text-center font-light relative px-7">
<!-- Back -->
<ul class="grid grid-cols-4 gap-x-3 gap-y-5 text-center mb-5"> <router-link
<li @click="openDialog()"> :to="{ name: 'home' }"
<div class="mb-1"> class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
<fa icon="question-circle" class="fa-fw fa-xl text-slate-400"></fa> ><fa icon="chevron-left" class="fa-fw"></fa
></router-link>
Give to Contacts
</h1>
</div> </div>
<h3
class="text-xs font-medium italic text-ellipsis whitespace-nowrap overflow-hidden" <!-- Quick Search -->
>
<!-- Initial Loading Animation -->
<!-- Results List -->
<ul class="border-t border-slate-300">
<li class="border-b border-slate-300 py-3">
<h2 class="text-base flex gap-4 items-center">
<span class="grow italic"
><fa icon="question-circle" class="fa-fw fa-xl text-slate-400"></fa>
Anonymous Anonymous
</h3> </span>
<span class="text-right">
<button
type="button"
@click="openDialog()"
class="block w-full text-center text-sm uppercase bg-blue-600 text-white px-3 py-1.5 rounded-md"
>
<fa icon="gift" class="fa-fw"></fa>
</button>
</span>
</h2>
</li> </li>
<li <li
v-for="contact in allContacts" v-for="contact in allContacts"
:key="contact.did" :key="contact.did"
@click="openDialog(contact)" class="border-b border-slate-300 py-3"
>
<div class="mb-1">
<fa icon="user" class="fa-fw fa-xl text-slate-400"></fa>
</div>
<h3
class="text-xs font-medium text-ellipsis whitespace-nowrap overflow-hidden"
> >
<h2 class="text-base flex gap-4 items-center">
<span class="grow font-semibold"
><fa icon="user" class="fa-fw fa-xl text-slate-400"></fa>
{{ contact.name || "(no name)" }} {{ contact.name || "(no name)" }}
</h3> </span>
<span class="text-right">
<button
type="button"
@click="openDialog(contact)"
class="block w-full text-center text-sm uppercase bg-blue-600 text-white px-3 py-1.5 rounded-md"
>
<fa icon="gift" class="fa-fw"></fa>
</button>
</span>
</h2>
</li> </li>
</ul> </ul>
</div>
<GiftedDialog <GiftedDialog
ref="customDialog" ref="customDialog"

8
src/views/HomeView.vue

@ -36,6 +36,14 @@
</h3> </h3>
</li> </li>
</ul> </ul>
<!-- Ideally, this button should only be visible when the active account has more than 7 or 11 contacts in their list (we want to limit the grid count above to 8 or 12 accounts to keep it compact) -->
<router-link
:to="{ name: 'contact-gives' }"
class="block text-center text-md font-bold uppercase bg-slate-500 text-white px-2 py-3 rounded-md"
>
Show More Contacts&hellip;
</router-link>
</div> </div>
<GiftedDialog <GiftedDialog

Loading…
Cancel
Save