diff --git a/packages/nc-gui/assets/icons/FileIconImageBox.png b/packages/nc-gui/assets/icons/FileIconImageBox.png index c2ac3cb103..9815024ca0 100644 Binary files a/packages/nc-gui/assets/icons/FileIconImageBox.png and b/packages/nc-gui/assets/icons/FileIconImageBox.png differ diff --git a/packages/nc-gui/assets/nc-icons/belongsto.svg b/packages/nc-gui/assets/nc-icons/belongsto.svg new file mode 100644 index 0000000000..306bb782bd --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/belongsto.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/file.svg b/packages/nc-gui/assets/nc-icons/file.svg new file mode 100644 index 0000000000..931fe7264a --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/file.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/hasmany.svg b/packages/nc-gui/assets/nc-icons/hasmany.svg new file mode 100644 index 0000000000..0514bae918 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/hasmany.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/info.svg b/packages/nc-gui/assets/nc-icons/info.svg new file mode 100644 index 0000000000..4d7f8e313f --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/info.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/manytomany.svg b/packages/nc-gui/assets/nc-icons/manytomany.svg new file mode 100644 index 0000000000..9ccae85eec --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/manytomany.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/maximize.svg b/packages/nc-gui/assets/nc-icons/maximize.svg new file mode 100644 index 0000000000..5ebeb1d312 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/maximize.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/multi-file.svg b/packages/nc-gui/assets/nc-icons/multi-file.svg new file mode 100644 index 0000000000..b9540989e4 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/multi-file.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/onetoone.svg b/packages/nc-gui/assets/nc-icons/onetoone.svg new file mode 100644 index 0000000000..e95ce0646f --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/onetoone.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index c50fa26b64..1986dd926c 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -542,3 +542,48 @@ a { input[type='number'] { @apply !outline-none !ring-0 !border-0; } + +.ant-pagination { + @apply !flex !flex-row !gap-1; +} + +.ant-pagination .ant-pagination-prev { + @apply !border-1 !rounded-md !border-gray-200 transform scale-95; +} + +.ant-pagination .ant-pagination-item { + @apply !bg-white !rounded-md !border-1 !scale-110 !border-gray-200 !flex !items-center !justify-center; +} + +.ant-pagination .ant-pagination-item a { + @apply !no-underline !text-gray-700; +} +.ant-pagination .ant-pagination-item-active a { + @apply !text-brand-500; +} + +.ant-pagination .ant-pagination-next { + @apply !border-1 !rounded-md !border-gray-200 scale-95; +} + +.ant-pagination .ant-pagination-item-active { + @apply !bg-brand-50 !text-brand-500 !border-0 !scale-110; +} +.ant-pagination .ant-pagination-item-link { + @apply !flex !items-center !justify-center; +} + +.ant-pagination .ant-pagination-jump-next-custom-icon .ant-pagination-item-link { + @apply !block; +} +.ant-pagination .ant-pagination-jump-prev-custom-icon .ant-pagination-item-link { + @apply !block; +} + +.ant-card-body { + @apply !p-2; +} + +.ant-pagination .ant-pagination-item-link-icon { + @apply !block !py-1.5; +} diff --git a/packages/nc-gui/components.d.ts b/packages/nc-gui/components.d.ts index 0ddacb9883..208fef4e85 100644 --- a/packages/nc-gui/components.d.ts +++ b/packages/nc-gui/components.d.ts @@ -129,12 +129,15 @@ declare module '@vue/runtime-core' { MdiDiscord: typeof import('~icons/mdi/discord')['default'] MdiDotsHorizontal: typeof import('~icons/mdi/dots-horizontal')['default'] MdiEye: typeof import('~icons/mdi/eye')['default'] + MdiFileDocumentMultipleOutline: typeof import('~icons/mdi/file-document-multiple-outline')['default'] MdiFlag: typeof import('~icons/mdi/flag')['default'] MdiHeart: typeof import('~icons/mdi/heart')['default'] MdiKeyStar: typeof import('~icons/mdi/key-star')['default'] MdiLinkVariant: typeof import('~icons/mdi/link-variant')['default'] + MdiLoading: typeof import('~icons/mdi/loading')['default'] MdiLogin: typeof import('~icons/mdi/login')['default'] MdiLogout: typeof import('~icons/mdi/logout')['default'] + MdiMagnify: typeof import('~icons/mdi/magnify')['default'] MdiMapMarkerOutline: typeof import('~icons/mdi/map-marker-outline')['default'] MdiMenuDown: typeof import('~icons/mdi/menu-down')['default'] MdiMicrosoftTeams: typeof import('~icons/mdi/microsoft-teams')['default'] diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index 6791507382..bab7742ebb 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -78,7 +78,7 @@ useSelectedCellKeyupListener(active, (e) => { diff --git a/packages/nc-gui/components/smartsheet/VirtualCell.vue b/packages/nc-gui/components/smartsheet/VirtualCell.vue index e3cdb06561..9b11cc2af7 100644 --- a/packages/nc-gui/components/smartsheet/VirtualCell.vue +++ b/packages/nc-gui/components/smartsheet/VirtualCell.vue @@ -4,6 +4,7 @@ import { ActiveCellInj, CellValueInj, ColumnInj, + IsExpandedFormOpenInj, IsFormInj, IsGridInj, NavigateDir, @@ -48,6 +49,8 @@ const isGrid = inject(IsGridInj, ref(false)) const isForm = inject(IsFormInj, ref(false)) +const isExpandedForm = inject(IsExpandedFormOpenInj, ref(false)) + function onNavigate(dir: NavigateDir, e: KeyboardEvent) { emit('navigate', dir) @@ -91,7 +94,7 @@ onUnmounted(() => {
diff --git a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue index 991daa19e2..0de4f5c584 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue @@ -20,7 +20,7 @@ const route = useRoute() const { meta, isSqlView } = useSmartsheetStoreOrThrow() -const { commentsDrawer, displayValue, primaryKey, save: _save, loadRow } = useExpandedFormStoreOrThrow() +const { commentsDrawer, displayValue, primaryKey, save: _save, loadRow, deleteRowById } = useExpandedFormStoreOrThrow() const { isNew, syncLTARRefs, state } = useSmartsheetRowStoreOrThrow() @@ -72,8 +72,6 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => { const showDeleteRowModal = ref(false) -const { deleteRowById } = useViewData(meta, ref(props.view)) - const onDeleteRowClick = () => { showDeleteRowModal.value = true } @@ -81,7 +79,7 @@ const onDeleteRowClick = () => { const onConfirmDeleteRowClick = async () => { showDeleteRowModal.value = false await deleteRowById(primaryKey.value) - reloadTrigger.trigger() + await reloadTrigger.trigger() emit('cancel') message.success('Row deleted') } diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index b86be388b2..d6c6772390 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -114,8 +114,6 @@ if (props.rowId) { useProvideSmartsheetStore(ref({}) as Ref, meta) -provide(IsFormInj, ref(true)) - watch( state, () => { diff --git a/packages/nc-gui/components/smartsheet/header/Cell.vue b/packages/nc-gui/components/smartsheet/header/Cell.vue index 4ba762705d..1cde0549a5 100644 --- a/packages/nc-gui/components/smartsheet/header/Cell.vue +++ b/packages/nc-gui/components/smartsheet/header/Cell.vue @@ -1,11 +1,12 @@