Browse Source

fix(nc-gui): resolve components

pull/3801/head
braks 2 years ago
parent
commit
4f1bdcf6d1
  1. 9
      packages/nc-gui/components/dashboard/TreeView.vue
  2. 18
      packages/nc-gui/components/dashboard/settings/Modal.vue

9
packages/nc-gui/components/dashboard/TreeView.vue

@ -8,6 +8,7 @@ import {
inject, inject,
reactive, reactive,
ref, ref,
resolveComponent,
useDialog, useDialog,
useNuxtApp, useNuxtApp,
useProject, useProject,
@ -144,7 +145,7 @@ function openRenameTableDialog(table: TableType, rightClick = false) {
const isOpen = ref(true) const isOpen = ref(true)
const { close } = useDialog(() => import('~/components/dlg/TableRename.vue'), { const { close } = useDialog(resolveComponent('DlgTableRename'), {
'modelValue': isOpen, 'modelValue': isOpen,
'tableMeta': table, 'tableMeta': table,
'onUpdate:modelValue': closeDialog, 'onUpdate:modelValue': closeDialog,
@ -162,7 +163,7 @@ function openQuickImportDialog(type: string) {
const isOpen = ref(true) const isOpen = ref(true)
const { close } = useDialog(() => import('~/components/dlg/QuickImport.vue'), { const { close } = useDialog(resolveComponent('DlgQuickImport'), {
'modelValue': isOpen, 'modelValue': isOpen,
'importType': type, 'importType': type,
'onUpdate:modelValue': closeDialog, 'onUpdate:modelValue': closeDialog,
@ -180,7 +181,7 @@ function openAirtableImportDialog() {
const isOpen = ref(true) const isOpen = ref(true)
const { close } = useDialog(() => import('~/components/dlg/AirtableImport.vue'), { const { close } = useDialog(resolveComponent('DlgAirtableImport'), {
'modelValue': isOpen, 'modelValue': isOpen,
'onUpdate:modelValue': closeDialog, 'onUpdate:modelValue': closeDialog,
}) })
@ -197,7 +198,7 @@ function openTableCreateDialog() {
const isOpen = ref(true) const isOpen = ref(true)
const { close } = useDialog(() => import('~/components/dlg/TableCreate.vue'), { const { close } = useDialog(resolveComponent('DlgTableCreate'), {
'modelValue': isOpen, 'modelValue': isOpen,
'onUpdate:modelValue': closeDialog, 'onUpdate:modelValue': closeDialog,
}) })

18
packages/nc-gui/components/dashboard/settings/Modal.vue

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { FunctionalComponent, SVGAttributes } from 'vue' import type { FunctionalComponent, SVGAttributes } from 'vue'
import { useI18n, useNuxtApp, useUIPermission, useVModel, watch } from '#imports' import { resolveComponent, useI18n, useNuxtApp, useUIPermission, useVModel, watch } from '#imports'
import StoreFrontOutline from '~icons/mdi/storefront-outline' import StoreFrontOutline from '~icons/mdi/storefront-outline'
import TeamFillIcon from '~icons/ri/team-fill' import TeamFillIcon from '~icons/ri/team-fill'
import MultipleTableIcon from '~icons/mdi/table-multiple' import MultipleTableIcon from '~icons/mdi/table-multiple'
@ -50,7 +50,7 @@ const tabsInfo: TabGroup = {
usersManagement: { usersManagement: {
// Users Management // Users Management
title: t('title.userMgmt'), title: t('title.userMgmt'),
body: () => import('../../tabs/auth/UserManagement.vue'), body: resolveComponent('TabsAuthUserManagement'),
}, },
} }
: {}), : {}),
@ -59,7 +59,7 @@ const tabsInfo: TabGroup = {
apiTokenManagement: { apiTokenManagement: {
// API Tokens Management // API Tokens Management
title: t('title.apiTokenMgmt'), title: t('title.apiTokenMgmt'),
body: () => import('../../tabs/auth/ApiTokenManagement.vue'), body: resolveComponent('TabsAuthApiTokenManagement'),
}, },
} }
: {}), : {}),
@ -77,7 +77,7 @@ const tabsInfo: TabGroup = {
subTabs: { subTabs: {
new: { new: {
title: 'Apps', title: 'Apps',
body: () => import('./AppStore.vue'), body: resolveComponent('DashboardSettingsAppStore'),
}, },
}, },
onClick: () => { onClick: () => {
@ -94,26 +94,26 @@ const tabsInfo: TabGroup = {
metaData: { metaData: {
// Metadata // Metadata
title: t('title.metadata'), title: t('title.metadata'),
body: () => import('./Metadata.vue'), body: resolveComponent('DashboardSettingsMetadata'),
}, },
acl: { acl: {
// UI Access Control // UI Access Control
title: t('title.uiACL'), title: t('title.uiACL'),
body: () => import('./UIAcl.vue'), body: resolveComponent('DashboardSettingsUIAcl'),
onClick: () => { onClick: () => {
$e('c:table:ui-acl') $e('c:table:ui-acl')
}, },
}, },
erd: { erd: {
title: t('title.erdView'), title: t('title.erdView'),
body: () => import('./Erd.vue'), body: resolveComponent('DashboardSettingsErd'),
onClick: () => { onClick: () => {
$e('c:settings:erd') $e('c:settings:erd')
}, },
}, },
misc: { misc: {
title: t('general.misc'), title: t('general.misc'),
body: () => import('./Misc.vue'), body: resolveComponent('DashboardSettingsMisc'),
}, },
}, },
onClick: () => { onClick: () => {
@ -128,7 +128,7 @@ const tabsInfo: TabGroup = {
audit: { audit: {
// Audit // Audit
title: t('title.audit'), title: t('title.audit'),
body: () => import('./AuditTab.vue'), body: resolveComponent('DashboardSettingsAuditTab'),
}, },
}, },
onClick: () => { onClick: () => {

Loading…
Cancel
Save