Browse Source

chore: show announcement

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1700/head
Wing-Kam Wong 3 years ago
parent
commit
419774e6d2
  1. 21
      packages/nc-gui/components/importantAnnouncement.vue
  2. 5
      packages/nc-gui/layouts/default.vue
  3. 8
      packages/nc-gui/store/app.js

21
packages/nc-gui/components/importantAnnouncement.vue

@ -3,7 +3,7 @@
<template #activator="{on}">
<transition name="announcement">
<v-btn
v-if="!loading"
v-show="announcementAlert"
text
small
class="mb-0 mr-2 py-0 "
@ -29,14 +29,21 @@
mdi-script-text-outline
</v-icon>
<span class="caption">
API Changes in v0.90.0
v0.90.0 API Changes
</span>
</v-list-item>
<v-list-item dense href="https://github.com/nocodb/nocodb/releases/tag/0.90.0" target="_blank">
<v-icon small class="mr-2">
mdi-script-text-outline
</v-icon>
<span class="caption">
v0.90.0 Release Note
</span>
</v-list-item>
<v-list-item @click="announcementAlert = false">
<v-icon small class="mr-2">
mdi-close
</v-icon>
<span class="caption">
<!--Hide menu-->
{{ $t('general.hideMenu') }}
@ -53,6 +60,14 @@ export default {
loading: true
}),
computed: {
announcementAlert: {
get() {
return !this.loading && !this.$store.state.app.hiddenAnnouncement
},
set(val) {
return this.$store.commit('app/MutHiddenAnnouncement', val ? null : true)
}
},
},
mounted() {
setTimeout(() => {

5
packages/nc-gui/layouts/default.vue

@ -52,6 +52,7 @@
<div style="flex: 1" class="d-flex justify-end">
<v-toolbar-items class="hidden-sm-and-down nc-topright-menu">
<important-announcement />
<release-info />
<language class="mr-3" />
@ -282,6 +283,7 @@ import Language from '~/components/utils/language'
import Loader from '~/components/loader'
import PreviewAs from '~/components/previewAs'
import ShareOrInviteModal from '~/components/auth/shareOrInviteModal'
import ImportantAnnouncement from '../components/importantAnnouncement.vue'
export default {
components: {
@ -293,7 +295,8 @@ export default {
XBtn,
Snackbar,
dlgUnexpectedError,
settings
settings,
ImportantAnnouncement
},
data: () => ({
clickCount: true,

8
packages/nc-gui/store/app.js

@ -1,7 +1,8 @@
export const state = () => ({
releaseVersion: null,
hiddenRelease: null,
latestRelease: null
latestRelease: null,
hiddenAnnouncement: null,
})
export const mutations = {
@ -13,7 +14,10 @@ export const mutations = {
},
MutLatestRelease(state, latestRelease) {
state.latestRelease = latestRelease
}
},
MutHiddenAnnouncement(state, hiddenAnnouncement) {
state.hiddenAnnouncement = hiddenAnnouncement
},
}
/**

Loading…
Cancel
Save