Browse Source

refactor(gui-v2): remove RightSidebarInj

pull/3174/head
Wing-Kam Wong 2 years ago
parent
commit
d124698324
  1. 16
      packages/nc-gui-v2/components/smartsheet/sidebar/index.vue
  2. 17
      packages/nc-gui-v2/components/tabs/Smartsheet.vue
  3. 1
      packages/nc-gui-v2/context/index.ts

16
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 MenuTop from './MenuTop.vue'
import MenuBottom from './MenuBottom.vue' import MenuBottom from './MenuBottom.vue'
import Toolbar from './toolbar/index.vue' import Toolbar from './toolbar/index.vue'
import { computed, inject, provide, ref, useElementHover, useRoute, useRouter, useViews, watch } from '#imports' import {
import { ActiveViewInj, MetaInj, RightSidebarInj, ViewListInj } from '~/context' ActiveViewInj,
MetaInj,
ViewListInj,
computed,
inject,
provide,
ref,
useElementHover,
useRoute,
useRouter,
useViews,
watch,
} from '#imports'
const meta = inject(MetaInj, ref()) const meta = inject(MetaInj, ref())

17
packages/nc-gui-v2/components/tabs/Smartsheet.vue

@ -2,8 +2,21 @@
import type { ColumnType, TableType } from 'nocodb-sdk' import type { ColumnType, TableType } from 'nocodb-sdk'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import SmartsheetGrid from '../smartsheet/Grid.vue' import SmartsheetGrid from '../smartsheet/Grid.vue'
import { computed, inject, provide, useMetas, useProvideSmartsheetStore, watch, watchEffect } from '#imports' import {
import { ActiveViewInj, FieldsInj, IsLockedInj, MetaInj, ReloadViewDataHookInj, RightSidebarInj, TabMetaInj } from '~/context' ActiveViewInj,
FieldsInj,
IsLockedInj,
MetaInj,
ReloadViewDataHookInj,
TabMetaInj,
computed,
inject,
provide,
useMetas,
useProvideSmartsheetStore,
watch,
watchEffect,
} from '#imports'
import type { TabItem } from '~/composables' import type { TabItem } from '~/composables'
const { getMeta, metas } = useMetas() const { getMeta, metas } = useMetas()

1
packages/nc-gui-v2/context/index.ts

@ -22,5 +22,4 @@ export const ReadonlyInj: InjectionKey<any> = Symbol('readonly-injection')
export const ReloadViewDataHookInj: InjectionKey<EventHook<void>> = Symbol('reload-view-data-injection') export const ReloadViewDataHookInj: InjectionKey<EventHook<void>> = Symbol('reload-view-data-injection')
export const FieldsInj: InjectionKey<Ref<any[]>> = Symbol('fields-injection') export const FieldsInj: InjectionKey<Ref<any[]>> = Symbol('fields-injection')
export const ViewListInj: InjectionKey<Ref<ViewType[]>> = Symbol('view-list-injection') export const ViewListInj: InjectionKey<Ref<ViewType[]>> = Symbol('view-list-injection')
export const RightSidebarInj: InjectionKey<Ref<boolean>> = Symbol('right-sidebar-injection')
export const EditModeInj: InjectionKey<Ref<boolean>> = Symbol('edit-mode-injection') export const EditModeInj: InjectionKey<Ref<boolean>> = Symbol('edit-mode-injection')

Loading…
Cancel
Save