2022-03-13 20:16:00 +00:00
|
|
|
<template>
|
2022-03-21 23:47:11 +00:00
|
|
|
<div>
|
2022-08-07 05:18:10 +00:00
|
|
|
<v-snackbar v-model="updateSnackbar" class="updateBar" :timeout="updateSnackbarTimeout" rounded>
|
2022-03-21 23:47:11 +00:00
|
|
|
{{ updateSnackbarText }}
|
2022-03-13 20:16:00 +00:00
|
|
|
|
2022-03-21 23:47:11 +00:00
|
|
|
<template #action="{ attrs }">
|
|
|
|
<v-btn
|
|
|
|
color="primary"
|
|
|
|
text
|
|
|
|
v-bind="attrs"
|
2022-08-07 05:18:10 +00:00
|
|
|
to="/mods/updates?nowait=true"
|
|
|
|
>Update</v-btn
|
2022-03-21 23:47:11 +00:00
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</v-snackbar>
|
|
|
|
</div>
|
2022-03-13 20:16:00 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.updateBar {
|
2022-03-21 23:47:11 +00:00
|
|
|
z-index: 99999999;
|
2022-03-13 20:16:00 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2022-03-21 23:47:11 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
updateSnackbar: false,
|
|
|
|
updateSnackbarText: "An update is available",
|
|
|
|
updateSnackbarTimeout: 5000,
|
|
|
|
};
|
|
|
|
},
|
2022-03-18 00:25:59 +00:00
|
|
|
|
2022-03-21 23:47:11 +00:00
|
|
|
async mounted() {
|
2022-06-22 16:19:51 +00:00
|
|
|
const releases = await this.$vuetube.releases;
|
2022-08-22 17:35:31 +00:00
|
|
|
const appVersion = process.env.version;
|
|
|
|
const appChannel = process.env.channel;
|
2022-06-22 20:54:47 +00:00
|
|
|
if (appVersion !== releases[0].tag_name && appVersion !== "dev-local" && appChannel !== "Unstable") {
|
2022-03-21 23:47:11 +00:00
|
|
|
this.updateSnackbar = true;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
2022-03-18 00:25:59 +00:00
|
|
|
</script>
|