|
@ -273,6 +273,7 @@ import { |
|
|
displayAmount, |
|
|
displayAmount, |
|
|
getHeaders, |
|
|
getHeaders, |
|
|
register, |
|
|
register, |
|
|
|
|
|
setVisibilityUtil, |
|
|
} from "../libs/endorserServer"; |
|
|
} from "../libs/endorserServer"; |
|
|
import * as libsUtil from "../libs/util"; |
|
|
import * as libsUtil from "../libs/util"; |
|
|
import EntityIcon from "../components/EntityIcon.vue"; |
|
|
import EntityIcon from "../components/EntityIcon.vue"; |
|
@ -324,6 +325,7 @@ export default class DIDView extends Vue { |
|
|
apiServer = ""; |
|
|
apiServer = ""; |
|
|
claims: Array<GenericCredWrapper<GenericVerifiableCredential>> = []; |
|
|
claims: Array<GenericCredWrapper<GenericVerifiableCredential>> = []; |
|
|
contactFromDid?: Contact; |
|
|
contactFromDid?: Contact; |
|
|
|
|
|
|
|
|
contactYaml = ""; |
|
|
contactYaml = ""; |
|
|
hitEnd = false; |
|
|
hitEnd = false; |
|
|
isLoading = false; |
|
|
isLoading = false; |
|
@ -722,9 +724,15 @@ export default class DIDView extends Vue { |
|
|
visibility: boolean, |
|
|
visibility: boolean, |
|
|
showSuccessAlert: boolean, |
|
|
showSuccessAlert: boolean, |
|
|
) { |
|
|
) { |
|
|
// Update contact visibility using mixin method |
|
|
const result = await setVisibilityUtil( |
|
|
await this.$updateContact(contact.did, { seesMe: visibility }); |
|
|
this.activeDid, |
|
|
|
|
|
this.apiServer, |
|
|
|
|
|
this.axios, |
|
|
|
|
|
contact, |
|
|
|
|
|
visibility, |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (result.success) { |
|
|
if (showSuccessAlert) { |
|
|
if (showSuccessAlert) { |
|
|
const message = |
|
|
const message = |
|
|
(contact.name || "That user") + |
|
|
(contact.name || "That user") + |
|
@ -734,6 +742,13 @@ export default class DIDView extends Vue { |
|
|
this.notify.success(message, TIMEOUTS.SHORT); |
|
|
this.notify.success(message, TIMEOUTS.SHORT); |
|
|
} |
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
|
|
|
} else { |
|
|
|
|
|
logger.error("Got strange result from setting visibility:", result); |
|
|
|
|
|
const message = |
|
|
|
|
|
(result.error as string) || "Could not set visibility on the server."; |
|
|
|
|
|
this.notify.error(message, TIMEOUTS.LONG); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|