From d124698324432f9ecc9bb01a1f1a86bc6ad3ed33 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 16 Aug 2022 16:16:49 +0800 Subject: [PATCH] refactor(gui-v2): remove RightSidebarInj --- .../components/smartsheet/sidebar/index.vue | 16 ++++++++++++++-- .../nc-gui-v2/components/tabs/Smartsheet.vue | 17 +++++++++++++++-- packages/nc-gui-v2/context/index.ts | 1 - 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/index.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/index.vue index f4d99b0e53..ea296878dd 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/index.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/index.vue @@ -3,8 +3,20 @@ import type { FormType, GalleryType, GridType, KanbanType, ViewTypes } from 'noc import MenuTop from './MenuTop.vue' import MenuBottom from './MenuBottom.vue' import Toolbar from './toolbar/index.vue' -import { computed, inject, provide, ref, useElementHover, useRoute, useRouter, useViews, watch } from '#imports' -import { ActiveViewInj, MetaInj, RightSidebarInj, ViewListInj } from '~/context' +import { + ActiveViewInj, + MetaInj, + ViewListInj, + computed, + inject, + provide, + ref, + useElementHover, + useRoute, + useRouter, + useViews, + watch, +} from '#imports' const meta = inject(MetaInj, ref()) diff --git a/packages/nc-gui-v2/components/tabs/Smartsheet.vue b/packages/nc-gui-v2/components/tabs/Smartsheet.vue index 5618e2b7ac..96a795333e 100644 --- a/packages/nc-gui-v2/components/tabs/Smartsheet.vue +++ b/packages/nc-gui-v2/components/tabs/Smartsheet.vue @@ -2,8 +2,21 @@ import type { ColumnType, TableType } from 'nocodb-sdk' import type { Ref } from 'vue' import SmartsheetGrid from '../smartsheet/Grid.vue' -import { computed, inject, provide, useMetas, useProvideSmartsheetStore, watch, watchEffect } from '#imports' -import { ActiveViewInj, FieldsInj, IsLockedInj, MetaInj, ReloadViewDataHookInj, RightSidebarInj, TabMetaInj } from '~/context' +import { + ActiveViewInj, + FieldsInj, + IsLockedInj, + MetaInj, + ReloadViewDataHookInj, + TabMetaInj, + computed, + inject, + provide, + useMetas, + useProvideSmartsheetStore, + watch, + watchEffect, +} from '#imports' import type { TabItem } from '~/composables' const { getMeta, metas } = useMetas() diff --git a/packages/nc-gui-v2/context/index.ts b/packages/nc-gui-v2/context/index.ts index d955c93802..50cd0e5b45 100644 --- a/packages/nc-gui-v2/context/index.ts +++ b/packages/nc-gui-v2/context/index.ts @@ -22,5 +22,4 @@ export const ReadonlyInj: InjectionKey = Symbol('readonly-injection') export const ReloadViewDataHookInj: InjectionKey> = Symbol('reload-view-data-injection') export const FieldsInj: InjectionKey> = Symbol('fields-injection') export const ViewListInj: InjectionKey> = Symbol('view-list-injection') -export const RightSidebarInj: InjectionKey> = Symbol('right-sidebar-injection') export const EditModeInj: InjectionKey> = Symbol('edit-mode-injection')