From 9a4f7326c1dab8289273ca6d29edadbdd59379fb Mon Sep 17 00:00:00 2001
From: Moriz Wahl
Date: Mon, 22 Sep 2025 23:59:18 +0200
Subject: [PATCH] fix(webapp): no distance to me on own profile (#8907)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Wolfgang Huß
---
.../components/LocationInfo/LocationInfo.vue | 6 +-
.../UserTeaser/UserTeaserPopover.vue | 7 +-
webapp/pages/groups/_id/_slug.vue | 7 +-
.../_id/__snapshots__/_slug.spec.js.snap | 88 ++++++++++++++++++-
webapp/pages/profile/_id/_slug.spec.js | 8 ++
webapp/pages/profile/_id/_slug.vue | 7 +-
6 files changed, 115 insertions(+), 8 deletions(-)
diff --git a/webapp/components/LocationInfo/LocationInfo.vue b/webapp/components/LocationInfo/LocationInfo.vue
index 89dbeddf2..4d7f5960a 100644
--- a/webapp/components/LocationInfo/LocationInfo.vue
+++ b/webapp/components/LocationInfo/LocationInfo.vue
@@ -4,7 +4,7 @@
{{ locationData.name }}
-
+
{{ $t('location.distance', { distance: locationData.distanceToMe }) }}
@@ -22,6 +22,10 @@ export default {
return value.match(/(small|base)/)
},
},
+ isOwner: {
+ type: Boolean,
+ required: true,
+ },
},
}
diff --git a/webapp/components/UserTeaser/UserTeaserPopover.vue b/webapp/components/UserTeaser/UserTeaserPopover.vue
index e1c553cab..63f92df8c 100644
--- a/webapp/components/UserTeaser/UserTeaserPopover.vue
+++ b/webapp/components/UserTeaser/UserTeaserPopover.vue
@@ -4,7 +4,12 @@
v-if="$env.BADGES_ENABLED && user.badgeVerification"
:badges="[user.badgeVerification, ...user.badgeTrophiesSelected]"
/>
-
+
-
diff --git a/webapp/pages/groups/_id/_slug.vue b/webapp/pages/groups/_id/_slug.vue
index 66730f03f..06464c6b7 100644
--- a/webapp/pages/groups/_id/_slug.vue
+++ b/webapp/pages/groups/_id/_slug.vue
@@ -38,7 +38,12 @@
{{ `&${groupSlug}` }}
-
+
{{ $t('group.foundation') }} {{ group.createdAt | date('MMMM yyyy') }}
diff --git a/webapp/pages/profile/_id/__snapshots__/_slug.spec.js.snap b/webapp/pages/profile/_id/__snapshots__/_slug.spec.js.snap
index d4fa08457..013dab84b 100644
--- a/webapp/pages/profile/_id/__snapshots__/_slug.spec.js.snap
+++ b/webapp/pages/profile/_id/__snapshots__/_slug.spec.js.snap
@@ -181,7 +181,30 @@ exports[`ProfileSlug given an authenticated user given another profile user and
-
+
+
+
+
+
+
+ Berlin
+
+
+
+
+
+ location.distance
+
+
+
-
+
+
+
+
+
+
+ Berlin
+
+
+
+
+
+ location.distance
+
+
+
-
+
+
+
+
+
+
+ Paris
+
+
+
+
+
-
+
+
+
+
+
+
+ Paris
+
+
+
+
+
{
contributionsCount: 6,
shoutedCount: 7,
commentedCount: 8,
+ location: {
+ name: 'Berlin',
+ distanceToMe: '877 km',
+ },
badgeVerification: {
id: 'bv1',
icon: '/path/to/icon-bv1',
@@ -149,6 +153,10 @@ describe('ProfileSlug', () => {
contributionsCount: 6,
shoutedCount: 7,
commentedCount: 8,
+ location: {
+ name: 'Paris',
+ distanceToMe: '0 km',
+ },
badgeVerification: {
id: 'bv1',
icon: '/path/to/icon-bv1',
diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue
index 8a1505fcc..83b80b3af 100644
--- a/webapp/pages/profile/_id/_slug.vue
+++ b/webapp/pages/profile/_id/_slug.vue
@@ -34,7 +34,12 @@
{{ `@${userSlug}` }}
-
+
{{ $t('profile.memberSince') }} {{ user.createdAt | date('MMMM yyyy') }}