fix visibility after adding contact, and some messaging

This commit is contained in:
2024-01-15 12:06:33 -07:00
parent 6ab4c40fd0
commit 32c9076c39
6 changed files with 20 additions and 11 deletions

View File

@@ -166,7 +166,7 @@ export default class OfferDialog extends Vue {
if (!identity) {
throw new Error(
"Attempted to load Offer records for DID ${activeDid} but no identifier was found",
`Attempted to load Offer records for DID ${activeDid} but no identifier was found`,
);
}
return identity;

View File

@@ -449,13 +449,14 @@ export async function createAndSubmitClaim(
} catch (error: any) {
console.error("Error creating claim:", error);
const errorMessage: string =
error.response?.data?.error?.message || error.message || "Unknown error";
error.response?.data?.error?.message ||
error.message ||
"Got some error submitting the claim. Check your permissions, network, and error logs.";
return {
type: "error",
error: {
error: errorMessage,
userMessage: "Failed to create and submit the claim.",
},
};
}

View File

@@ -628,6 +628,10 @@ export default class ContactsView extends Vue {
message =
"A contact with that DID is already in your contact list. Edit them directly below.";
}
if (err.name === "ConstraintError") {
message +=
"Check that the contact doesn't conflict with any you already have.";
}
this.$notify(
{
group: "alert",
@@ -782,7 +786,7 @@ export default class ContactsView extends Vue {
(visibility
? "Are you sure you want to make your activity visible to them?"
: "Are you sure you want to hide all your activity from them?");
if (visibilityPrompt && confirm(visibilityPrompt)) {
if (!visibilityPrompt || confirm(visibilityPrompt)) {
const url =
this.apiServer +
"/api/report/" +
@@ -911,7 +915,7 @@ export default class ContactsView extends Vue {
}
private nameForContact(contact?: Contact, capitalize?: boolean): string {
return contact?.name || (capitalize ? "T" : "t") + "this unnamed user";
return contact?.name || (capitalize ? "T" : "t") + "his unnamed user";
}
async onClickAddGive(fromDid: string, toDid: string): Promise<void> {

View File

@@ -44,14 +44,14 @@
@click="onClickNo()"
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mt-2"
>
No
No, I have a seed
</a>
<a
v-if="numAccounts > 0"
@click="onClickDerive()"
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md mt-2"
>
Derive New Address from Seed Imported Previously
Derive new address from existing seed
</a>
</div>
</section>