Browse Source

make invite notes the default user name when adding a contact

split_build_process
Trent Larson 3 weeks ago
parent
commit
f6509b4013
  1. 2
      src/components/ContactNameDialog.vue
  2. 6
      src/views/InviteOneView.vue

2
src/components/ContactNameDialog.vue

@ -51,10 +51,12 @@ export default class ContactNameDialog extends Vue {
message?: string, message?: string,
saveCallback?: (name?: string) => void, saveCallback?: (name?: string) => void,
cancelCallback?: () => void, cancelCallback?: () => void,
defaultName?: string,
) { ) {
this.cancelCallback = cancelCallback || this.cancelCallback; this.cancelCallback = cancelCallback || this.cancelCallback;
this.saveCallback = saveCallback || this.saveCallback; this.saveCallback = saveCallback || this.saveCallback;
this.message = message ?? this.message; this.message = message ?? this.message;
this.newText = defaultName ?? "";
this.title = title ?? this.title; this.title = title ?? this.title;
this.visible = true; this.visible = true;
} }

6
src/views/InviteOneView.vue

@ -110,7 +110,7 @@
v-if="invite.redeemedBy && !contactsRedeemed[invite.redeemedBy]" v-if="invite.redeemedBy && !contactsRedeemed[invite.redeemedBy]"
icon="plus" icon="plus"
class="bg-green-600 text-white px-1 py-1 rounded-full cursor-pointer" class="bg-green-600 text-white px-1 py-1 rounded-full cursor-pointer"
@click="addNewContact(invite.redeemedBy)" @click="addNewContact(invite.redeemedBy, invite.notes)"
/> />
</td> </td>
<td> <td>
@ -326,7 +326,7 @@ export default class InviteOneView extends Vue {
); );
} }
addNewContact(did: string) { addNewContact(did: string, notes: string) {
(this.$refs.contactNameDialog as ContactNameDialog).open( (this.$refs.contactNameDialog as ContactNameDialog).open(
"To Whom Did You Send The Invite?", "To Whom Did You Send The Invite?",
"Their name will be added to your contact list.", "Their name will be added to your contact list.",
@ -349,6 +349,8 @@ export default class InviteOneView extends Vue {
3000, 3000,
); );
}, },
() => {},
notes,
); );
} }

Loading…
Cancel
Save