|
@ -20,7 +20,7 @@ |
|
|
</h1> |
|
|
</h1> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div @click="onCopyToClipboard()"> |
|
|
<div @click="onCopyToClipboard()" v-if="activeDid"> |
|
|
<!-- |
|
|
<!-- |
|
|
Play with display options: https://qr-code-styling.com/ |
|
|
Play with display options: https://qr-code-styling.com/ |
|
|
See docs: https://www.npmjs.com/package/qr-code-generator-vue3 |
|
|
See docs: https://www.npmjs.com/package/qr-code-generator-vue3 |
|
@ -32,6 +32,15 @@ |
|
|
class="flex justify-center" |
|
|
class="flex justify-center" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="text-center" v-else> |
|
|
|
|
|
You have no identitifiers yet, so |
|
|
|
|
|
<router-link :to="{ name: 'start' }" class="text-blue-500"> |
|
|
|
|
|
create your identifier. |
|
|
|
|
|
</router-link> |
|
|
|
|
|
<br /> |
|
|
|
|
|
We recommend you do that first; otherwise, these contacts won't see your |
|
|
|
|
|
activity. |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<h1 class="text-4xl text-center font-light pt-4">Scan Contact Info</h1> |
|
|
<h1 class="text-4xl text-center font-light pt-4">Scan Contact Info</h1> |
|
|
<qrcode-stream @detect="onScanDetect" @error="onScanError" /> |
|
|
<qrcode-stream @detect="onScanDetect" @error="onScanError" /> |
|
@ -106,17 +115,7 @@ export default class ContactQRScanShow extends Vue { |
|
|
await accountsDB.open(); |
|
|
await accountsDB.open(); |
|
|
const accounts = await accountsDB.accounts.toArray(); |
|
|
const accounts = await accountsDB.accounts.toArray(); |
|
|
const account = R.find((acc) => acc.did === this.activeDid, accounts); |
|
|
const account = R.find((acc) => acc.did === this.activeDid, accounts); |
|
|
if (!account) { |
|
|
if (account) { |
|
|
this.$notify( |
|
|
|
|
|
{ |
|
|
|
|
|
group: "alert", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
title: "", |
|
|
|
|
|
text: "You have no identity yet.", |
|
|
|
|
|
}, |
|
|
|
|
|
-1, |
|
|
|
|
|
); |
|
|
|
|
|
} else { |
|
|
|
|
|
const identity = await this.getIdentity(this.activeDid); |
|
|
const identity = await this.getIdentity(this.activeDid); |
|
|
const publicKeyHex = identity.keys[0].publicKeyHex; |
|
|
const publicKeyHex = identity.keys[0].publicKeyHex; |
|
|
const publicEncKey = Buffer.from(publicKeyHex, "hex").toString("base64"); |
|
|
const publicEncKey = Buffer.from(publicKeyHex, "hex").toString("base64"); |
|
|