Small fixes to Home.vue

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-06-17 11:44:51 +02:00
parent 68973b91d9
commit 8f4099ee33
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 8 additions and 5 deletions

View File

@ -58,7 +58,7 @@
<b slot="instance">{{ config.name }}</b> <b slot="instance">{{ config.name }}</b>
</i18n> </i18n>
</p> </p>
<div v-if="this.events.total > 0"> <div v-if="events.total > 0">
<multi-card :events="events.elements.slice(0, 6)" /> <multi-card :events="events.elements.slice(0, 6)" />
<span class="view-all"> <span class="view-all">
<router-link :to="{ name: RouteName.SEARCH }" <router-link :to="{ name: RouteName.SEARCH }"
@ -258,7 +258,10 @@
/> />
<!-- Events close to you --> <!-- Events close to you -->
<section class="events-close" v-if="canShowCloseEvents"> <section
class="events-close"
v-if="canShowCloseEvents && loggedUserSettings.location?.range"
>
<h2 class="title"> <h2 class="title">
{{ $t("Events nearby") }} {{ $t("Events nearby") }}
</h2> </h2>
@ -266,10 +269,10 @@
{{ {{
$tc( $tc(
"Within {number} kilometers of {place}", "Within {number} kilometers of {place}",
loggedUserSettings.location.range, loggedUserSettings.location?.range,
{ {
number: loggedUserSettings.location.range, number: loggedUserSettings.location?.range,
place: loggedUserSettings.location.name, place: loggedUserSettings.location?.name,
} }
) )
}} }}