diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index eb2b699..f5609f4 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -327,24 +327,17 @@ - - - - {{$store.state.user.username}} - - - {{$t('navbar.user.profile')}} - {{$t('navbar.user.settings')}} - {{$t('navbar.user.transactions')}} - {{$t('navbar.user.avatar')}} - {{$t('navbar.user.creations')}} - {{$t('navbar.user.downloads')}} - {{$t('navbar.user.admin')}} - 1 {{$t('navbar.user.friends')}} - {{$t('navbar.user.logout')}} - - - + + {{$t('navbar.user.profile')}} + {{$t('navbar.user.settings')}} + {{$t('navbar.user.transactions')}} + {{$t('navbar.user.avatar')}} + {{$t('navbar.user.creations')}} + {{$t('navbar.user.downloads')}} + {{$t('navbar.user.admin')}} + 1 {{$t('navbar.user.friends')}} + {{$t('navbar.user.logout')}} + diff --git a/src/router/index.js b/src/router/index.js index 781b083..f91ba74 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -93,6 +93,17 @@ const routes = [ name: 'MarketplaceItem', component: route('MarketplaceItem') }, + { + path: '/friends', + redirect: '/friends/accepted', + name: 'Friends', + component: route('Friends') + }, + { + path: '/friends/:category', + name: 'Friends', + component: route('Friends') + }, { path: '/stats', name: 'Stats', diff --git a/src/views/Friends.vue b/src/views/Friends.vue new file mode 100644 index 0000000..6128abe --- /dev/null +++ b/src/views/Friends.vue @@ -0,0 +1,210 @@ + + + {{name}} + + + {{ $t('friends.pendingCanAccept') }} + {{ $t('friends.accepted') }} + {{ $t('friends.pending') }} + + + + + {{friend.friend2.username}} + + + Cancel Friend Request + Deny Friend Request + Accept Friend Request + Remove Friend + + + + + + \ No newline at end of file diff --git a/src/views/Marketplace.vue b/src/views/Marketplace.vue index f06f565..6ec1f8e 100644 --- a/src/views/Marketplace.vue +++ b/src/views/Marketplace.vue @@ -1,6 +1,6 @@ - + {{ $t('marketplace.filter') }} ({{category}}) @@ -29,6 +29,7 @@ Most popular + @@ -43,8 +44,8 @@ @loadNext='getItems(false)' > - {{item.name}} + {{item.name}} {{$t('user.inventoryTab.buyNow')}} {{item.price}} diff --git a/src/views/User.vue b/src/views/User.vue index 3f9adf7..94f5102 100644 --- a/src/views/User.vue +++ b/src/views/User.vue @@ -10,7 +10,7 @@ {{user.username}} - + {{$t('relationships.notFriends')}} @@ -78,8 +78,15 @@ export default { } }, watch: { - $route (to) { - this.selected = this.getIndexFromRoute(to.path) + '$route.params.username' () { + this.user = [{ + username: "Loading", + description: "Loading", + createdAt: "2020-01-01T00:00:00.000Z" + }] + this.relationship = false + this.relationships.type = '' + this.fetchData() } }, computed: { diff --git a/src/views/UserFriends.vue b/src/views/UserFriends.vue index 0f4f570..7b7f9ff 100644 --- a/src/views/UserFriends.vue +++ b/src/views/UserFriends.vue @@ -1,9 +1,16 @@ - - - This user doesn't have any friends yet, how about you send them a friend request? - Send {{$route.params.username}} a friend request + + + + This user doesn't have any friends yet, how about you send them a friend request? + + + + {{friend.friend2.username}} + + + @@ -22,7 +29,7 @@ export default { this.axios .get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + `/` + 'relationships/user/' + this.$route.params.username) .then(res => { - this.inventory = res.data.Inventories + this.friends = res.data }) .catch(e => { let invalidId = e.response.data.errors.find(error => {
{{$store.state.user.username}}
{{ $t('marketplace.filter') }} ({{category}}) @@ -29,6 +29,7 @@ Most popular