Skip to content

Commit d37dfaf

Browse files
committed
added DL buttons for OSes
1 parent a059a8d commit d37dfaf

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

hackcafe-vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"stylus-loader": "^3.0.1",
2626
"vue-cli-plugin-vuetify": "^0.5.0",
2727
"vue-template-compiler": "^2.6.10",
28-
"vuetify-loader": "^1.0.5"
28+
"vuetify-loader": "^1.2.2"
2929
},
3030
"eslintConfig": {
3131
"root": true,

hackcafe-vue/src/components/MainPage.vue

+15-6
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,22 @@
5151

5252
<v-dialog
5353
v-model="downloadDialog"
54-
persistent
5554
width="400px">
5655
<v-card
5756
color="primary"
5857
dark>
5958
<v-card-text class="title font-weight-light pa-3">Your download is ready!</v-card-text>
6059
<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>
60+
<v-card-text class="subheading font-weight-bold">Download the corresponding package given the target operating system below.</v-card-text>
6261

6362
<v-card-actions>
6463
<v-spacer></v-spacer>
6564
<v-btn
66-
color="blue"
67-
@click="downloadDialog = false">
68-
OK
65+
v-for="ospack in osinfo"
66+
:key="ospack.name"
67+
:color="ospack.color"
68+
@click="startDownload(ospack.name)">
69+
{{ ospack.name.toUpperCase() }}
6970
</v-btn>
7071
</v-card-actions>
7172
</v-card>
@@ -147,7 +148,7 @@ import HistoryIcon from 'vue-material-design-icons/History';
147148
import axios from 'axios';
148149
149150
const HTTP = axios.create({
150-
baseURL: `http://536be0e0.ngrok.io/`,
151+
baseURL: 'http://8e075c03.ngrok.io/',
151152
cors: true,
152153
})
153154
@@ -175,6 +176,11 @@ export default {
175176
loadingDialog: false,
176177
receiptDialog: false,
177178
downloadDialog: false,
179+
osinfo: [
180+
{ color: 'blue', name: 'windows' },
181+
{ color: 'red', name: 'mac' },
182+
{ color: 'green', name: 'linux' },
183+
]
178184
}),
179185
methods: {
180186
showReceipt: function(event) {
@@ -200,6 +206,9 @@ export default {
200206
}
201207
}
202208
this.$forceUpdate();
209+
},
210+
startDownload: function(osname) {
211+
window.open(`http://8e075c03.ngrok.io/download-${osname}`)
203212
}
204213
},
205214
computed: {

hackcafe-vue/src/plugins/vuetify.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Vue from 'vue'
2+
23
import Vuetify from 'vuetify/lib'
34
import 'vuetify/src/stylus/app.styl'
45

@@ -13,4 +14,4 @@ Vue.use(Vuetify, {
1314
"warning": "#FB8C00"
1415
},
1516
iconfont: 'md',
16-
})
17+
})

0 commit comments

Comments
 (0)