mirror of https://github.com/VueTubeApp/VueTube
start working on auto installer :)
This commit is contained in:
parent
f585b1eb4c
commit
3af3679e18
|
@ -19,7 +19,7 @@
|
|||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn @click="openExternal(item)"><v-icon class="btn-icon">mdi-github</v-icon>View</v-btn>
|
||||
<v-btn disabled><v-icon class="btn-icon">mdi-download</v-icon>Install</v-btn>
|
||||
<v-btn @click="install(item)"><v-icon class="btn-icon">mdi-download</v-icon>Install</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
</v-card>
|
||||
|
@ -72,6 +72,13 @@ export default {
|
|||
methods: {
|
||||
async openExternal(item) {
|
||||
await Browser.open({ url: item.html_url });
|
||||
},
|
||||
|
||||
install(item) {
|
||||
this.$vuetube.getRuns(item, (data) => {
|
||||
console.log(data)
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,25 @@ const module = {
|
|||
reject(err)
|
||||
});
|
||||
|
||||
}),
|
||||
|
||||
getRuns(item, callback) {
|
||||
|
||||
let url = `https://api.github.com/repos/Frontesque/VueTube/commits/${item.sha}/check-runs`;
|
||||
|
||||
Http.request({
|
||||
method: 'GET',
|
||||
url: url,
|
||||
params: { }
|
||||
})
|
||||
.then((res) => {
|
||||
callback(res.data)
|
||||
})
|
||||
.catch((err) => {
|
||||
callback(err)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue