Browse Source

fix verbiage and fix the contact actions to be on the right-hand side

pull/137/head
Trent Larson 18 hours ago
parent
commit
2ea7479d75
  1. 4
      src/components/DataExportSection.vue
  2. 30
      src/views/AccountViewView.vue
  3. 222
      src/views/ContactsView.vue

4
src/components/DataExportSection.vue

@ -24,9 +24,7 @@ backup and database export, with platform-specific download instructions. * *
class="block w-full text-center text-md 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-1.5 py-2 rounded-md" class="block w-full text-center text-md 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-1.5 py-2 rounded-md"
@click="exportDatabase()" @click="exportDatabase()"
> >
Download Settings & Contacts Download Contacts
<br />
(excluding Identifier Data)
</button> </button>
<a <a
ref="downloadLink" ref="downloadLink"

30
src/views/AccountViewView.vue

@ -508,7 +508,7 @@
<!-- Deep Identity Details --> <!-- Deep Identity Details -->
<span class="text-slate-500 text-sm font-bold mb-2"> <span class="text-slate-500 text-sm font-bold mb-2">
Deep Identifier Details Identifier Details
</span> </span>
<div <div
id="sectionDeepIdentifier" id="sectionDeepIdentifier"
@ -591,20 +591,9 @@
Switch Identifier Switch Identifier
</router-link> </router-link>
<div class="flex mt-4">
<button>
<router-link
:to="{ name: 'statistics' }"
class="block w-fit text-center text-md 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-4 py-2 rounded-md mb-2"
>
See Global Animated History of Giving
</router-link>
</button>
</div>
<div id="sectionImportContactsSettings" class="mt-4"> <div id="sectionImportContactsSettings" class="mt-4">
<h2 class="text-slate-500 text-sm font-bold"> <h2 class="text-slate-500 text-sm font-bold">
Import Contacts & Settings Database Import Contacts
</h2> </h2>
<div class="ml-4 mt-2"> <div class="ml-4 mt-2">
@ -635,9 +624,7 @@
class="block text-center text-md 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-1.5 py-2 rounded-md mb-6" class="block text-center text-md 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-1.5 py-2 rounded-md mb-6"
@click="checkContactImports()" @click="checkContactImports()"
> >
Import Only Contacts Import Contacts
<br />
after comparing
</button> </button>
</div> </div>
</div> </div>
@ -973,6 +960,17 @@
> >
Test Page Test Page
</router-link> </router-link>
<div class="flex mt-2">
<button>
<router-link
:to="{ name: 'statistics' }"
class="block w-fit text-center text-md 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-4 py-2 rounded-md"
>
See Global Animated History of Giving
</router-link>
</button>
</div>
</section> </section>
</main> </main>
</template> </template>

222
src/views/ContactsView.vue

