add more visibility for invite JWT plus a check for JWT, bump version to 0.3.42

This commit is contained in:
2024-12-27 09:06:25 -07:00
parent f4dd7bafca
commit 67b4d0e953
5 changed files with 46 additions and 8 deletions

View File

@@ -16,7 +16,10 @@
Contact Import
</h1>
<span v-if="contactsImporting.length > sameCount" class="flex justify-center">
<span
v-if="contactsImporting.length > sameCount"
class="flex justify-center"
>
<input type="checkbox" v-model="makeVisible" class="mr-2" />
Make my activity visible to these contacts.
</span>
@@ -31,7 +34,10 @@
</div>
<!-- Results List -->
<ul v-if="contactsImporting.length > sameCount" class="border-t border-slate-300">
<ul
v-if="contactsImporting.length > sameCount"
class="border-t border-slate-300"
>
<li v-for="(contact, index) in contactsImporting" :key="contact.did">
<div
v-if="

View File

@@ -7,12 +7,18 @@
Go back to your invite message and copy the entire text, then paste it
here.
</p>
<input
<p class="mt-2">
If the link looks correct, try Chrome. (For example, iOS Safari does not
work well with the invite link.)
</p>
<textarea
v-model="inputJwt"
type="text"
placeholder="Paste invitation..."
class="mt-4 border-2 border-gray-300 p-2 rounded"
cols="40"
@input="() => checkInvite(inputJwt)"
/>
<br />
<button
@click="() => processInvite(inputJwt, true)"
class="ml-2 p-2 bg-blue-500 text-white rounded"
@@ -134,5 +140,23 @@ export default class InviteOneAcceptView extends Vue {
}
this.checkingInvite = false;
}
// check the invite JWT
async checkInvite(jwtInput: string) {
if (
jwtInput.endsWith("invite-one-accept") ||
jwtInput.endsWith("invite-one-accept/")
) {
this.$notify(
{
group: "alert",
type: "danger",
title: "Error",
text: "That is only part of the invite link; it's missing data at the end. Try another way to get the full link.",
},
5000,
);
}
}
}
</script>