Add user setting to provide location and show events near location on
homepage Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -39,13 +39,24 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<p class="event-title">{{ event.title }}</p>
|
||||
<div class="event-subtitle" v-if="event.physicalAddress">
|
||||
<p class="event-title" :title="event.title">{{ event.title }}</p>
|
||||
<div
|
||||
class="event-subtitle"
|
||||
v-if="event.physicalAddress"
|
||||
:title="
|
||||
isDescriptionDifferentFromLocality
|
||||
? `${event.physicalAddress.description}, ${event.physicalAddress.locality}`
|
||||
: event.physicalAddress.description
|
||||
"
|
||||
>
|
||||
<!-- <p>{{ $t('By @{username}', { username: actor.preferredUsername }) }}</p>-->
|
||||
<span>
|
||||
<span v-if="isDescriptionDifferentFromLocality">
|
||||
{{ event.physicalAddress.description }},
|
||||
{{ event.physicalAddress.locality }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ event.physicalAddress.description }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,6 +141,14 @@ export default class EventCard extends Vue {
|
||||
this.event.organizerActor || this.mergedOptions.organizerActor
|
||||
);
|
||||
}
|
||||
|
||||
get isDescriptionDifferentFromLocality(): boolean {
|
||||
return (
|
||||
this.event?.physicalAddress?.description !==
|
||||
this.event?.physicalAddress?.locality &&
|
||||
this.event?.physicalAddress?.description !== undefined
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user