Skip to content
Snippets Groups Projects
Commit 88e65917 authored by Endrizzi, Marco (UG - Comp Sci & Elec Eng)'s avatar Endrizzi, Marco (UG - Comp Sci & Elec Eng)
Browse files

You can now see pending friend requests

parent ffb76dcd
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
q-toolbar.bg-primary.text-white.shadow-2 q-toolbar.bg-primary.text-white.shadow-2
q-toolbar-title Contacts q-toolbar-title Contacts
q-list(bordered) q-list(bordered)
q-item.q-my-sm(v-for='(user, key) in users', :key='key', :to='"/chat/" + key', clickable) q-item.q-my-sm(v-for='(user, key) in friends', :key='key', :to='"/chat/" + key', clickable)
q-item-section(avatar) q-item-section(avatar)
q-avatar(color='primary', text-color='white') q-avatar(color='primary', text-color='white')
| {{ user.name.charAt(0) }} | {{ user.name.charAt(0) }}
...@@ -11,6 +11,16 @@ q-list(bordered) ...@@ -11,6 +11,16 @@ q-list(bordered)
q-item-label(caption, lines='1') @{{ user.username }} q-item-label(caption, lines='1') @{{ user.username }}
q-item-section(side) q-item-section(side)
q-icon(name='chat_bubble', :color='user.online ? "light-green-6" : "blue-grey-5"') q-icon(name='chat_bubble', :color='user.online ? "light-green-6" : "blue-grey-5"')
q-item.absolute-bottom.q-mb-xl(v-for='(user, key) in pending', :key='key')
.text-weight-light.text-subtitle1 {{ user }}
q-icon.q-pl-sm.cursor-pointer(
@click='acceptRequest()',
name='check_circle_outline',
color='green',
left,
size='1.5rem'
)
q-icon.cursor-pointer(@click='denyRequest()', name='highlight_off', color='red', size='1.5rem')
q-toolbar.absolute-bottom.bg-primary.text-white.shadow-2 q-toolbar.absolute-bottom.bg-primary.text-white.shadow-2
q-btn(icon='person_add', flat, dense, label='Add Friends') q-btn(icon='person_add', flat, dense, label='Add Friends')
q-popup-edit.full-width(v-model='usernameInput', :cover='false', v-slot='scope', @keyup.enter='showNotif()') q-popup-edit.full-width(v-model='usernameInput', :cover='false', v-slot='scope', @keyup.enter='showNotif()')
...@@ -43,11 +53,17 @@ export default { ...@@ -43,11 +53,17 @@ export default {
} }
] ]
}) })
},
acceptRequest() {
console.log('accepted')
},
denyRequest() {
console.log('denied')
} }
}, },
computed: { computed: {
...mapState('firebase', ['users']) ...mapState('firebase', ['friends', 'pending'])
} }
} }
</script> </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment