From dbeeeb6ab37f08d603b9e44214c6e5bdf099462e Mon Sep 17 00:00:00 2001 From: Sirapop Theeranantachai Date: Fri, 29 May 2026 00:57:05 -0700 Subject: [PATCH] Improve people access invite flow --- src/components/InvitePeopleModal.vue | 27 ++++++++++++++++++++------- src/components/NavBar.vue | 5 +++-- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/components/InvitePeopleModal.vue b/src/components/InvitePeopleModal.vue index 572a65c0..6c1868cb 100644 --- a/src/components/InvitePeopleModal.vue +++ b/src/components/InvitePeopleModal.vue @@ -14,6 +14,9 @@ +

+ Invitations are ready. Share this link with the people you added. +

Enter an email address or NDN name below

@@ -114,9 +117,11 @@ @click="removeInvitee(item.name)" title="Remove this pending invitee"> - + + + @@ -130,10 +135,12 @@
- +
@@ -181,6 +188,7 @@ const members = ref([] as string[]); const invitees = ref([] as IProfile[]); const pendingInvitees = ref([] as IProfile[]); const pendingRequests = ref([] as IProfile[]); +const inviteCreated = ref(false); const displayMembers = computed(() => members.value.map((member) => utils.stripNdnPrefixForDisplay(member)), ); @@ -218,6 +226,7 @@ watch( invitees.value = wksp.value.invite.getInviteArray(); pendingInvitees.value.length = 0; // clear pending invitees + inviteCreated.value = false; pendingRequests.value.length = 0; _access_requests.forEach((requester) => { if (wksp.value?.metadata.name == requester[0] && !requester[2]) // requester[2] is false if request has not been dealt with yet @@ -316,6 +325,7 @@ function addInvitee(invitee: string) { // Add to pending invitee list pendingInvitees.value.push(new_profile); + inviteCreated.value = false; } // Add an access request to the pending list @@ -431,8 +441,11 @@ async function send() { } // Finish - Toast.success(`Invited ${pendingInvitees.value.length} users to workspace!`); - emit('close'); + const sentInvitees = [...pendingInvitees.value]; + pendingInvitees.value.length = 0; + invitees.value.push(...sentInvitees); + inviteCreated.value = true; + Toast.success(`Invited ${sentInvitees.length} users to workspace!`); } function displayProfileName(name: string): string { diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index fd086bcf..1054d0e6 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -142,8 +142,8 @@