feat(been): group duplicate venues in list, show visit count
This commit is contained in:
@@ -60,8 +60,10 @@ leafletMap: true
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if checkins.length %}
|
{% if checkins.length %}
|
||||||
|
{% set grouped = checkins | groupby("name") %}
|
||||||
<ul class="divide-y divide-surface-200 dark:divide-surface-700" aria-label="Past check-ins">
|
<ul class="divide-y divide-surface-200 dark:divide-surface-700" aria-label="Past check-ins">
|
||||||
{% for checkin in checkins %}
|
{% for group in grouped %}
|
||||||
|
{% set checkin = group.list[0] %}
|
||||||
<li class="py-3">
|
<li class="py-3">
|
||||||
<div class="font-medium text-surface-900 dark:text-surface-100">
|
<div class="font-medium text-surface-900 dark:text-surface-100">
|
||||||
{% if checkin.venueWebsiteUrl %}
|
{% if checkin.venueWebsiteUrl %}
|
||||||
@@ -69,6 +71,9 @@ leafletMap: true
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ checkin.name }}
|
{{ checkin.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if group.list | length > 1 %}
|
||||||
|
<span class="ml-2 text-xs font-normal text-surface-500 dark:text-surface-400">{{ group.list | length }}×</span>
|
||||||
|
{% endif %}
|
||||||
{% if checkin.isPrivate %}<span class="ml-2 text-xs text-amber-700 dark:text-amber-400">(private)</span>{% endif %}
|
{% if checkin.isPrivate %}<span class="ml-2 text-xs text-amber-700 dark:text-amber-400">(private)</span>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-surface-600 dark:text-surface-400 mt-0.5">
|
<div class="text-sm text-surface-600 dark:text-surface-400 mt-0.5">
|
||||||
|
|||||||
Reference in New Issue
Block a user