diff --git a/packages/nc-gui-v2/assets/style-v2.scss b/packages/nc-gui-v2/assets/style-v2.scss index 3bf9cc04bb..786e47c17b 100644 --- a/packages/nc-gui-v2/assets/style-v2.scss +++ b/packages/nc-gui-v2/assets/style-v2.scss @@ -3,6 +3,7 @@ :root { --header-height: 50px; + --toolbar-height: 48px; } .ant-layout-header { @@ -51,7 +52,7 @@ h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { .nc-menu-item { @apply cursor-pointer text-xs flex items-center gap-2 px-4 py-3 relative after:(content-[''] absolute top-0 left-0 bottom-0 w-full h-full right-0 bg-current opacity-0 transition transition-opactity duration-100) hover:(after:(opacity-5)); - &.disabled { + &.disabled { @apply text-black text-opacity-25 bg-[#f5f5f5] cursor-not-allowed text-shadow-none box-shadow-none border-[#d9d9d9]; } } @@ -85,7 +86,7 @@ h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { svg { @apply z-1 text-xl p-1 text-gray-500; } - + .disabled { @apply cursor-not-allowed border-none; } @@ -175,6 +176,7 @@ h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { } .slide-enter, + .slide-leave-active { transform: translate(-100%, 0); } @@ -209,4 +211,30 @@ h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { &:active::after { @apply ring ring-pink-500; } -} \ No newline at end of file +} + +.ant-tabs-dropdown-menu-title-content{ + @apply flex items-center; +} + + + +.ant-dropdown-menu-item-group-list { + @apply !mx-0; +} + +.ant-dropdown-menu-item-group-title { + @apply border-b-1; +} + +.ant-dropdown-menu-item-group-list { + @apply m-0; +} + +.ant-dropdown-menu-item { + @apply !py-0 active:(ring ring-pink-500); +} + +.ant-dropdown-menu-title-conten{ + @apply !py-0; +} diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index c738bd809c..81c6f68b43 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -87,6 +87,7 @@ declare module '@vue/runtime-core' { MaterialSymbolsSendOutline: typeof import('~icons/material-symbols/send-outline')['default'] MaterialSymbolsTranslate: typeof import('~icons/material-symbols/translate')['default'] MaterialSymbolsWarning: typeof import('~icons/material-symbols/warning')['default'] + MdiAccount: typeof import('~icons/mdi/account')['default'] MdiAccountCircle: typeof import('~icons/mdi/account-circle')['default'] MdiAccountGroup: typeof import('~icons/mdi/account-group')['default'] MdiAccountOutline: typeof import('~icons/mdi/account-outline')['default'] @@ -97,6 +98,7 @@ declare module '@vue/runtime-core' { MdiArrowExpand: typeof import('~icons/mdi/arrow-expand')['default'] MdiArrowLeftBold: typeof import('~icons/mdi/arrow-left-bold')['default'] MdiAt: typeof import('~icons/mdi/at')['default'] + MdiBackburger: typeof import('~icons/mdi/backburger')['default'] MdiBugOutline: typeof import('~icons/mdi/bug-outline')['default'] MdiCalculator: typeof import('~icons/mdi/calculator')['default'] MdiCalendarMonth: typeof import('~icons/mdi/calendar-month')['default'] @@ -104,6 +106,7 @@ declare module '@vue/runtime-core' { MdiCellphoneMessage: typeof import('~icons/mdi/cellphone-message')['default'] MdiChat: typeof import('~icons/mdi/chat')['default'] MdiCheck: typeof import('~icons/mdi/check')['default'] + MdiChevronDoubleLeft: typeof import('~icons/mdi/chevron-double-left')['default'] MdiChevronDown: typeof import('~icons/mdi/chevron-down')['default'] MdiClose: typeof import('~icons/mdi/close')['default'] MdiCloseBox: typeof import('~icons/mdi/close-box')['default'] @@ -158,6 +161,7 @@ declare module '@vue/runtime-core' { MdiLogin: typeof import('~icons/mdi/login')['default'] MdiLogout: typeof import('~icons/mdi/logout')['default'] MdiMagnify: typeof import('~icons/mdi/magnify')['default'] + MdiMenu: typeof import('~icons/mdi/menu')['default'] MdiMenuDown: typeof import('~icons/mdi/menu-down')['default'] MdiMicrosoftTeams: typeof import('~icons/mdi/microsoft-teams')['default'] MdiMinusCircleOutline: typeof import('~icons/mdi/minus-circle-outline')['default'] diff --git a/packages/nc-gui-v2/components/dashboard/TreeView.vue b/packages/nc-gui-v2/components/dashboard/TreeView.vue index ac8da614f8..59db893d27 100644 --- a/packages/nc-gui-v2/components/dashboard/TreeView.vue +++ b/packages/nc-gui-v2/components/dashboard/TreeView.vue @@ -4,12 +4,14 @@ import Sortable from 'sortablejs' import { Empty } from 'ant-design-vue' import { useNuxtApp } from '#app' import { computed, useProject, useTable, useTabs, useUIPermission, watchEffect } from '#imports' +import DlgAirtableImport from '~/components/dlg/AirtableImport.vue' +import DlgQuickImport from '~/components/dlg/QuickImport.vue' +import DlgTableCreate from '~/components/dlg/TableCreate.vue' import { TabType } from '~/composables' import MdiView from '~icons/mdi/eye-circle-outline' import MdiTableLarge from '~icons/mdi/table-large' import MdiMenuIcon from '~icons/mdi/dots-vertical' import MdiDrag from '~icons/mdi/drag-vertical' -import GithubStarButton from '~/components/dashboard/GithubStarButton.vue' const { addTab } = useTabs() @@ -32,8 +34,6 @@ const tablesById = $computed>(() => }, {}), ) -const tableCreateDlg = ref(false) - let key = $ref(0) const menuRef = $ref() @@ -135,21 +135,62 @@ const addTableTab = (table: TableType) => { const activeTable = computed(() => { return [TabType.TABLE, TabType.VIEW].includes(activeTab.value?.type) ? activeTab.value.title : null }) + +function openQuickImportDialog(type: string) { + $e(`a:actions:import-${type}`) + + const isOpen = ref(true) + + const { close } = useDialog(DlgQuickImport, { + 'modelValue': isOpen, + 'importType': type, + 'onUpdate:modelValue': closeDialog, + }) + + function closeDialog() { + isOpen.value = false + + close(1000) + } +} + +function openAirtableImportDialog() { + $e('a:actions:import-airtable') + + const isOpen = ref(true) + + const { close } = useDialog(DlgAirtableImport, { + 'modelValue': isOpen, + 'onUpdate:modelValue': closeDialog, + }) + + function closeDialog() { + isOpen.value = false + + close(1000) + } +} + +function openTableCreateDialog() { + $e('a:actions:create-table') + + const isOpen = ref(true) + + const { close } = useDialog(DlgTableCreate, { + 'modelValue': isOpen, + 'onUpdate:modelValue': closeDialog, + }) + + function closeDialog() { + isOpen.value = false + + close(1000) + } +} - + + +
+ -
- +
-
diff --git a/packages/nc-gui-v2/components/general/Language.vue b/packages/nc-gui-v2/components/general/Language.vue deleted file mode 100644 index de34d8b8a2..0000000000 --- a/packages/nc-gui-v2/components/general/Language.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - diff --git a/packages/nc-gui-v2/components/general/ShareBaseButton.vue b/packages/nc-gui-v2/components/general/ShareBaseButton.vue index b33d45f67c..1cb5531f04 100644 --- a/packages/nc-gui-v2/components/general/ShareBaseButton.vue +++ b/packages/nc-gui-v2/components/general/ShareBaseButton.vue @@ -9,7 +9,7 @@ const { isUIAllowed } = useUIPermission()