From 1c0e0aeeba5062b903867f18465e406220a42cb3 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 25 Jun 2024 09:01:34 -0600 Subject: [PATCH] modify & explain icons next to feed --- src/libs/endorserServer.ts | 4 ++-- src/views/DiscoverView.vue | 8 ++++---- src/views/HomeView.vue | 32 ++++++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 735fe25ed..9dfb07872 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -407,7 +407,7 @@ export function contactForDid( * @param contact * @param allMyDids * @return { known: boolean, displayName: string, profileImageUrl?: string } - * where 'known' is true if the display name is some easily-recogizable name, false if it's a generic name like "Someone Unnamed" + * where 'known' is true if they are in the contacts */ export function didInfoForContact( did: string | undefined, @@ -422,7 +422,7 @@ export function didInfoForContact( } else if (contact) { return { displayName: contact.name || "Contact With No Name", - known: !!contact.name, + known: !!contact, profileImageUrl: contact.profileImageUrl, }; } else { diff --git a/src/views/DiscoverView.vue b/src/views/DiscoverView.vue index 50f6e7404..62635fc55 100644 --- a/src/views/DiscoverView.vue +++ b/src/views/DiscoverView.vue @@ -37,7 +37,7 @@ isRemoteActive = false; searchLocal(); " - v-bind:class="computedLocalTabClassNames()" + v-bind:class="computedLocalTabStyleClassNames()" > Nearby Anywhere
- + + - @@ -765,5 +773,21 @@ export default class HomeView extends Vue { openFeedFilters() { (this.$refs.feedFilters as FeedFilters).open(this.reloadFeedOnChange); } + + toastUser(message) { + this.$notify( + { + group: "alert", + type: "toast", + title: "FYI", + text: message, + }, + 2000, + ); + } + + computeKnownPersonIconStyleClassNames(known: boolean) { + return known ? "text-slate-500" : "text-slate-100"; + } }