|
|
@@ -1,13 +1,20 @@
|
|
1
|
1
|
<template lang="pug">
|
|
2
|
2
|
main.view--matches
|
|
|
3
|
+ .select--matches
|
|
|
4
|
+ .matches--pending(:class="currentTab =='pending' ? 'active':'idle'" @click="switchTab('pending')") Pending
|
|
|
5
|
+ .matches--paired(:class="currentTab =='paired' ? 'active':'idle'" @click="switchTab('paired')") Paired
|
|
3
|
6
|
|
|
4
|
7
|
article.pa12
|
|
5
|
|
- template(v-if='matches.length && !loading')
|
|
6
|
|
- h2 atches
|
|
7
|
|
- ProfileCardList(:pid='pid' :profiles='matches' @reload='getCards')
|
|
|
8
|
+ template(v-if="currentTab=='pending'")
|
|
|
9
|
+ p Pending Matches
|
|
|
10
|
+ template(v-else)
|
|
|
11
|
+ p Paired Matches
|
|
|
12
|
+ //- template(v-if='matches.length && !loading')
|
|
|
13
|
+ //- h2 atches
|
|
|
14
|
+ //- ProfileCardList(:pid='pid' :profiles='matches' @reload='getCards')
|
|
8
|
15
|
|
|
9
|
|
- p(v-else-if='matches.length === 0') No matches.
|
|
10
|
|
- w-spinner(v-else bounce)
|
|
|
16
|
+ //- p(v-else-if='matches.length === 0') No matches.
|
|
|
17
|
+ //- w-spinner(v-else bounce)
|
|
11
|
18
|
|
|
12
|
19
|
MainNav
|
|
13
|
20
|
</template>
|
|
|
@@ -22,6 +29,9 @@ export default {
|
|
22
|
29
|
name: 'MatchView',
|
|
23
|
30
|
components: { ProfileCardList },
|
|
24
|
31
|
mixins: [mixins.pidMixin, mixins.cardMixin],
|
|
|
32
|
+ data: () => ({
|
|
|
33
|
+ currentTab: 'pending'
|
|
|
34
|
+ }),
|
|
25
|
35
|
methods: {
|
|
26
|
36
|
/** Gets called from cardMixin */
|
|
27
|
37
|
async getCards() {
|
|
|
@@ -33,6 +43,31 @@ export default {
|
|
33
|
43
|
}
|
|
34
|
44
|
this.loading = false
|
|
35
|
45
|
},
|
|
|
46
|
+ switchTab(tab){
|
|
|
47
|
+ if(this.currentTab === tab) return
|
|
|
48
|
+ this.currentTab = tab
|
|
|
49
|
+ }
|
|
36
|
50
|
},
|
|
37
|
51
|
}
|
|
38
|
52
|
</script>
|
|
|
53
|
+<style>
|
|
|
54
|
+.select--matches{
|
|
|
55
|
+ display: flex;
|
|
|
56
|
+ justify-content: space-between;
|
|
|
57
|
+ margin: 0 25px;
|
|
|
58
|
+}
|
|
|
59
|
+.select--matches > div{
|
|
|
60
|
+ width: 100%;
|
|
|
61
|
+ text-align: center;
|
|
|
62
|
+ font-size: 16px;
|
|
|
63
|
+ line-height: 40px;
|
|
|
64
|
+}
|
|
|
65
|
+.active{
|
|
|
66
|
+ border-bottom: 3px solid #F2CD5C;
|
|
|
67
|
+ color: #F2CD5C;
|
|
|
68
|
+}
|
|
|
69
|
+.idle{
|
|
|
70
|
+ color: #BCC5D3;
|
|
|
71
|
+}
|
|
|
72
|
+
|
|
|
73
|
+</style>
|