From 92b9c9334c424a7888202e980439755250cc5bfb Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Mon, 2 Jun 2025 21:35:15 +0800 Subject: [PATCH] Clickable person & project icons - Known entities get routed to their corresponding detail views - Unknown entities pop up a notification --- src/components/ActivityListItem.vue | 122 ++++++++++++++++++++++------ 1 file changed, 95 insertions(+), 27 deletions(-) diff --git a/src/components/ActivityListItem.vue b/src/components/ActivityListItem.vue index 177c6ee0..84711194 100644 --- a/src/components/ActivityListItem.vue +++ b/src/components/ActivityListItem.vue @@ -14,19 +14,29 @@ class="flex items-center justify-between gap-2 text-lg bg-slate-200 border border-slate-300 border-b-0 rounded-t-md px-3 sm:px-4 py-1 sm:py-2" >
- + :to="{ + path: '/did/' + encodeURIComponent(record.issuerDid), + }" + title="More details about this person" + > + + -
@@ -78,22 +88,37 @@
- + + +
- + :to="{ + path: '/did/' + encodeURIComponent(record.agentDid), + }" + title="More details about this person" + > + + @@ -101,6 +126,7 @@
@@ -146,22 +172,37 @@
- + + +
- + :to="{ + path: '/did/' + encodeURIComponent(record.recipientDid), + }" + title="More details about this person" + > + + @@ -169,6 +210,7 @@
@@ -205,6 +247,7 @@ import EntityIcon from "./EntityIcon.vue"; import { isGiveClaimType, notifyWhyCannotConfirm } from "../libs/util"; import { containsHiddenDid, isHiddenDid } from "../libs/endorserServer"; import ProjectIcon from "./ProjectIcon.vue"; +import { NotificationIface } from "../constants/app"; @Component({ components: { @@ -220,6 +263,31 @@ export default class ActivityListItem extends Vue { @Prop() confirmerIdList?: string[]; isHiddenDid = isHiddenDid; + $notify!: (notification: NotificationIface, timeout?: number) => void; + + notifyHiddenPerson() { + this.$notify( + { + group: "alert", + type: "warning", + title: "Hidden Person", + text: "This person is not visible to you.", + }, + 3000 + ); + } + + notifyUnknownPerson() { + this.$notify( + { + group: "alert", + type: "warning", + title: "Unknown Person", + text: "This person is not known.", + }, + 3000 + ); + } @Emit() cacheImage(image: string) {