Show loading indicator on download buttons
This is so people can easily see if they can already click on them to download the specific archive
This commit is contained in:
parent
09955cc7fa
commit
caf3802e26
1 changed files with 7 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
||||||
dark
|
dark
|
||||||
color="ryu_orange"
|
color="ryu_orange"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
:loading="isLoading"
|
||||||
:href="`${downloadURL}-win_x64.zip`"
|
:href="`${downloadURL}-win_x64.zip`"
|
||||||
>
|
>
|
||||||
<v-icon>fab fa-windows</v-icon>
|
<v-icon>fab fa-windows</v-icon>
|
||||||
|
@ -42,6 +43,7 @@
|
||||||
dark
|
dark
|
||||||
color="ryu_orange"
|
color="ryu_orange"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
:loading="isLoading"
|
||||||
:href="`${downloadURL}-linux_x64.tar.gz`"
|
:href="`${downloadURL}-linux_x64.tar.gz`"
|
||||||
>
|
>
|
||||||
<v-icon>fab fa-linux</v-icon>
|
<v-icon>fab fa-linux</v-icon>
|
||||||
|
@ -54,6 +56,7 @@
|
||||||
dark
|
dark
|
||||||
color="ryu_orange"
|
color="ryu_orange"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
:loading="isLoading"
|
||||||
:href="`${downloadURL}-osx_x64.zip`"
|
:href="`${downloadURL}-osx_x64.zip`"
|
||||||
>
|
>
|
||||||
<v-icon>fab fa-apple</v-icon>
|
<v-icon>fab fa-apple</v-icon>
|
||||||
|
@ -81,12 +84,15 @@ export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
downloadURL: '',
|
downloadURL: '',
|
||||||
|
isLoading: true,
|
||||||
version: 'Loading ...'
|
version: 'Loading ...'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async fetchDownloadURL () {
|
async fetchDownloadURL () {
|
||||||
|
this.isLoading = true;
|
||||||
|
|
||||||
let _f = await fetch('https://ci.appveyor.com/api/projects/gdkchan/ryujinx/branch/master');
|
let _f = await fetch('https://ci.appveyor.com/api/projects/gdkchan/ryujinx/branch/master');
|
||||||
let json = await _f.json();
|
let json = await _f.json();
|
||||||
|
|
||||||
|
@ -97,6 +103,7 @@ export default {
|
||||||
json = await _a.json();
|
json = await _a.json();
|
||||||
|
|
||||||
this.downloadURL = `https://ci.appveyor.com/api/buildjobs/${jobId}/artifacts/ryujinx-${this.version}`;
|
this.downloadURL = `https://ci.appveyor.com/api/buildjobs/${jobId}/artifacts/ryujinx-${this.version}`;
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue