From 510afccf4fdb1d17bd7f4bae40a715b868ecf087 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Wed, 24 Jul 2024 07:23:25 +0000 Subject: [PATCH 01/42] feat: embla custom carousel --- .../components/cell/attachment/Carousel.vue | 206 +++++++----------- .../components/cell/attachment/Image.vue | 6 +- .../nc-gui/components/general/Overlay.vue | 10 +- .../nc-gui/components/nc/Carousel/Content.vue | 27 +++ .../nc-gui/components/nc/Carousel/Item.vue | 21 ++ .../nc-gui/components/nc/Carousel/Next.vue | 26 +++ .../components/nc/Carousel/Previous.vue | 26 +++ .../nc-gui/components/nc/Carousel/index.vue | 65 ++++++ .../components/nc/Carousel/interface.ts | 24 ++ .../components/nc/Carousel/useCarousel.ts | 51 +++++ 10 files changed, 330 insertions(+), 132 deletions(-) create mode 100644 packages/nc-gui/components/nc/Carousel/Content.vue create mode 100644 packages/nc-gui/components/nc/Carousel/Item.vue create mode 100644 packages/nc-gui/components/nc/Carousel/Next.vue create mode 100644 packages/nc-gui/components/nc/Carousel/Previous.vue create mode 100644 packages/nc-gui/components/nc/Carousel/index.vue create mode 100644 packages/nc-gui/components/nc/Carousel/interface.ts create mode 100644 packages/nc-gui/components/nc/Carousel/useCarousel.ts diff --git a/packages/nc-gui/components/cell/attachment/Carousel.vue b/packages/nc-gui/components/cell/attachment/Carousel.vue index d77bf4402a..0ed3217a37 100644 --- a/packages/nc-gui/components/cell/attachment/Carousel.vue +++ b/packages/nc-gui/components/cell/attachment/Carousel.vue @@ -1,156 +1,116 @@ - diff --git a/packages/nc-gui/components/cell/attachment/Image.vue b/packages/nc-gui/components/cell/attachment/Image.vue index 58a6d6dcc7..fa34210b87 100644 --- a/packages/nc-gui/components/cell/attachment/Image.vue +++ b/packages/nc-gui/components/cell/attachment/Image.vue @@ -2,6 +2,7 @@ interface Props { srcs: string[] alt?: string + objectFit?: string } const props = defineProps() @@ -14,7 +15,10 @@ const onError = () => index.value++