Browse Source

prompt them to fill in their name when sharing their info

design-tweaks-2023-12
Trent Larson 11 months ago
parent
commit
1be6c04699
  1. 2
      src/db/tables/settings.ts
  2. 12
      src/views/ContactQRScanShowView.vue
  3. 2
      src/views/NewEditAccountView.vue

2
src/db/tables/settings.ts

@ -16,7 +16,7 @@ export type Settings = {
activeDid?: string; // Active Decentralized ID activeDid?: string; // Active Decentralized ID
apiServer?: string; // API server URL apiServer?: string; // API server URL
firstName?: string; // User's first name firstName?: string; // User's first name
lastName?: string; // User's last name lastName?: string; // deprecated - put all names in firstName
lastViewedClaimId?: string; // Last viewed claim ID lastViewedClaimId?: string; // Last viewed claim ID
lastNotifiedClaimId?: string; // Last notified claim ID lastNotifiedClaimId?: string; // Last notified claim ID
isRegistered?: boolean; isRegistered?: boolean;

12
src/views/ContactQRScanShowView.vue

@ -18,6 +18,16 @@
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4"> <h1 id="ViewHeading" class="text-4xl text-center font-light pt-4">
Your Contact Info Your Contact Info
</h1> </h1>
<p v-if="!givenName" class="text-center mt-2">
<span class="text-red">Beware!</span>
You aren't sharing your name, so hurry and
<router-link
:to="{ name: 'new-edit-account' }"
class="bg-blue-500 text-white px-1.5 py-1 rounded-md"
>
go here to set it for them.
</router-link>
</p>
</div> </div>
<div @click="onCopyToClipboard()" v-if="activeDid"> <div @click="onCopyToClipboard()" v-if="activeDid">
@ -87,6 +97,7 @@ export default class ContactQRScanShow extends Vue {
activeDid = ""; activeDid = "";
apiServer = ""; apiServer = "";
givenName = "";
qrValue = ""; qrValue = "";
public async getIdentity(activeDid: string) { public async getIdentity(activeDid: string) {
@ -111,6 +122,7 @@ export default class ContactQRScanShow extends Vue {
const settings = await db.settings.get(MASTER_SETTINGS_KEY); const settings = await db.settings.get(MASTER_SETTINGS_KEY);
this.activeDid = settings?.activeDid || ""; this.activeDid = settings?.activeDid || "";
this.apiServer = settings?.apiServer || ""; this.apiServer = settings?.apiServer || "";
this.givenName = settings?.firstName || "";
await accountsDB.open(); await accountsDB.open();
const accounts = await accountsDB.accounts.toArray(); const accounts = await accountsDB.accounts.toArray();

2
src/views/NewEditAccountView.vue

@ -68,7 +68,7 @@ export default class NewEditAccountView extends Vue {
}); });
localStorage.setItem("firstName", this.givenName as string); localStorage.setItem("firstName", this.givenName as string);
localStorage.setItem("lastName", ""); // deprecated, pre v 0.1.3 localStorage.setItem("lastName", ""); // deprecated, pre v 0.1.3
this.$router.push({ name: "account" }); this.$router.back();
} }
onClickCancel() { onClickCancel() {

Loading…
Cancel
Save