forked from jsnbuchanan/crowd-funder-for-time-pwa
modify & explain icons next to feed
This commit is contained in:
@@ -407,7 +407,7 @@ export function contactForDid(
|
|||||||
* @param contact
|
* @param contact
|
||||||
* @param allMyDids
|
* @param allMyDids
|
||||||
* @return { known: boolean, displayName: string, profileImageUrl?: string }
|
* @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(
|
export function didInfoForContact(
|
||||||
did: string | undefined,
|
did: string | undefined,
|
||||||
@@ -422,7 +422,7 @@ export function didInfoForContact(
|
|||||||
} else if (contact) {
|
} else if (contact) {
|
||||||
return {
|
return {
|
||||||
displayName: contact.name || "Contact With No Name",
|
displayName: contact.name || "Contact With No Name",
|
||||||
known: !!contact.name,
|
known: !!contact,
|
||||||
profileImageUrl: contact.profileImageUrl,
|
profileImageUrl: contact.profileImageUrl,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
isRemoteActive = false;
|
isRemoteActive = false;
|
||||||
searchLocal();
|
searchLocal();
|
||||||
"
|
"
|
||||||
v-bind:class="computedLocalTabClassNames()"
|
v-bind:class="computedLocalTabStyleClassNames()"
|
||||||
>
|
>
|
||||||
Nearby
|
Nearby
|
||||||
<span
|
<span
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
isLocalActive = false;
|
isLocalActive = false;
|
||||||
searchAll();
|
searchAll();
|
||||||
"
|
"
|
||||||
v-bind:class="computedRemoteTabClassNames()"
|
v-bind:class="computedRemoteTabStyleClassNames()"
|
||||||
>
|
>
|
||||||
Anywhere
|
Anywhere
|
||||||
<span
|
<span
|
||||||
@@ -422,7 +422,7 @@ export default class DiscoverView extends Vue {
|
|||||||
this.$router.push(route);
|
this.$router.push(route);
|
||||||
}
|
}
|
||||||
|
|
||||||
public computedLocalTabClassNames() {
|
public computedLocalTabStyleClassNames() {
|
||||||
return {
|
return {
|
||||||
"inline-block": true,
|
"inline-block": true,
|
||||||
"py-3": true,
|
"py-3": true,
|
||||||
@@ -440,7 +440,7 @@ export default class DiscoverView extends Vue {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public computedRemoteTabClassNames() {
|
public computedRemoteTabStyleClassNames() {
|
||||||
return {
|
return {
|
||||||
"inline-block": true,
|
"inline-block": true,
|
||||||
"py-3": true,
|
"py-3": true,
|
||||||
|
|||||||
@@ -207,14 +207,22 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-12">
|
<div class="grid grid-cols-12">
|
||||||
<span class="col-span-1 justify-self-start">
|
<span class="pt-1 col-span-1 justify-self-start">
|
||||||
<span>
|
<span>
|
||||||
<fa
|
<fa
|
||||||
v-if="record.giver.known || record.receiver.known"
|
|
||||||
icon="circle-user"
|
icon="circle-user"
|
||||||
class="pt-1 text-slate-500"
|
:class="
|
||||||
|
computeKnownPersonIconStyleClassNames(
|
||||||
|
record.giver.known || record.receiver.known,
|
||||||
|
)
|
||||||
|
"
|
||||||
|
@click="toastUser('This involves your contacts.')"
|
||||||
|
/>
|
||||||
|
<fa
|
||||||
|
icon="gift"
|
||||||
|
class="pl-3 text-slate-500"
|
||||||
|
@click="toastUser('This is a gift.')"
|
||||||
/>
|
/>
|
||||||
<fa v-else icon="gift" class="pt-1 pl-3 text-slate-500" />
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="col-span-10 justify-self-stretch">
|
<span class="col-span-10 justify-self-stretch">
|
||||||
@@ -765,5 +773,21 @@ export default class HomeView extends Vue {
|
|||||||
openFeedFilters() {
|
openFeedFilters() {
|
||||||
(this.$refs.feedFilters as FeedFilters).open(this.reloadFeedOnChange);
|
(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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user