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

Added accept and deny button functionality

parent d302ef8c
No related branches found
No related tags found
No related merge requests found
......@@ -11,16 +11,16 @@ q-list(bordered)
q-item-label(caption, lines='1') @{{ user.username }}
q-item-section(side)
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')
q-item.absolute-bottom.q-mb-xl(v-if='pending', v-for='(user, key) in pending', :key='key')
.text-weight-light.text-subtitle1 {{ user }}
q-icon.q-pl-sm.cursor-pointer(
@click='acceptRequest()',
@click='acceptRequest(key)',
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-icon.cursor-pointer(@click='denyRequest(key)', name='highlight_off', color='red', size='1.5rem')
q-toolbar.absolute-bottom.bg-primary.text-white.shadow-2
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()')
......@@ -30,7 +30,7 @@ q-toolbar.absolute-bottom.bg-primary.text-white.shadow-2
</template>
<script>
import { mapState } from 'vuex'
import { mapState, mapActions } from 'vuex'
export default {
data() {
......@@ -54,12 +54,13 @@ export default {
]
})
},
acceptRequest() {
console.log('accepted')
acceptRequest(otherUserId) {
this.firebaseAcceptRequest(otherUserId)
},
denyRequest() {
console.log('denied')
}
denyRequest(otherUserId) {
this.firebaseRemovePending(otherUserId)
},
...mapActions('firebase', ['firebaseRemovePending', 'firebaseAcceptRequest'])
},
computed: {
......
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