add hints for registration on the contact page

This commit is contained in:
2024-01-05 13:50:35 -07:00
parent 5353fe770a
commit 68f3b79983
7 changed files with 38 additions and 26 deletions

View File

@@ -9,17 +9,17 @@
<div class="flex justify-between py-2">
<span />
<span>
<router-link
:to="{ name: 'help' }"
<a
@click="showHintsForOnboarding()"
class="text-xs uppercase bg-blue-500 text-white px-1.5 py-1 rounded-md ml-1"
>
Help
</router-link>
Onboarding Hints
</a>
</span>
</div>
<!-- New Contact -->
<div class="mb-4 flex items-stretch">
<div class="mt-4 mb-4 flex items-stretch">
<router-link
:to="{ name: 'contact-qr' }"
class="flex items-center bg-slate-500 text-white px-1.5 py-1 mr-1 rounded-md"
@@ -144,19 +144,14 @@
@click="register(contact)"
class="text-sm uppercase bg-slate-500 text-white ml-6 px-2 py-1.5 rounded-md"
v-if="activeDid"
title="Registration"
>
<fa
v-if="contact.registered"
icon="person-circle-check"
class="fa-fw"
title="Registered"
/>
<fa
v-else
icon="person-circle-question"
class="fa-fw"
title="Registration Unknown"
/>
<fa v-else icon="person-circle-question" class="fa-fw" />
</button>
</div>
@@ -280,6 +275,7 @@ import { Component, Vue } from "vue-facing-decorator";
import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import { Account } from "@/db/tables/accounts";
import { ONBOARD_MESSAGE } from "@/libs/util";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;
@@ -477,6 +473,18 @@ export default class ContactsView extends Vue {
}
}
showHintsForOnboarding() {
this.$notify(
{
group: "alert",
type: "info",
title: "Onboard Someone",
text: ONBOARD_MESSAGE,
},
-1,
);
}
async onClickNewContact(): Promise<void> {
if (!this.contactInput) {
this.$notify(
@@ -582,10 +590,9 @@ export default class ContactsView extends Vue {
if (this.activeDid) {
this.setVisibility(newContact, true, false);
addedMessage =
newContact.name +
" was added, and your activity is visible to them.";
"They were added, and your activity is visible to them.";
} else {
addedMessage = newContact.name + " was added.";
addedMessage = "They were added.";
}
if (this.isRegistered) {
this.$notify(
@@ -593,10 +600,7 @@ export default class ContactsView extends Vue {
group: "alert",
type: "info",
title: "New User?",
text:
"If " +
newContact.name +
" is a new user, be sure to register them.",
text: "If they are a new user, be sure to register them.",
},
-1,
);