Skip to content

Commit

Permalink
Add empty state for download buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbaunwall committed Apr 20, 2020
1 parent 7d0eed0 commit 0ae4b0d
Showing 1 changed file with 33 additions and 22 deletions.
55 changes: 33 additions & 22 deletions client-app/src/components/DownloadButtons.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
<template>
<div class="buttons is-centered" v-if="latest != null">
<a :href="latest.windows.path" class="button is-primary is-medium">
<span class="icon">
<i class="fab fa-windows" />
</span>
<span>Windows <span class="is-size-7">(v{{latest.version}})</span></span>
</a>
<a :href="latest.macOS.path" class="button is-primary is-medium">
<span class="icon">
<i class="fab fa-apple" />
</span>
<span>MacOS <span class="is-size-7">(v{{latest.version}})</span></span>
</a>
<div>
<div class="buttons is-centered" v-if="latest != null">
<a :href="latest.windows.path" class="button is-primary is-medium">
<span class="icon">
<i class="fab fa-windows" />
</span>
<span>
Windows
<span class="is-size-7">(v{{latest.version}})</span>
</span>
</a>
<a :href="latest.macOS.path" class="button is-primary is-medium">
<span class="icon">
<i class="fab fa-apple" />
</span>
<span>
MacOS
<span class="is-size-7">(v{{latest.version}})</span>
</span>
</a>
</div>
<div v-else class="notification is-white-bis">
Fetching the latest downloads from <strong><a href="https://github.com/larsbaunwall/plodo/releases">Github</a></strong>...
</div>
</div>
</template>

<script>
import ApiService from "@/common/ApiService";
export default {
data() {
return {
latest: null
}
},
async mounted() {
const version = await ApiService.getLatestAppVersion();
this.latest = version;
}
data() {
return {
latest: null
};
},
async created() {
const version = await ApiService.getLatestAppVersion();
this.latest = version;
}
};
</script>

Expand Down

0 comments on commit 0ae4b0d

Please sign in to comment.