forked from trent_larson/crowd-funder-for-time-pwa
after copying personal data, add a message to copy contacts for them
This commit is contained in:
@@ -1128,8 +1128,8 @@ export default class ContactsView extends Vue {
|
||||
this.contactsSelected.includes(c.did),
|
||||
);
|
||||
const message =
|
||||
"To add contacts, paste this into the box on the 'People' screen.\n\n" +
|
||||
JSON.stringify(selectedContacts, null, 2);
|
||||
"To add contacts, paste this into the box on the 'Contacts' screen.\n\n" +
|
||||
JSON.stringify(selectedContacts);
|
||||
useClipboard()
|
||||
.copy(message)
|
||||
.then(() => {
|
||||
@@ -1138,7 +1138,7 @@ export default class ContactsView extends Vue {
|
||||
group: "alert",
|
||||
type: "info",
|
||||
title: "Copied",
|
||||
text: "Those contacts were copied to the clipboard. Have them paste it in the box on their 'People' screen.",
|
||||
text: "Those contacts were copied to the clipboard. Have them paste it in the box on their 'Contacts' screen.",
|
||||
},
|
||||
5000,
|
||||
);
|
||||
|
||||
@@ -30,10 +30,12 @@
|
||||
Copy to Clipboard
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-8">Click to copy your info, then send it to them.</div>
|
||||
<div>
|
||||
They will paste it in the input box on the Contacts
|
||||
<fa icon="users" /> screen.
|
||||
<div class="ml-12">
|
||||
<div class="mt-8">Click to copy your info, then send it to them.</div>
|
||||
<div>
|
||||
They will paste it in the input box on the Contacts
|
||||
<fa icon="users" /> screen.
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -69,6 +71,8 @@ export default class ShareMyContactInfoView extends Vue {
|
||||
const accounts = await accountsDB.accounts.toArray();
|
||||
const account = R.find((acc) => acc.did === activeDid, accounts);
|
||||
|
||||
const numContacts = await db.contacts.count();
|
||||
|
||||
if (account) {
|
||||
const message = await generateEndorserJwtForAccount(
|
||||
account,
|
||||
@@ -88,6 +92,19 @@ export default class ShareMyContactInfoView extends Vue {
|
||||
},
|
||||
5000,
|
||||
);
|
||||
if (numContacts > 0) {
|
||||
setTimeout(() => {
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "success",
|
||||
title: "Share Other Contacts",
|
||||
text: "You may want to share some of your contacts with them. Select them below to copy and send.",
|
||||
},
|
||||
10000,
|
||||
);
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
(this.$router as Router).push({ name: "contacts" });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user