Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: smartsheet error

DarkPhoenix270455707c1480f8
diff --git a/packages/nc-gui/components/cell/attachment/Modal.vue b/packages/nc-gui/components/cell/attachment/Modal.vue
index d73db015d3..d5baf676e1 100644
--- a/packages/nc-gui/components/cell/attachment/Modal.vue
+++ b/packages/nc-gui/components/cell/attachment/Modal.vue
@@ -16,6 +16,7 @@ const {
updateModelValue,
selectedFile,
selectedVisibleItems,
+ isSharedForm,
bulkDownloadAttachments,
} = useAttachmentCell()!
@@ -38,8 +39,6 @@ const onDropAction = function (...args: any[]) {
const { isOverDropZone } = useDropZone(dropZoneRef, onDropAction)
-const { isSharedForm } = useSmartsheetStoreOrThrow()
-
const preventExit = ref(false)
onKeyDown('Escape', () => {
diff --git a/packages/nc-gui/components/cell/attachment/utils.ts b/packages/nc-gui/components/cell/attachment/utils.ts
index 421cacfb4b..2f5cb575cc 100644
--- a/packages/nc-gui/components/cell/attachment/utils.ts
+++ b/packages/nc-gui/components/cell/attachment/utils.ts
@@ -17,8 +17,6 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
const baseURL = $api.instance.defaults.baseURL
- const { isSharedForm } = useSmartsheetStoreOrThrow()
-
const { row } = useSmartsheetRowStoreOrThrow()
const { fetchSharedViewAttachment } = useSharedView()
@@ -38,6 +36,10 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
const meta = inject(MetaInj, ref())
+ const isSharedForm = computed(() => {
+ return isForm.value && isPublic.value
+ })
+
const column = inject(ColumnInj, ref())
const editEnabled = inject(EditModeInj, ref(false))
@@ -560,6 +562,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
isRenameModalOpen,
updateAttachmentTitle,
isEditAllowed,
+ isSharedForm,
}
},
'useAttachmentCell',