From 7eff54beba365f016f624d04bf51e60bab5973ea Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 22 Aug 2022 09:17:14 +0200 Subject: [PATCH] refactor(gui-v2): remove unnecessary github button component and add shims --- .../components/dashboard/GithubStarButton.vue | 9 -------- .../components/dashboard/TreeView.vue | 21 ++++++++++++++----- packages/nc-gui-v2/github-star.shims.d.ts | 4 ++++ .../pages/[projectType]/[projectId]/index.vue | 3 +++ 4 files changed, 23 insertions(+), 14 deletions(-) delete mode 100644 packages/nc-gui-v2/components/dashboard/GithubStarButton.vue create mode 100644 packages/nc-gui-v2/github-star.shims.d.ts diff --git a/packages/nc-gui-v2/components/dashboard/GithubStarButton.vue b/packages/nc-gui-v2/components/dashboard/GithubStarButton.vue deleted file mode 100644 index e0ec0a793e..0000000000 --- a/packages/nc-gui-v2/components/dashboard/GithubStarButton.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/packages/nc-gui-v2/components/dashboard/TreeView.vue b/packages/nc-gui-v2/components/dashboard/TreeView.vue index 74e081dedb..15bf46ee56 100644 --- a/packages/nc-gui-v2/components/dashboard/TreeView.vue +++ b/packages/nc-gui-v2/components/dashboard/TreeView.vue @@ -2,6 +2,7 @@ import type { TableType } from 'nocodb-sdk' import Sortable from 'sortablejs' import { Empty } from 'ant-design-vue' +import GithubButton from 'vue-github-button' import { computed, inject, @@ -402,11 +403,21 @@ function openTableCreateDialog() {
- - - - - + + + + + + Star +
diff --git a/packages/nc-gui-v2/github-star.shims.d.ts b/packages/nc-gui-v2/github-star.shims.d.ts new file mode 100644 index 0000000000..59a48423e8 --- /dev/null +++ b/packages/nc-gui-v2/github-star.shims.d.ts @@ -0,0 +1,4 @@ +declare module 'vue-github-button' { + import type { Component } from '@vue/runtime-core' + export default Component +} diff --git a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue index e35045e597..568424b925 100644 --- a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue +++ b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue @@ -403,9 +403,12 @@ const onMenuClose = (visible: boolean) => { +
+ +