Skip to content

Commit b7d5b0d

Browse files
authored
Merge branch 'dev' into 448-online-user
2 parents fed41c9 + 8a43416 commit b7d5b0d

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@
3636
<h1>{{user.bio}}</h1>
3737
<div class="flex flex-wrap justify-center mx-auto mt-6">
3838
<h1 v-for="(interest, index) in userInterests" :key="index"
39-
class="px-4 py-1 border rounded-xl mr-2 mt-2 text-gray-600 text-sm">{{interest}}</h1>
39+
v-bind:class="{
40+
'px-4': true,
41+
'py-1': true,
42+
'border': !interest.common,
43+
'border-2': interest.common,
44+
'border-purple-matcha': interest.common,
45+
'rounded-xl': true,
46+
'mr-2': true,
47+
'mt-2': true,
48+
'text-gray-600': true,
49+
'text-sm': true}">{{interest.name}}</h1>
4050
</div>
4151
</div>
4252
<div v-if="avatarsUploaded()" class="text-center flex flex-col mx-auto p-8 border-b">
@@ -244,9 +254,18 @@ export default {
244254
this.checkIfUserIsBlocked();
245255
this.checkIfUserIsMatched();
246256
const interests = this.user.tags;
257+
const loggedInUserInterests = this.$store.getters.getLoggedInUser.tags;
258+
const loggedInUserInterestsNames = [];
259+
for (let k = 0; k < loggedInUserInterests.length; k += 1) {
260+
loggedInUserInterestsNames.push(loggedInUserInterests[k].name);
261+
}
247262
if (interests) {
248263
for (let j = 0; j < interests.length; j += 1) {
249-
this.userInterests.push(interests[j].name);
264+
if (loggedInUserInterestsNames.indexOf(interests[j].name) !== -1) {
265+
this.userInterests.push({ name: interests[j].name, common: true });
266+
} else {
267+
this.userInterests.push({ name: interests[j].name, common: false });
268+
}
250269
}
251270
}
252271
},

frontend/src/components/shared/FilterSlider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import noUiSlider from 'nouislider';
1919
import 'nouislider/distribute/nouislider.css';
2020
2121
export default {
22-
props: ['options', 'name', 'unit', 'min', 'max', 'oneHandle'],
22+
props: ['options', 'name', 'unit', 'min', 'max', 'oneHandle', 'start'],
2323
data: () => ({
2424
slider: {
2525
startMin: null,
@@ -38,7 +38,7 @@ export default {
3838
this.slider.start = this.min;
3939
let start;
4040
if (this.oneHandle) {
41-
start = 0;
41+
start = this.start;
4242
} else {
4343
start = [this.slider.startMin, this.slider.startMax];
4444
}

frontend/src/views/app/Search.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
v-bind:max="2000"
3434
v-bind:unit="'km'"
3535
v-bind:oneHandle="true"
36+
v-bind:start="500"
3637
v-bind:name="'distance'"
3738
v-on:save-filter="saveFilter"></FilterSlider>
3839
<FilterSlider

0 commit comments

Comments
 (0)