From 8b251ba12b6b4e882440227103e2a37db2b2ea71 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Wed, 24 Jul 2024 07:23:26 +0000 Subject: [PATCH] fix: ux fixes --- packages/nc-gui/assets/nc-icons/globe.svg | 12 +++ .../components/cell/attachment/Carousel.vue | 80 +++++++++++++------ .../cell/attachment/Preview/MiscOffice.vue | 2 - .../cell/attachment/Preview/Pdf.vue | 6 +- .../cell/attachment/Preview/Video.vue | 21 ++--- packages/nc-gui/utils/fileUtils.ts | 3 +- packages/nc-gui/utils/iconUtils.ts | 2 + 7 files changed, 81 insertions(+), 45 deletions(-) create mode 100644 packages/nc-gui/assets/nc-icons/globe.svg diff --git a/packages/nc-gui/assets/nc-icons/globe.svg b/packages/nc-gui/assets/nc-icons/globe.svg new file mode 100644 index 0000000000..98f1340af7 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/globe.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/nc-gui/components/cell/attachment/Carousel.vue b/packages/nc-gui/components/cell/attachment/Carousel.vue index 03fb1bc93b..81626027b4 100644 --- a/packages/nc-gui/components/cell/attachment/Carousel.vue +++ b/packages/nc-gui/components/cell/attachment/Carousel.vue @@ -62,6 +62,20 @@ const onSelect = () => { emblaThumbnailApi.value.scrollTo(newSnap) } +const goPrev = () => { + if (!emblaMainApi.value || !emblaThumbnailApi.value) return + + emblaMainApi.value.scrollPrev() + emblaThumbnailApi.value.scrollPrev() +} + +const goNext = () => { + if (!emblaMainApi.value || !emblaThumbnailApi.value) return + + emblaMainApi.value.scrollNext() + emblaThumbnailApi.value.scrollNext() +} + watchOnce(emblaMainApi, async (emblaMainApi) => { if (!emblaMainApi) return @@ -112,10 +126,13 @@ watchOnce(emblaMainApi, async (emblaMainApi) => { - + -
+
{ @@ -149,9 +166,24 @@ watchOnce(emblaMainApi, async (emblaMainApi) => { -
+
+ +
+
+ +
+ +
- + {
- - - - - - - { - -
+ + + - {{ $t('title.downloadFile') }} -
-
+ + + + + + + + +