Skip to content

Commit 36aa4f5

Browse files
authored
Merge pull request #5 from virtuagora/2.x
Ready for 2.0.1
2 parents 64b0bd4 + 6aaf6d8 commit 36aa4f5

File tree

8 files changed

+53
-20
lines changed

8 files changed

+53
-20
lines changed

src/assets/sass/_global.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,11 @@ img.is-centered {
7272
.modal-card {
7373
color: #000;
7474
}
75+
76+
.cn-back-home {
77+
position: fixed;
78+
left: 12px;
79+
top: 12px;
80+
width: 27px;
81+
z-index: 20;
82+
}

src/components/Navbar.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
<img class="image" :src="userAvatarUrl">
66
</div>
77
<b-dropdown-item custom aria-role="menuitem">
8-
<router-link :to="{name: 'profile', params:{ id: user.id}}" class="has-text-dark">Logged as
9-
<b>{{user.display_name}}</b></router-link>
8+
9+
<b>{{user.display_name}}</b>
10+
</b-dropdown-item>
11+
<b-dropdown-item aria-role="listitem" has-link v-if="user">
12+
<router-link :to="{name: 'profile', params:{ id: user.id}}" class="has-text-link">My profile</router-link>
1013
</b-dropdown-item>
1114
<b-dropdown-item aria-role="listitem" has-link v-if="user">
1215
<router-link :to="{name: 'user'}" class="has-text-link">My panel</router-link>

src/i18n/en/user/userPanel/areasOfInterest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const areasOfInterest = {
22
title: 'My areas of interest',
33
subtitle: 'Here you can see your areas of interests. Click <i class="fas fa-times-circle"></i>&nbsp;to delete an area',
44
emptyAreas: 'You don\'t have any areas of interest... Add a few ones! :)',
5+
currentAreas: 'My current areas of interest',
56
manage: {
67
title: 'Manage areas of interest',
78
subtitle: 'Here you can add multiples areas of interest',

src/views/creating-networks-tv/Catalog.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,6 @@ export default {
139139
width: 100%;
140140
height: 100%;
141141
}
142-
.cn-back-home {
143-
position: fixed;
144-
left: 12px;
145-
top: 12px;
146-
width: 27px;
147-
z-index: 20;
148-
}
149142
.logo-cntv {
150143
height: 70px;
151144
margin: 0 auto 20px;

src/views/initiative/Initiative.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<section>
33
<section>
44
<div id="hero" class="hero is-medium is-dark">
5+
<router-link :to="{name: 'home'}" class="cn-back-home">
6+
<img src="/iso-cn.svg" class="image" alt />
7+
</router-link>
58
<div class="hero-body">
69
<div class="container">
710
<br class="is-hidden-desktop">
@@ -37,7 +40,7 @@
3740
<li :class="{'is-active': $route.name === 'initiativeDetails'}">
3841
<router-link :to="{ name: 'initiativeDetails', params: { id: initiative.id } }">Details</router-link>
3942
</li>
40-
<li :class="{'is-active': $route.name === 'initiativeMembers'}" v-if="initiative.city">
43+
<li :class="{'is-active': $route.name === 'initiativeLocation'}" v-if="initiative.city">
4144
<router-link :to="{ name: 'initiativeLocation', params: { id: initiative.id } }">Location</router-link>
4245
</li>
4346
<li :class="{'is-active': $route.name === 'initiativeMembers'}">

src/views/profile/Profile.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<section>
33
<section>
44
<div id="hero" class="hero is-fullheight is-dark">
5+
<router-link :to="{name: 'home'}" class="cn-back-home">
6+
<img src="/iso-cn.svg" class="image" alt />
7+
</router-link>
58
<div class="hero-body">
69
<div class="container">
710
<div class="columns">
@@ -14,15 +17,15 @@
1417
<div class="column">
1518
<h1 class="title is-1 is-size-3-touch">{{userProfile.display_name}}</h1>
1619
<div class="content">
17-
<p class="add-br is-italic">{{userProfile.bio}}</p>
20+
<p class="add-br is-italic" >{{userProfile.bio || 'I haven\'t completed my bio yet!' }}</p>
1821
</div>
1922
<div class="columns is-mobile">
2023
<div class="column is-narrow">
2124
<a
2225
:href="`https://${userProfile.data.website}`"
2326
target="_blank"
2427
class="has-text-white"
25-
v-if="userProfile.data.website"
28+
v-if="userProfile.data && userProfile.data.website"
2629
>
2730
<i class="fas fa-globe fa-lg fa-fw"></i>
2831
</a>
@@ -32,7 +35,7 @@
3235
:href="`https://facebook.com/${userProfile.data.facebook}`"
3336
target="_blank"
3437
class="has-text-white"
35-
v-if="userProfile.data.facebook"
38+
v-if="userProfile.data && userProfile.data.facebook"
3639
>
3740
<i class="fab fa-facebook-f fa-lg fa-fw"></i>
3841
</a>
@@ -42,7 +45,7 @@
4245
:href="`https://twitter.com/${userProfile.data.twitter}`"
4346
target="_blank"
4447
class="has-text-white"
45-
v-if="userProfile.data.twitter"
48+
v-if="userProfile.data && userProfile.data.twitter"
4649
>
4750
<i class="fab fa-twitter fa-lg fa-fw"></i>
4851
</a>
@@ -52,15 +55,15 @@
5255
:href="`https://${userProfile.data.other_network}`"
5356
target="_blank"
5457
class="has-text-white"
55-
v-if="userProfile.data.other_network"
58+
v-if="userProfile.data && userProfile.data.other_network"
5659
>
5760
<i class="fas fa-external-link-alt fa-lg fa-fw"></i>
5861
</a>
5962
</div>
6063
</div>
6164
<h1 class="subtitle is-5 has-text-white"><i class="fas fa-tag"></i>&nbsp;Areas of interest</h1>
6265
<div class="content" v-if="userProfile.person.terms.length == 0">
63-
<p><i>I haven't done this, yet!</i></p>
66+
<p><i>I haven't completed my areas of interest yet!</i></p>
6467
</div>
6568
<div class="tags">
6669
<span class="tag is-rounded is-medium is-primary" v-for="area in userProfile.person.terms" :key="area.id">{{area.name}}</span>

src/views/user/account/AreasOfInterest.vue

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<template>
22
<section>
3-
<h1 class="title is-3">{{$t('user.userPanel.areasOfInterest.title')}}</h1>
3+
<h1 class="title is-3">{{$t('user.userPanel.areasOfInterest.title')}}</h1>
44
<p v-html="$t('user.userPanel.areasOfInterest.subtitle')"></p>
55
<br>
66
<div class="card">
77
<div class="card-content">
8+
<h1 class="title has-text-dark is-3">{{$t('user.userPanel.areasOfInterest.currentAreas')}}</h1>
89
<b-taglist v-if="currentAreas && currentAreas.length > 0">
910
<b-tag v-for="area in currentAreas" type="is-primary" size="is-medium" closable :key="area.id" @close="remove(area.id)">{{area.name}}</b-tag>
1011
</b-taglist>
@@ -65,10 +66,30 @@ export default {
6566
};
6667
},
6768
mounted: function() {
68-
this.currentAreas = [] //TODO
69+
this.fetchUser()
6970
this.fetchAvailableAreasOfInterest()
7071
},
7172
methods: {
73+
sync: function(data){
74+
if(!data.person.terms) currentAreas = []
75+
this.currentAreas = data.person.terms
76+
},
77+
fetchUser: function() {
78+
this.startLoading();
79+
this.$http
80+
.get(`/v1/users/${this.user.id}`)
81+
.then(res => {
82+
this.sync(res.data.data)
83+
})
84+
.catch(err => {
85+
console.error(err);
86+
if (err.response && err.response.data)
87+
this.$toast.open(err.response.data.message);
88+
})
89+
.finally(() => {
90+
this.stopLoading();
91+
});
92+
},
7293
fetchAvailableAreasOfInterest: function(){
7394
this.startLoading();
7495
this.$http

src/views/user/account/Profile.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<div class="media-content">
1414
<img class="myAvatar image is-hidden-desktop is-centered" :src="userAvatarUrl" />
1515
<br />
16-
<h1 class="title is-1 has-text-black has-text-centered-touch">Guillermo Croppi</h1>
16+
<h1 class="title is-1 has-text-black has-text-centered-touch">{{user.display_name}}</h1>
17+
<h1 class="subtitle is-6 has-text-centered-touch"><router-link :to="{name: 'profile', params:{ id: user.id}}">Go to profile&nbsp;<i class="fas fa-arrow-circle-right"></i></router-link></h1>
1718
<p
1819
v-for="(p,index) in $t('user.userPanel.profile.avatar')"
1920
class="is-size-7 has-text-centered-touch is-italic"
@@ -224,7 +225,7 @@ export default {
224225
this.$http
225226
.get(`/v1/users/${this.user.id}`)
226227
.then(res => {
227-
this.sync(res.data)
228+
this.sync(res.data.data)
228229
})
229230
.catch(err => {
230231
console.error(err);

0 commit comments

Comments
 (0)