@ -180,117 +180,119 @@
data-testId="contactListItem" data-testId="contactListItem"
> >
<div class="grow overflow-hidden"> <div class="grow overflow-hidden">
<div class="flex items-center gap-3"> <div class="flex items-center justify-between gap-3">
<input <div class="flex items-center gap-3">
v-if="!showGiveNumbers" <input
type="checkbox" v-if="!showGiveNumbers"
:checked="contactsSelected.includes(contact.did)" type="checkbox"
class="ml-2 h-6 w-6 flex-shrink-0" :checked="contactsSelected.includes(contact.did)"
data-testId="contactCheckOne" class="ml-2 h-6 w-6 flex-shrink-0"
@click=" data-testId="contactCheckOne"
contactsSelected.includes(contact.did) @click="
? contactsSelected.splice( contactsSelected.includes(contact.did)
contactsSelected.indexOf(contact.did), ? contactsSelected.splice(
1, contactsSelected.indexOf(contact.did),
) 1,
: contactsSelected.push(contact.did) )
" : contactsSelected.push(contact.did)
/> "
/>
<EntityIcon
:contact="contact" <div class="flex-shrink-0 w-12 h-12 flex items-center justify-center">
:icon-size="48" <EntityIcon
class="inline-block align-text-bottom border border-slate-300 rounded cursor-pointer overflow-hidden" :contact="contact"
@click="showLargeIdenticon = contact" :icon-size="48"
/> class="inline-block align-text-bottom border border-slate-300 rounded cursor-pointer overflow-hidden"
@click="showLargeIdenticon = contact"
<h2 class="text-base font-semibold w-1/3 truncate flex-shrink-0"> />
{{ contactNameNonBreakingSpace(contact.name) }}
</h2>
<span>
<div class="flex gap-2 items-center">
<router-link
:to="{
path: '/did/' + encodeURIComponent(contact.did),
}"
title="See more about this person"
>
<font-awesome
icon="circle-info"
class="text-xl text-blue-500"
/>
</router-link>
<span class="text-sm overflow-hidden">{{
libsUtil.shortDid(contact.did)
}}</span>
</div> </div>
<div class="text-sm">
{{ contact.notes }} <h2 class="text-base font-semibold w-1/3 truncate flex-shrink-0">
</div> {{ contactNameNonBreakingSpace(contact.name) }}
</span> </h2>
</div>
<div <span>
v-if="showGiveNumbers && contact.did != activeDid" <div class="flex gap-2 items-center">
class="ml-auto flex gap-1.5 mt-2" <router-link
> :to="{
<button path: '/did/' + encodeURIComponent(contact.did),
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-l-md" }"
:title="givenToMeDescriptions[contact.did] || ''" title="See more about this person"
@click="confirmShowGiftedDialog(contact.did, activeDid)" >
> <font-awesome
From: icon="circle-info"
<br /> class="text-xl text-blue-500"
{{ />
/* eslint-disable prettier/prettier */ </router-link>
showGiveTotals
? ((givenToMeConfirmed[contact.did] || 0) <span class="text-sm overflow-hidden">{{
+ (givenToMeUnconfirmed[contact.did] || 0)) libsUtil.shortDid(contact.did)
: showGiveConfirmed }}</span>
? (givenToMeConfirmed[contact.did] || 0) </div>
: (givenToMeUnconfirmed[contact.did] || 0) <div class="text-sm">
/* eslint-enable prettier/prettier */ {{ contact.notes }}
}} </div>
</button> </span>
</div>
<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 -ml-1.5 px-2 py-1.5 rounded-r-md border-l" <div v-if="showGiveNumbers && contact.did != activeDid" class="flex gap-2 items-center">
:title="givenByMeDescriptions[contact.did] || ''" <button
@click="confirmShowGiftedDialog(activeDid, contact.did)" 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-l-md"
> :title="givenToMeDescriptions[contact.did] || ''"
To: @click="confirmShowGiftedDialog(contact.did, activeDid)"
<br /> >
{{ From:
/* eslint-disable prettier/prettier */ <br />
showGiveTotals {{
? ((givenByMeConfirmed[contact.did] || 0) /* eslint-disable prettier/prettier */
+ (givenByMeUnconfirmed[contact.did] || 0)) showGiveTotals
: showGiveConfirmed ? ((givenToMeConfirmed[contact.did] || 0)
? (givenByMeConfirmed[contact.did] || 0) + (givenToMeUnconfirmed[contact.did] || 0))
: (givenByMeUnconfirmed[contact.did] || 0) : showGiveConfirmed
/* eslint-enable prettier/prettier */ ? (givenToMeConfirmed[contact.did] || 0)
}} : (givenToMeUnconfirmed[contact.did] || 0)
</button> /* eslint-enable prettier/prettier */
}}
<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"
data-testId="offerButton" <button
@click="openOfferDialog(contact.did, contact.name)" 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"
> :title="givenByMeDescriptions[contact.did] || ''"
Offer @click="confirmShowGiftedDialog(activeDid, contact.did)"
</button> >
To:
<router-link <br />
:to="{ {{
name: 'contact-amounts', /* eslint-disable prettier/prettier */
query: { contactDid: contact.did }, showGiveTotals
}" ? ((givenByMeConfirmed[contact.did] || 0)
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 border border-slate-400" + (givenByMeUnconfirmed[contact.did] || 0))
title="See more given activity" : showGiveConfirmed
> ? (givenByMeConfirmed[contact.did] || 0)
<font-awesome icon="file-lines" class="fa-fw" /> : (givenByMeUnconfirmed[contact.did] || 0)
</router-link> /* eslint-enable prettier/prettier */
}}
</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"
data-testId="offerButton"
@click="openOfferDialog(contact.did, contact.name)"
>
Offer
</button>
<router-link
:to="{
name: 'contact-amounts',
query: { contactDid: contact.did },
}"
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 border border-slate-400"
title="See more given activity"
>
<font-awesome icon="file-lines" class="fa-fw" />
</router-link>
</div>
</div> </div>
</div> </div>
</li> </li>

Loading…
Cancel
Save