forked from jsnbuchanan/crowd-funder-for-time-pwa
tweak verbiage and make other UI tweaks
This commit is contained in:
@@ -213,7 +213,7 @@
|
|||||||
|
|
||||||
<div class="bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8">
|
<div class="bg-slate-100 rounded-md overflow-hidden px-4 py-4 mt-8 mb-8">
|
||||||
<!-- label -->
|
<!-- label -->
|
||||||
<div class="mb-2 font-bold">Location</div>
|
<div class="mb-2 font-bold">Location for Searches</div>
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ name: 'search-area' }"
|
:to="{ name: 'search-area' }"
|
||||||
class="block w-full text-center text-m 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-2 mt-6"
|
class="block w-full text-center text-m 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-2 mt-6"
|
||||||
|
|||||||
@@ -381,9 +381,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="isEditedGlobalId" class="mt-2">
|
<span v-if="isEditedGlobalId" class="mt-2">
|
||||||
This record is an edited version. The latest version is being shown.
|
This record is an edited version. The latest version is here.
|
||||||
</span>
|
</span>
|
||||||
|
<br />
|
||||||
<button @click="showVeriClaimDump = !showVeriClaimDump" class="ml-2">
|
<button @click="showVeriClaimDump = !showVeriClaimDump" class="ml-2">
|
||||||
Details
|
Details
|
||||||
<fa v-if="showVeriClaimDump" icon="chevron-up" class="text-blue-400" />
|
<fa v-if="showVeriClaimDump" icon="chevron-up" class="text-blue-400" />
|
||||||
|
|||||||
@@ -1,11 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<QuickNav selected="Contacts"></QuickNav>
|
<QuickNav selected="Contacts"></QuickNav>
|
||||||
<section id="Content" class="p-6 pb-24 max-w-3xl mx-auto">
|
<section id="Content" class="p-6 pb-24 max-w-3xl mx-auto">
|
||||||
|
<!-- Back -->
|
||||||
|
<div class="text-lg text-center font-light relative px-7">
|
||||||
|
<h1
|
||||||
|
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
|
||||||
|
@click="$router.back()"
|
||||||
|
>
|
||||||
|
<fa icon="chevron-left" class="fa-fw"></fa>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<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">
|
||||||
Contact Import
|
Contact Import
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<span>
|
||||||
|
Note that you will have to make them visible one-by-one in the list of
|
||||||
|
Contacts.
|
||||||
|
</span>
|
||||||
<div v-if="sameCount > 0">
|
<div v-if="sameCount > 0">
|
||||||
{{ sameCount }} contact{{ sameCount == 1 ? "" : "s" }} are the same as
|
{{ sameCount }} contact{{ sameCount == 1 ? "" : "s" }} are the same as
|
||||||
existing contacts.
|
existing contacts.
|
||||||
@@ -56,7 +70,7 @@
|
|||||||
<fa icon="spinner" v-if="importing" class="animate-spin" />
|
<fa icon="spinner" v-if="importing" class="animate-spin" />
|
||||||
<button
|
<button
|
||||||
v-else
|
v-else
|
||||||
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"
|
class="bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-sm text-white mt-2 px-2 py-1.5 rounded"
|
||||||
@click="importContacts"
|
@click="importContacts"
|
||||||
>
|
>
|
||||||
Import Selected Contacts
|
Import Selected Contacts
|
||||||
@@ -146,13 +160,14 @@ export default class ContactImportView extends Vue {
|
|||||||
updatedCount = 0;
|
updatedCount = 0;
|
||||||
for (let i = 0; i < this.contactsImporting.length; i++) {
|
for (let i = 0; i < this.contactsImporting.length; i++) {
|
||||||
if (this.contactsSelected[i]) {
|
if (this.contactsSelected[i]) {
|
||||||
const contact = R.clone(this.contactsImporting[i]); // cloning to avoid the problem with a Proxy object
|
const contact = this.contactsImporting[i];
|
||||||
const existingContact = this.contactsExisting[contact.did];
|
const existingContact = this.contactsExisting[contact.did];
|
||||||
if (existingContact) {
|
if (existingContact) {
|
||||||
await db.contacts.update(contact.did, contact);
|
await db.contacts.update(contact.did, contact);
|
||||||
updatedCount++;
|
updatedCount++;
|
||||||
} else {
|
} else {
|
||||||
await db.contacts.add(contact);
|
// without explicit clone on the Proxy, we get: DataCloneError: Failed to execute 'add' on 'IDBObjectStore': #<Object> could not be cloned.
|
||||||
|
await db.contacts.add(R.clone(contact));
|
||||||
importedCount++;
|
importedCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -902,18 +902,19 @@ export default class ContactsView extends Vue {
|
|||||||
3000,
|
3000,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (result.error) {
|
} else {
|
||||||
|
console.error("Got strange result from setting visibility:", result);
|
||||||
|
const message =
|
||||||
|
(result.error as string) || "Could not set visibility on the server.";
|
||||||
this.$notify(
|
this.$notify(
|
||||||
{
|
{
|
||||||
group: "alert",
|
group: "alert",
|
||||||
type: "danger",
|
type: "danger",
|
||||||
title: "Error Setting Visibility",
|
title: "Error Setting Visibility",
|
||||||
text: result.error as string,
|
text: message,
|
||||||
},
|
},
|
||||||
5000,
|
5000,
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
console.error("Got strange result from setting visibility:", result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user