diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index fab730620..8837c6f78 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -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, ); diff --git a/src/views/ShareMyContactInfoView.vue b/src/views/ShareMyContactInfoView.vue index defbc1254..72b2788c9 100644 --- a/src/views/ShareMyContactInfoView.vue +++ b/src/views/ShareMyContactInfoView.vue @@ -30,10 +30,12 @@ Copy to Clipboard -
Click to copy your info, then send it to them.
-
- They will paste it in the input box on the Contacts - screen. +
+
Click to copy your info, then send it to them.
+
+ They will paste it in the input box on the Contacts + screen. +
@@ -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 { diff --git a/test-playwright/40-add-contact.spec.ts b/test-playwright/40-add-contact.spec.ts index 1b7d1435a..270be342e 100644 --- a/test-playwright/40-add-contact.spec.ts +++ b/test-playwright/40-add-contact.spec.ts @@ -32,11 +32,10 @@ test('Add contact, record gift, confirm gift', async ({ page }) => { await page.getByPlaceholder('URL or DID, Name, Public Key').fill('did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F, User #000'); await page.locator('button > svg.fa-plus').click(); await expect(page.locator('div[role="alert"]')).toBeVisible(); - await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss alert + await page.locator('div[role="alert"] button:has-text("No")').click(); // don't register + await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss info alert await expect(page.locator('div[role="alert"] button > svg.fa-xmark')).toBeHidden(); // ensure alert is gone - await page.locator('div[role="alert"] button:has-text("Cancel")').click(); - // Verify added contact await expect(page.locator('li.border-b')).toContainText('User #000'); @@ -97,8 +96,8 @@ test('Add contact, copy details, delete, and import various ways', async ({ page await page.getByPlaceholder('URL or DID, Name, Public Key').fill('did:ethr:0x111d15564f824D56C7a07b913aA7aDd03382aA39, User #111'); await page.locator('button > svg.fa-plus').click(); await expect(page.locator('div[role="alert"]')).toBeVisible(); - await page.locator('div[role="alert"] button:has-text("No")').click(); - await page.locator('div[role="alert"] button > svg.fa-xmark').click(); + await page.locator('div[role="alert"] button:has-text("No")').click(); // don't register + await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss info alert // wait for the alert to disappear await expect(page.locator('div[role="alert"]')).toBeHidden(); @@ -106,8 +105,8 @@ test('Add contact, copy details, delete, and import various ways', async ({ page await page.getByPlaceholder('URL or DID, Name, Public Key').fill('did:ethr:0x222BB77E6Ff3774d34c751f3c1260866357B677b, User #222, asdf1234'); await page.locator('button > svg.fa-plus').click(); await expect(page.locator('div[role="alert"]')).toBeVisible(); - await page.locator('div[role="alert"] button:has-text("No")').click(); - await page.locator('div[role="alert"] button > svg.fa-xmark').click(); + await page.locator('div[role="alert"] button:has-text("No")').click(); // don't register + await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss info alert await expect(page.locator('div[role="alert"]')).toBeHidden(); await expect(page.getByTestId('contactListItem')).toHaveCount(2);