Skip to content

Commit f58af08

Browse files
committed
display distance and if user is online
1 parent 129cbcf commit f58af08

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

frontend/src/components/app/users/UserProfile.vue

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22
<!-- eslint-disable -->
33
<div class="profileContainer md:overflow-scroll">
44
<div class="text-center text-wrap p-8 md:pt-0 border-b">
5-
<h1 class="text-gray-matcha text-3xl font-semibold">{{user.first_name}}, {{user.age}}</h1>
6-
<div class="flex items-center text-left33">
7-
<img src="../../../assets/gender.png" class="w-4 h-4 mr-2">
8-
<h1 class="text-gray-matcha mt-4"><span class="capitalize">{{user.gender}}</span> looking for {{preferences()}}</h1>
5+
<h1 class="text-gray-matcha text-3xl font-semibold mb-6">{{user.first_name}}, {{user.age}}</h1>
6+
<div v-if="!user.is_online" class="flex items-center mt-2 text-left">
7+
<img class="w-3 h-3 mr-2" src="../../../assets/recommendations/offline.png">
8+
<h1 class="text-gray-matcha">Last seen {{formattedLastSeenDate}}</h1>
9+
</div>
10+
<div v-else class="flex items-center mt-2 text-left">
11+
<img class="w-3 h-3 mr-2" src="../../../assets/recommendations/online.png">
12+
<h1 class="text-gray-matcha">online</h1>
913
</div>
1014
<div class="flex items-center mt-2 text-left">
1115
<img src="../../../assets/location.png" class="w-4 h-4 mr-2">
12-
<h1 class="text-gray-matcha">42 km away</h1>
16+
<h1 class="text-gray-matcha">{{Math.floor(user.distance)}} km away</h1>
17+
</div>
18+
<div class="flex items-center mt-2 text-left">
19+
<img src="../../../assets/gender.png" class="w-4 h-4 mr-2">
20+
<h1 class="text-gray-matcha"><span class="capitalize">{{user.gender}}</span> looking for {{preferences()}}</h1>
1321
</div>
1422
</div>
1523
<div class="text-center text-wrap p-8 border-b">
@@ -19,10 +27,6 @@
1927
class="px-4 py-1 border rounded-xl mr-2 mt-2 text-gray-600">{{interest}}</h1>
2028
</div>
2129
</div>
22-
<div class="text-center text-wrap p-8 border-b">
23-
<h1>Last seen</h1>
24-
<h1>{{formattedLastSeenDate}}</h1>
25-
</div>
2630
<div class="text-center flex mx-auto p-8 border-b">
2731
<div class="w-8/12 border border-purple-matcha py-2 rounded-lg cursor-pointer">
2832
<img src="../../../assets/heart.png" class="mx-auto w-8 h-8">

0 commit comments

Comments
 (0)