0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-25 04:35:17 +00:00
VueTube/NUXT/components/updateChecker.vue
Kenny 84a7ffbc08 fix: 🐛 Fix 4688681
woohoo time for depression programming my favorite :)

4688681900
2022-08-22 13:35:31 -04:00

44 lines
967 B
Vue

<template>
<div>
<v-snackbar v-model="updateSnackbar" class="updateBar" :timeout="updateSnackbarTimeout" rounded>
{{ updateSnackbarText }}
<template #action="{ attrs }">
<v-btn
color="primary"
text
v-bind="attrs"
to="/mods/updates?nowait=true"
>Update</v-btn
>
</template>
</v-snackbar>
</div>
</template>
<style scoped>
.updateBar {
z-index: 99999999;
}
</style>
<script>
export default {
data() {
return {
updateSnackbar: false,
updateSnackbarText: "An update is available",
updateSnackbarTimeout: 5000,
};
},
async mounted() {
const releases = await this.$vuetube.releases;
const appVersion = process.env.version;
const appChannel = process.env.channel;
if (appVersion !== releases[0].tag_name && appVersion !== "dev-local" && appChannel !== "Unstable") {
this.updateSnackbar = true;
}
},
};
</script>