From 67728624e2c41d3450b1641bef8b031e520ef032 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 23 Aug 2022 09:35:57 +0200 Subject: [PATCH] fix(gui-v2): attachments not loading in shared view --- packages/nc-gui-v2/components.d.ts | 1 + .../components/cell/attachment/index.vue | 4 +- .../components/cell/attachment/utils.ts | 27 +++++++++---- .../components/general/HelpAndSupport.vue | 1 + .../smartsheet-toolbar/SortListMenu.vue | 39 +++++++++++-------- .../nc-gui-v2/components/smartsheet/Grid.vue | 5 ++- 6 files changed, 50 insertions(+), 27 deletions(-) diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index 9b0fa75f45..79e596ccda 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -202,6 +202,7 @@ declare module '@vue/runtime-core' { MdiSearch: typeof import('~icons/mdi/search')['default'] MdiShieldLockOutline: typeof import('~icons/mdi/shield-lock-outline')['default'] MdiSlack: typeof import('~icons/mdi/slack')['default'] + MdiSort: typeof import('~icons/mdi/sort')['default'] MdiStar: typeof import('~icons/mdi/star')['default'] MdiStarOutline: typeof import('~icons/mdi/star-outline')['default'] MdiStore: typeof import('~icons/mdi/store')['default'] diff --git a/packages/nc-gui-v2/components/cell/attachment/index.vue b/packages/nc-gui-v2/components/cell/attachment/index.vue index 2d21896300..e1981a915f 100644 --- a/packages/nc-gui-v2/components/cell/attachment/index.vue +++ b/packages/nc-gui-v2/components/cell/attachment/index.vue @@ -61,7 +61,8 @@ watch( if (nextModel) { try { attachments.value = ((typeof nextModel === 'string' ? JSON.parse(nextModel) : nextModel) || []).filter(Boolean) - } catch { + } catch (e) { + console.error(e) attachments.value = [] } } @@ -124,6 +125,7 @@ const { isSharedForm } = useSmartsheetStoreOrThrow() +