From 600d2a460bf3d73e3f2eca29a7a5711a90ca2b53 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 16 Aug 2022 11:50:39 +0800 Subject: [PATCH] feat(gui-v2): release info --- packages/nc-gui-v2/components.d.ts | 2 + .../components/general/ReleaseInfo.vue | 70 +++++++++++++++++++ .../nc-gui-v2/composables/useGlobal/state.ts | 3 + .../nc-gui-v2/composables/useGlobal/types.ts | 3 + packages/nc-gui-v2/layouts/base.vue | 2 + 5 files changed, 80 insertions(+) create mode 100644 packages/nc-gui-v2/components/general/ReleaseInfo.vue diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index d62231196b..153faa9b83 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -150,6 +150,8 @@ declare module '@vue/runtime-core' { MdiPlusOutline: typeof import('~icons/mdi/plus-outline')['default'] MdiRefresh: typeof import('~icons/mdi/refresh')['default'] MdiReload: typeof import('~icons/mdi/reload')['default'] + MdiRocketLaunchOutline: typeof import('~icons/mdi/rocket-launch-outline')['default'] + MdiScriptTextOutline: typeof import('~icons/mdi/script-text-outline')['default'] MdiSearch: typeof import('~icons/mdi/search')['default'] MdiSlack: typeof import('~icons/mdi/slack')['default'] MdiStar: typeof import('~icons/mdi/star')['default'] diff --git a/packages/nc-gui-v2/components/general/ReleaseInfo.vue b/packages/nc-gui-v2/components/general/ReleaseInfo.vue new file mode 100644 index 0000000000..381d46acf4 --- /dev/null +++ b/packages/nc-gui-v2/components/general/ReleaseInfo.vue @@ -0,0 +1,70 @@ + + + diff --git a/packages/nc-gui-v2/composables/useGlobal/state.ts b/packages/nc-gui-v2/composables/useGlobal/state.ts index 35d28ac028..c0f7a799d4 100644 --- a/packages/nc-gui-v2/composables/useGlobal/state.ts +++ b/packages/nc-gui-v2/composables/useGlobal/state.ts @@ -59,6 +59,9 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State { filterAutoSave: true, previewAs: null, includeM2M: false, + currentVersion: null, + latestRelease: null, + hiddenRelease: null, } /** saves a reactive state, any change to these values will write/delete to localStorage */ diff --git a/packages/nc-gui-v2/composables/useGlobal/types.ts b/packages/nc-gui-v2/composables/useGlobal/types.ts index 481c94625c..e598332022 100644 --- a/packages/nc-gui-v2/composables/useGlobal/types.ts +++ b/packages/nc-gui-v2/composables/useGlobal/types.ts @@ -36,6 +36,9 @@ export interface StoredState { filterAutoSave: boolean previewAs: string | null includeM2M: boolean + currentVersion: string | null + latestRelease: string | null + hiddenRelease: string | null } export type State = ToRefs> & { diff --git a/packages/nc-gui-v2/layouts/base.vue b/packages/nc-gui-v2/layouts/base.vue index 298336b28c..1ce866ad42 100644 --- a/packages/nc-gui-v2/layouts/base.vue +++ b/packages/nc-gui-v2/layouts/base.vue @@ -43,6 +43,8 @@ const logout = () => {
+ +