mirror of https://github.com/nocodb/nocodb
78 lines
2.2 KiB
78 lines
2.2 KiB
3 years ago
|
<template>
|
||
3 years ago
|
<v-menu bottom offset-y>
|
||
2 years ago
|
<template #activator="{ on }">
|
||
3 years ago
|
<transition name="release">
|
||
2 years ago
|
<v-btn v-show="releaseAlert" text small class="mb-0 mr-2 py-0" v-on="on">
|
||
3 years ago
|
<!--Upgrade available-->
|
||
|
{{ $t('activity.upgrade.available') }}
|
||
2 years ago
|
<v-icon small> mdi-menu-down </v-icon>
|
||
3 years ago
|
</v-btn>
|
||
|
</transition>
|
||
|
</template>
|
||
|
<v-list dense>
|
||
|
<v-list-item dense href="https://github.com/nocodb/nocodb/releases" target="_blank">
|
||
2 years ago
|
<v-icon small class="mr-2"> mdi-script-text-outline </v-icon>
|
||
3 years ago
|
<span class="caption">{{ releaseVersion }} {{ $t('activity.upgrade.releaseNote') }}</span>
|
||
3 years ago
|
</v-list-item>
|
||
|
<v-list-item dense href="https://docs.nocodb.com/getting-started/upgrading" target="_blank">
|
||
2 years ago
|
<v-icon small class="mr-2"> mdi-rocket-launch-outline </v-icon>
|
||
3 years ago
|
<!--How to upgrade?-->
|
||
|
<span class="caption">{{ $t('activity.upgrade.howTo') }}</span>
|
||
3 years ago
|
</v-list-item>
|
||
|
<v-list-item @click="releaseAlert = false">
|
||
2 years ago
|
<v-icon small class="mr-2"> mdi-close </v-icon>
|
||
3 years ago
|
|
||
3 years ago
|
<span class="caption">
|
||
|
<!--Hide menu-->
|
||
|
{{ $t('general.hideMenu') }}
|
||
|
</span>
|
||
3 years ago
|
</v-list-item>
|
||
|
</v-list>
|
||
|
</v-menu>
|
||
3 years ago
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'ReleaseInfo',
|
||
|
data: () => ({
|
||
2 years ago
|
loading: true,
|
||
3 years ago
|
}),
|
||
|
computed: {
|
||
|
releaseAlert: {
|
||
|
get() {
|
||
2 years ago
|
return (
|
||
|
!this.loading &&
|
||
2 years ago
|
this.$store.state.app.currentVersion &&
|
||
3 years ago
|
this.$store.state.app.latestRelease &&
|
||
2 years ago
|
this.$store.state.app.currentVersion !== this.$store.state.app.latestRelease &&
|
||
3 years ago
|
this.$store.state.app.latestRelease !== this.$store.state.app.hiddenRelease
|
||
2 years ago
|
);
|
||
3 years ago
|
},
|
||
|
set(val) {
|
||
2 years ago
|
return this.$store.commit('app/MutHiddenRelease', val ? null : this.$store.state.app.latestRelease);
|
||
|
},
|
||
3 years ago
|
},
|
||
|
releaseVersion() {
|
||
2 years ago
|
return this.$store.state.app.latestRelease;
|
||
2 years ago
|
},
|
||
3 years ago
|
},
|
||
|
mounted() {
|
||
|
setTimeout(() => {
|
||
2 years ago
|
this.loading = false;
|
||
|
}, 1000);
|
||
|
},
|
||
|
};
|
||
3 years ago
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
2 years ago
|
.release-enter-active,
|
||
|
.release-leave-active {
|
||
|
transition: opacity 0.5s;
|
||
3 years ago
|
}
|
||
|
|
||
2 years ago
|
.release-enter,
|
||
|
.release-leave-to {
|
||
3 years ago
|
opacity: 0;
|
||
|
}
|
||
|
</style>
|