|
@ -27,9 +27,17 @@ |
|
|
.displayName |
|
|
.displayName |
|
|
}} |
|
|
}} |
|
|
</h2> |
|
|
</h2> |
|
|
<span class="mt-2 text-xl font-semibold break-words"> |
|
|
<button @click="showDidDetails = !showDidDetails" class="ml-2 mr-2"> |
|
|
{{ viewingDid }} |
|
|
Details |
|
|
</span> |
|
|
<fa v-if="showDidDetails" icon="chevron-up" class="text-blue-400" /> |
|
|
|
|
|
<fa v-else icon="chevron-down" class="text-blue-400" /> |
|
|
|
|
|
</button> |
|
|
|
|
|
<!-- Keep the dump contents directly between > and < to avoid weird spacing. --> |
|
|
|
|
|
<pre |
|
|
|
|
|
v-if="showDidDetails" |
|
|
|
|
|
class="text-sm overflow-x-scroll px-4 py-3 bg-slate-100 rounded-md" |
|
|
|
|
|
>{{ contactYaml }}</pre |
|
|
|
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex justify-center mt-4"> |
|
|
<div class="flex justify-center mt-4"> |
|
|
<span v-if="contact?.profileImageUrl" class="flex justify-between"> |
|
|
<span v-if="contact?.profileImageUrl" class="flex justify-between"> |
|
@ -126,6 +134,7 @@ |
|
|
<script lang="ts"> |
|
|
<script lang="ts"> |
|
|
import { Component, Vue } from "vue-facing-decorator"; |
|
|
import { Component, Vue } from "vue-facing-decorator"; |
|
|
import { Router } from "vue-router"; |
|
|
import { Router } from "vue-router"; |
|
|
|
|
|
import * as yaml from "js-yaml"; |
|
|
|
|
|
|
|
|
import QuickNav from "@/components/QuickNav.vue"; |
|
|
import QuickNav from "@/components/QuickNav.vue"; |
|
|
import InfiniteScroll from "@/components/InfiniteScroll.vue"; |
|
|
import InfiniteScroll from "@/components/InfiniteScroll.vue"; |
|
@ -144,6 +153,7 @@ import { |
|
|
GiveVerifiableCredential, |
|
|
GiveVerifiableCredential, |
|
|
OfferVerifiableCredential, |
|
|
OfferVerifiableCredential, |
|
|
} from "@/libs/endorserServer"; |
|
|
} from "@/libs/endorserServer"; |
|
|
|
|
|
import * as libsUtil from "@/libs/util"; |
|
|
import EntityIcon from "@/components/EntityIcon.vue"; |
|
|
import EntityIcon from "@/components/EntityIcon.vue"; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
@ -157,14 +167,19 @@ import EntityIcon from "@/components/EntityIcon.vue"; |
|
|
export default class DIDView extends Vue { |
|
|
export default class DIDView extends Vue { |
|
|
$notify!: (notification: NotificationIface, timeout?: number) => void; |
|
|
$notify!: (notification: NotificationIface, timeout?: number) => void; |
|
|
|
|
|
|
|
|
|
|
|
libsUtil = libsUtil; |
|
|
|
|
|
yaml = yaml; |
|
|
|
|
|
|
|
|
activeDid = ""; |
|
|
activeDid = ""; |
|
|
allMyDids: Array<string> = []; |
|
|
allMyDids: Array<string> = []; |
|
|
apiServer = ""; |
|
|
apiServer = ""; |
|
|
claims: Array<GenericCredWrapper<GenericVerifiableCredential>> = []; |
|
|
claims: Array<GenericCredWrapper<GenericVerifiableCredential>> = []; |
|
|
contact?: Contact; |
|
|
contact?: Contact; |
|
|
|
|
|
contactYaml = ""; |
|
|
hitEnd = false; |
|
|
hitEnd = false; |
|
|
isLoading = false; |
|
|
isLoading = false; |
|
|
searchBox: { name: string; bbox: BoundingBox } | null = null; |
|
|
searchBox: { name: string; bbox: BoundingBox } | null = null; |
|
|
|
|
|
showDidDetails = false; |
|
|
showLargeIdenticonId?: string; |
|
|
showLargeIdenticonId?: string; |
|
|
showLargeIdenticonUrl?: string; |
|
|
showLargeIdenticonUrl?: string; |
|
|
viewingDid?: string; |
|
|
viewingDid?: string; |
|
@ -183,6 +198,7 @@ export default class DIDView extends Vue { |
|
|
if (pathParam) { |
|
|
if (pathParam) { |
|
|
this.viewingDid = decodeURIComponent(pathParam); |
|
|
this.viewingDid = decodeURIComponent(pathParam); |
|
|
this.contact = await db.contacts.get(this.viewingDid); |
|
|
this.contact = await db.contacts.get(this.viewingDid); |
|
|
|
|
|
this.contactYaml = yaml.dump(this.contact) |
|
|
await this.loadClaimsAbout(); |
|
|
await this.loadClaimsAbout(); |
|
|
} else { |
|
|
} else { |
|
|
this.$notify( |
|
|
this.$notify( |
|
|