49
49
</v-card >
50
50
</v-dialog >
51
51
52
+ <v-dialog
53
+ v-model =" downloadDialog"
54
+ persistent
55
+ width =" 400px" >
56
+ <v-card
57
+ color =" primary"
58
+ dark >
59
+ <v-card-text class =" title font-weight-light pa-3" >Your download is ready!</v-card-text >
60
+ <v-divider ></v-divider >
61
+ <v-card-text class =" subheading font-weight-bold" >Download your package <a class =" blue--text lighten-1" href =" https://www.google.com/" target =" _blank" >here</a >.</v-card-text >
62
+
63
+ <v-card-actions >
64
+ <v-spacer ></v-spacer >
65
+ <v-btn
66
+ color =" blue"
67
+ @click =" downloadDialog = false" >
68
+ OK
69
+ </v-btn >
70
+ </v-card-actions >
71
+ </v-card >
72
+ </v-dialog >
73
+
52
74
<v-dialog
53
75
v-model =" receiptDialog"
54
76
width =" 500px" >
76
98
</v-card-actions >
77
99
</v-list >
78
100
<v-card v-else >
79
- <v-card-title class =" headline" primary-title >Alert </v-card-title >
80
- <v-card-text >You need to select some hacks first!</v-card-text >
101
+ <v-card-title class =" headline" primary-title >Heads up! </v-card-title >
102
+ <v-card-text class = " title font-weight-light " >You need to select some hacks first!</v-card-text >
81
103
82
104
<v-divider ></v-divider >
83
105
106
128
:key =" category.id"
107
129
:value =" category.id" >
108
130
<span class =" font-weight-light" >{{ category.name }}</span >
109
- <history-icon >history</history-icon >
131
+ <v-badge color =" indigo" >
132
+ <template v-slot :badge >
133
+ <span >{{ hacks.filter(hack => hack.category == category.id && hack.enabled).length }}</span >
134
+ </template >
135
+ <history-icon >history</history-icon >
136
+ </v-badge >
110
137
</v-btn >
111
138
112
139
</v-bottom-nav >
@@ -147,11 +174,11 @@ export default {
147
174
hacks: [],
148
175
loadingDialog: false ,
149
176
receiptDialog: false ,
177
+ downloadDialog: false ,
150
178
}),
151
179
methods: {
152
180
showReceipt : function (event ) {
153
- // if (this.selectedHacks.length > 0)
154
- this .receiptDialog = true ;
181
+ this .receiptDialog = true ;
155
182
},
156
183
sendTicket : function (event ) {
157
184
this .loadingDialog = true ;
@@ -160,9 +187,9 @@ export default {
160
187
HTTP
161
188
.post (' request-package' , this .selectedHacks )
162
189
.then (res => {
163
- console .log (res .data );
164
190
setTimeout (() => {
165
191
this .loadingDialog = false ;
192
+ this .downloadDialog = true ;
166
193
}, 4000 );
167
194
});
168
195
},
0 commit comments